From 80e2e9a79dc697914ce39435a5478d5a55da81b4 Mon Sep 17 00:00:00 2001 From: Emma Imber Date: Mon, 14 Oct 2024 14:42:03 +0100 Subject: [PATCH 1/3] Reinstate commercial/api/hb endpoint --- .../controllers/CommercialControllers.scala | 1 + .../PrebidAnalyticsController.scala | 18 + commercial/conf/routes | 3 + common/app/http/RequestLoggingFilter.scala | 3 +- dev-build/conf/routes | 1 + package.json | 426 +++++++++--------- yarn.lock | 10 +- 7 files changed, 243 insertions(+), 219 deletions(-) create mode 100644 commercial/app/controllers/PrebidAnalyticsController.scala diff --git a/commercial/app/controllers/CommercialControllers.scala b/commercial/app/controllers/CommercialControllers.scala index 9533b212e3f..3dc6767bde6 100644 --- a/commercial/app/controllers/CommercialControllers.scala +++ b/commercial/app/controllers/CommercialControllers.scala @@ -25,6 +25,7 @@ trait CommercialControllers { lazy val piggybackPixelController = wire[PiggybackPixelController] lazy val cmpDataController = wire[CmpDataController] lazy val adsDotTextFileController = wire[AdsDotTextViewController] + lazy val prebidAnalyticsController = wire[PrebidAnalyticsController] lazy val passbackController = wire[PassbackController] lazy val ampIframeHtmlController = wire[AmpIframeHtmlController] lazy val nonRefreshableLineItemsController = wire[nonRefreshableLineItemsController] diff --git a/commercial/app/controllers/PrebidAnalyticsController.scala b/commercial/app/controllers/PrebidAnalyticsController.scala new file mode 100644 index 00000000000..788511f6701 --- /dev/null +++ b/commercial/app/controllers/PrebidAnalyticsController.scala @@ -0,0 +1,18 @@ +package commercial.controllers + +import common.GuLogging +import conf.Configuration.commercial.prebidAnalyticsStream +import conf.switches.Switches +import play.api.mvc._ + +import scala.concurrent.ExecutionContext + +class PrebidAnalyticsController(val controllerComponents: ControllerComponents) extends BaseController with GuLogging { + + private implicit val ec: ExecutionContext = controllerComponents.executionContext + + def insert(): Action[String] = + Action(parse.text) { implicit request => + Analytics.storeJsonBody(Switches.prebidAnalytics, prebidAnalyticsStream, log)(request.body) + } +} diff --git a/commercial/conf/routes b/commercial/conf/routes index f84e2e8c647..39858ed971d 100644 --- a/commercial/conf/routes +++ b/commercial/conf/routes @@ -41,6 +41,9 @@ GET /commercial/cmp/shortvendorlist.json GET /ads.txt commercial.controllers.AdsDotTextViewController.renderTextFile() GET /app-ads.txt commercial.controllers.AdsDotTextViewController.renderAppTextFile() +# Analytics +POST /commercial/api/hb commercial.controllers.PrebidAnalyticsController.insert() + # Passbacks GET /commercial/ias-passback/:size commercial.controllers.PassbackController.renderIasPassback(size) diff --git a/common/app/http/RequestLoggingFilter.scala b/common/app/http/RequestLoggingFilter.scala index b9920a9e420..e2e95a3732b 100644 --- a/common/app/http/RequestLoggingFilter.scala +++ b/common/app/http/RequestLoggingFilter.scala @@ -29,7 +29,8 @@ class RequestLoggingFilter(implicit val mat: Materializer, executionContext: Exe case _ => "" } } - if (rh.method != "POST") { + // don't log uncacheable /commercial/api/hb POST requests due to the volume of them + if (rh.method != "POST" || rh.path != "/commercial/api/hb") { requestLogger.withResponse(response).info(s"${rh.method} ${rh.uri}$additionalInfo") } case Failure(error) => diff --git a/dev-build/conf/routes b/dev-build/conf/routes index 345d8527ebd..68244268ba1 100644 --- a/dev-build/conf/routes +++ b/dev-build/conf/routes @@ -275,6 +275,7 @@ GET /commercial/non-refreshable-line-items.json GET /ads.txt commercial.controllers.AdsDotTextViewController.renderTextFile() GET /app-ads.txt commercial.controllers.AdsDotTextViewController.renderAppTextFile() GET /commercial/ias-passback/:size commercial.controllers.PassbackController.renderIasPassback(size) +POST /commercial/api/hb commercial.controllers.PrebidAnalyticsController.insert() # Commercial Admin GET /commercial controllers.admin.CommercialController.renderCommercialMenu() diff --git a/package.json b/package.json index c421369bee9..6d152a1e3dd 100644 --- a/package.json +++ b/package.json @@ -1,214 +1,214 @@ { - "name": "@guardian/frontend", - "version": "0.1.0", - "private": true, - "engines": { - "yarn": ">=1.22.19" - }, - "files": [ - "static/src/**/*" - ], - "dependencies": { - "@aws-sdk/client-cloudwatch": "3.621.0", - "@babel/cli": "^7.24.8", - "@babel/core": "^7.25.2", - "@babel/eslint-parser": "7.25.1", - "@babel/plugin-proposal-class-properties": "^7.10.4", - "@babel/plugin-proposal-object-rest-spread": "^7.11.0", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.24.7", - "@babel/preset-env": "^7.25.3", - "@babel/preset-react": "^7.24.7", - "@babel/preset-typescript": "^7.24.7", - "@babel/register": "^7.24.6", - "@babel/runtime": "^7.25.0", - "@braze/web-sdk-core": "3.5.1", - "@emotion/cache": "^11.13.1", - "@emotion/core": "^10.0.27", - "@emotion/react": "11.11.1", - "@emotion/styled": "^10.0.27", - "@guardian/ab-core": "8.0.0", - "@guardian/commercial": "23.0.0", - "@guardian/core-web-vitals": "6.0.0", - "@guardian/eslint-config-typescript": "9.0.1", - "@guardian/identity-auth": "3.0.0", - "@guardian/identity-auth-frontend": "4.0.0", - "@guardian/libs": "19.1.0", - "@guardian/prettier": "^8.0.1", - "@guardian/shimport": "^1.0.2", - "@guardian/source-foundations": "16.0.0", - "@guardian/source-react-components": "25.0.0", - "@guardian/source-react-components-development-kitchen": "21.0.0", - "@types/googletag": "^3.1.3", - "@types/jest": "29.5.12", - "@types/lodash-es": "^4.17.4", - "@types/webpack-env": "^1.16.2", - "@types/youtube": "^0.0.44", - "@typescript-eslint/eslint-plugin": "5.61.0", - "@typescript-eslint/parser": "8.0.1", - "amphtml-validator": "^1.0.38", - "any-observable": "^0.2.0", - "autoprefixer": "^10.3.7", - "babel-core": "^7.0.0-bridge.0", - "babel-jest": "29.7.0", - "babel-loader": "^8.1.0", - "babel-plugin-dynamic-import-node": "^2.3.3", - "bean": "~1.0.14", - "bonzo": "~2.0.0", - "bootstrap-sass": "3.4.1", - "browser-sync": "3.0.2", - "bs-fullscreen-message": "^1.1.0", - "btoa": "1.1.2", - "chalk": "^2.1.0", - "chance": "^1.0.11", - "chokidar": "^3.5.2", - "circular-dependency-plugin": "^5.0.1", - "classnames": "~2.5.1", - "copy-webpack-plugin": "6", - "core-js": "^3.38.0", - "cp-file": "^7.0.0", - "cpy": "^8.1.2", - "css-loader": "^5.2.7", - "cssstats": "^3.1.0", - "csstype": "^3.0.6", - "curl": "cujojs/curl#0.8.9", - "dialog-polyfill": "^0.5.6", - "domready": "^1.0.8", - "dynamic-import-polyfill": "^0.1.1", - "eslint": "8.56.0", - "eslint-config-prettier": "^7.1.0", - "eslint-import-resolver-webpack": "^0.13.8", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-guardian-frontend": "file:tools/eslint-plugin-guardian-frontend", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jasmine": "^2.10.1", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-react": "^7.22.0", - "eslint-plugin-react-hooks": "^4.2.0", - "execa": "^0.8.0", - "fastdom": "1.0.9", - "fence": "guardian/fence#0.2.11", - "figures": "^2.0.0", - "glob": "^7.2.0", - "gzip-size": "^3.0.0", - "hasha": "^3.0.0", - "jest": "29.7.0", - "jest-environment-jsdom": "29.7.0", - "jest-environment-jsdom-global": "4.0.0", - "listr2": "^8.2.1", - "lodash-es": "^4.17.21", - "lodash.uniq": "^4.5.0", - "mkdirp": "^1.0.4", - "mockdate": "^3.0.5", - "object-fit-videos": "^1.0.3", - "ophan-tracker-js": "1.4.0", - "ora": "^1.3.0", - "pify": "^5.0.0", - "postcss": "^8.3.10", - "postcss-pxtorem": "^6.0.0", - "preact": "^10.5.13", - "prettier": "^2.2.1", - "prettysize": "^0.1.0", - "qwery": "3.4.2", - "rangefix": "^0.2.5", - "raven-js": "^3.19.1", - "raw-loader": "^0.5.1", - "request": "^2.81.0", - "requireindex": "^1.1.0", - "rimraf": "^2.6.1", - "rxjs": "^6.6.7", - "sass": "1.77.8", - "sass-graph": "4.0.1", - "sass-loader": "14.2.1", - "sass-mq": "5.0.1", - "semver": "^5.4.1", - "split": "^1.0.0", - "stream-to-observable": "^0.2.0", - "stylelint": "^16.5.0", - "stylelint-config-standard-scss": "^13.1.0", - "svgo": "^2.3.0", - "tcp-ping": "^0.1.1", - "ts-jest": "29.1.2", - "ts-loader": "^8.0.12", - "tslib": "2.6.2", - "typescript": "5.3.3", - "uglify-js": "^3.19.2", - "video.js": "~5.3", - "videojs-contrib-ads": "3.1.3", - "videojs-embed": "guardian/videojs-embed#v0.3.3", - "videojs-ima": "googleads/videojs-ima#0.3.0", - "videojs-persistvolume": "guardian/videojs-persistvolume#0.1.4", - "videojs-playlist": "guardian/videojs-playlist#0.1.4", - "web-vitals": "3.5.1", - "webpack": "^5.79.0", - "webpack-bundle-analyzer": "^4.10.2", - "webpack-cli": "^5.0.1", - "webpack-dev-server": "^5.0.4", - "webpack-merge": "^4.2.2", - "wolfy87-eventemitter": "~5.2.4", - "yargs": "^17.7.1" - }, - "optionalDependencies": { - "fsevents": "^2.3.2", - "react": "18.3.1", - "react-dom": "18.2.0" - }, - "jest": { - "preset": "ts-jest/presets/js-with-babel", - "moduleFileExtensions": [ - "ts", - "tsx", - "js" - ], - "transform": { - "^.+\\.(ts|tsx)$": [ - "ts-jest", - { - "tsconfig": "tsconfig.test.json" - } - ] - }, - "testMatch": [ - "**/*.(test|spec).+(ts|tsx|js)" - ], - "roots": [ - "/static/src/javascripts", - "/tools" - ], - "moduleDirectories": [ - "/static/src/javascripts", - "/static/src/javascripts/projects", - "/static/vendor/javascripts", - "node_modules" - ], - "moduleNameMapper": { - "videojs": "video.js", - "^svgs/(.*)$": "/__mocks__/svgMock.js", - "^(.*)\\.svg$": "/__mocks__/svgMock.js", - "^(.*)\\.html$": "/__mocks__/templateMock.js", - "ophan/ng": "ophan-tracker-js", - "ophan/embed": "ophan-tracker-js/build/ophan.embed" - }, - "setupFilesAfterEnv": [ - "/dev/jest.setupTestFrameworkScriptFile.js" - ], - "testEnvironment": "jest-environment-jsdom-global", - "testEnvironmentOptions": { - "url": "http://testurl.theguardian.com" - }, - "transformIgnorePatterns": [ - "/node_modules/(?!(@guardian|lodash-es|preact)/)" - ] - }, - "scripts": { - "eslint-fix": "eslint --color --fix", - "test": "jest" - }, - "prettier": "@guardian/prettier", - "packageManager": "yarn@4.1.1", - "resolutions": { - "micromatch": "4.0.8", - "unset-value": "^2.0.1" - } -} + "name": "@guardian/frontend", + "version": "0.1.0", + "private": true, + "engines": { + "yarn": ">=1.22.19" + }, + "files": [ + "static/src/**/*" + ], + "dependencies": { + "@aws-sdk/client-cloudwatch": "3.621.0", + "@babel/cli": "^7.24.8", + "@babel/core": "^7.25.2", + "@babel/eslint-parser": "7.25.1", + "@babel/plugin-proposal-class-properties": "^7.10.4", + "@babel/plugin-proposal-object-rest-spread": "^7.11.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-transform-runtime": "^7.24.7", + "@babel/preset-env": "^7.25.3", + "@babel/preset-react": "^7.24.7", + "@babel/preset-typescript": "^7.24.7", + "@babel/register": "^7.24.6", + "@babel/runtime": "^7.25.0", + "@braze/web-sdk-core": "3.5.1", + "@emotion/cache": "^11.13.1", + "@emotion/core": "^10.0.27", + "@emotion/react": "11.11.1", + "@emotion/styled": "^10.0.27", + "@guardian/ab-core": "8.0.0", + "@guardian/commercial": "23.0.0", + "@guardian/core-web-vitals": "6.0.0", + "@guardian/eslint-config-typescript": "9.0.1", + "@guardian/identity-auth": "3.0.0", + "@guardian/identity-auth-frontend": "4.0.0", + "@guardian/libs": "19.1.0", + "@guardian/prettier": "^8.0.1", + "@guardian/shimport": "^1.0.2", + "@guardian/source-foundations": "16.0.0", + "@guardian/source-react-components": "25.0.0", + "@guardian/source-react-components-development-kitchen": "21.0.0", + "@types/googletag": "^3.1.3", + "@types/jest": "29.5.12", + "@types/lodash-es": "^4.17.4", + "@types/webpack-env": "^1.16.2", + "@types/youtube": "^0.0.44", + "@typescript-eslint/eslint-plugin": "5.61.0", + "@typescript-eslint/parser": "8.0.1", + "amphtml-validator": "^1.0.38", + "any-observable": "^0.2.0", + "autoprefixer": "^10.3.7", + "babel-core": "^7.0.0-bridge.0", + "babel-jest": "29.7.0", + "babel-loader": "^8.1.0", + "babel-plugin-dynamic-import-node": "^2.3.3", + "bean": "~1.0.14", + "bonzo": "~2.0.0", + "bootstrap-sass": "3.4.1", + "browser-sync": "3.0.2", + "bs-fullscreen-message": "^1.1.0", + "btoa": "1.1.2", + "chalk": "^2.1.0", + "chance": "^1.0.11", + "chokidar": "^3.5.2", + "circular-dependency-plugin": "^5.0.1", + "classnames": "~2.5.1", + "copy-webpack-plugin": "6", + "core-js": "^3.38.0", + "cp-file": "^7.0.0", + "cpy": "^8.1.2", + "css-loader": "^5.2.7", + "cssstats": "^3.1.0", + "csstype": "^3.0.6", + "curl": "cujojs/curl#0.8.9", + "dialog-polyfill": "^0.5.6", + "domready": "^1.0.8", + "dynamic-import-polyfill": "^0.1.1", + "eslint": "8.56.0", + "eslint-config-prettier": "^7.1.0", + "eslint-import-resolver-webpack": "^0.13.8", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-guardian-frontend": "file:tools/eslint-plugin-guardian-frontend", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jasmine": "^2.10.1", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-react": "^7.22.0", + "eslint-plugin-react-hooks": "^4.2.0", + "execa": "^0.8.0", + "fastdom": "1.0.9", + "fence": "guardian/fence#0.2.11", + "figures": "^2.0.0", + "glob": "^7.2.0", + "gzip-size": "^3.0.0", + "hasha": "^3.0.0", + "jest": "29.7.0", + "jest-environment-jsdom": "29.7.0", + "jest-environment-jsdom-global": "4.0.0", + "listr2": "^8.2.1", + "lodash-es": "^4.17.21", + "lodash.uniq": "^4.5.0", + "mkdirp": "^1.0.4", + "mockdate": "^3.0.5", + "object-fit-videos": "^1.0.3", + "ophan-tracker-js": "1.4.0", + "ora": "^1.3.0", + "pify": "^5.0.0", + "postcss": "^8.3.10", + "postcss-pxtorem": "^6.0.0", + "preact": "^10.5.13", + "prettier": "^2.2.1", + "prettysize": "^0.1.0", + "qwery": "3.4.2", + "rangefix": "^0.2.5", + "raven-js": "^3.19.1", + "raw-loader": "^0.5.1", + "request": "^2.81.0", + "requireindex": "^1.1.0", + "rimraf": "^2.6.1", + "rxjs": "^6.6.7", + "sass": "1.77.8", + "sass-graph": "4.0.1", + "sass-loader": "14.2.1", + "sass-mq": "5.0.1", + "semver": "^5.4.1", + "split": "^1.0.0", + "stream-to-observable": "^0.2.0", + "stylelint": "^16.5.0", + "stylelint-config-standard-scss": "^13.1.0", + "svgo": "^2.3.0", + "tcp-ping": "^0.1.1", + "ts-jest": "29.1.2", + "ts-loader": "^8.0.12", + "tslib": "2.6.2", + "typescript": "5.3.3", + "uglify-js": "^3.19.2", + "video.js": "~5.3", + "videojs-contrib-ads": "3.1.3", + "videojs-embed": "guardian/videojs-embed#v0.3.3", + "videojs-ima": "googleads/videojs-ima#0.3.0", + "videojs-persistvolume": "guardian/videojs-persistvolume#0.1.4", + "videojs-playlist": "guardian/videojs-playlist#0.1.4", + "web-vitals": "3.5.1", + "webpack": "^5.79.0", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-cli": "^5.0.1", + "webpack-dev-server": "^5.0.4", + "webpack-merge": "^4.2.2", + "wolfy87-eventemitter": "~5.2.4", + "yargs": "^17.7.1" + }, + "optionalDependencies": { + "fsevents": "^2.3.2", + "react": "18.3.1", + "react-dom": "18.2.0" + }, + "jest": { + "preset": "ts-jest/presets/js-with-babel", + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ], + "transform": { + "^.+\\.(ts|tsx)$": [ + "ts-jest", + { + "tsconfig": "tsconfig.test.json" + } + ] + }, + "testMatch": [ + "**/*.(test|spec).+(ts|tsx|js)" + ], + "roots": [ + "/static/src/javascripts", + "/tools" + ], + "moduleDirectories": [ + "/static/src/javascripts", + "/static/src/javascripts/projects", + "/static/vendor/javascripts", + "node_modules" + ], + "moduleNameMapper": { + "videojs": "video.js", + "^svgs/(.*)$": "/__mocks__/svgMock.js", + "^(.*)\\.svg$": "/__mocks__/svgMock.js", + "^(.*)\\.html$": "/__mocks__/templateMock.js", + "ophan/ng": "ophan-tracker-js", + "ophan/embed": "ophan-tracker-js/build/ophan.embed" + }, + "setupFilesAfterEnv": [ + "/dev/jest.setupTestFrameworkScriptFile.js" + ], + "testEnvironment": "jest-environment-jsdom-global", + "testEnvironmentOptions": { + "url": "http://testurl.theguardian.com" + }, + "transformIgnorePatterns": [ + "/node_modules/(?!(@guardian|lodash-es|preact)/)" + ] + }, + "scripts": { + "eslint-fix": "eslint --color --fix", + "test": "jest" + }, + "prettier": "@guardian/prettier", + "packageManager": "yarn@4.1.1", + "resolutions": { + "micromatch": "4.0.8", + "unset-value": "^2.0.1" + } +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0bed09c3a92..835a8db2dce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4044,7 +4044,7 @@ __metadata: resolution: "@guardian/commercial@npm:23.0.0" dependencies: "@changesets/cli": "npm:^2.26.2" - "@guardian/prebid.js": "npm:8.52.0-6" + "@guardian/prebid.js": "npm:8.52.0-7" "@octokit/core": "npm:^6.1.2" fastdom: "npm:^1.0.11" lodash-es: "npm:^4.17.21" @@ -4320,9 +4320,9 @@ __metadata: languageName: node linkType: hard -"@guardian/prebid.js@npm:8.52.0-6": - version: 8.52.0-6 - resolution: "@guardian/prebid.js@npm:8.52.0-6" +"@guardian/prebid.js@npm:8.52.0-7": + version: 8.52.0-7 + resolution: "@guardian/prebid.js@npm:8.52.0-7" dependencies: "@babel/core": "npm:^7.23.2" "@babel/plugin-transform-runtime": "npm:^7.18.9" @@ -4345,7 +4345,7 @@ __metadata: dependenciesMeta: fsevents: optional: true - checksum: 10c0/4c155d7754c3e5288f498ef16a77f13d58083d8199fb4ab5441a86ee5799c94ed611d3352fb9658c9edf05100129fffd254c48f4f83f3511afeab89da06739d9 + checksum: 10c0/a770d9a5264e4bf94caf615aabbf5e8c69bb8210313086b17dac406692b56a7acebe6c0c2054e170aeca88dd48db5684cb3a643dff210c04ce5ac861f3656cd3 languageName: node linkType: hard From d330ece00ae0c3c4d88a4ee35e8a1c0d0da4afaf Mon Sep 17 00:00:00 2001 From: Emma Imber Date: Thu, 17 Oct 2024 11:27:26 +0100 Subject: [PATCH 2/3] Bump commercial --- package.json | 4 ++-- yarn.lock | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 6d152a1e3dd..02a1153c016 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@emotion/react": "11.11.1", "@emotion/styled": "^10.0.27", "@guardian/ab-core": "8.0.0", - "@guardian/commercial": "23.0.0", + "@guardian/commercial": "23.1.0", "@guardian/core-web-vitals": "6.0.0", "@guardian/eslint-config-typescript": "9.0.1", "@guardian/identity-auth": "3.0.0", @@ -211,4 +211,4 @@ "micromatch": "4.0.8", "unset-value": "^2.0.1" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 835a8db2dce..f86cd0fdda1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4039,9 +4039,9 @@ __metadata: languageName: node linkType: hard -"@guardian/commercial@npm:23.0.0": - version: 23.0.0 - resolution: "@guardian/commercial@npm:23.0.0" +"@guardian/commercial@npm:23.1.0": + version: 23.1.0 + resolution: "@guardian/commercial@npm:23.1.0" dependencies: "@changesets/cli": "npm:^2.26.2" "@guardian/prebid.js": "npm:8.52.0-7" @@ -4059,7 +4059,7 @@ __metadata: "@guardian/libs": ^19.1.0 "@guardian/source": ^8.0.0 typescript: ~5.5.3 - checksum: 10c0/bffbd458eccc1c126c9c9ad126fc826d7caab6870e9b55202e3218e8b74c209ea253ec921c3f97c48db56b54d507a9c04c7bb4573ec1150140cf277ec1ac20e1 + checksum: 10c0/33104cc9313131b30d06f94419c188363449455d58b1257857ca6399e880e268d50ec2f405a9a9b5b9c6b0d7506360f1b8a552dc7cca93653f7e4fb64d425fe5 languageName: node linkType: hard @@ -4132,7 +4132,7 @@ __metadata: "@emotion/react": "npm:11.11.1" "@emotion/styled": "npm:^10.0.27" "@guardian/ab-core": "npm:8.0.0" - "@guardian/commercial": "npm:23.0.0" + "@guardian/commercial": "npm:23.1.0" "@guardian/core-web-vitals": "npm:6.0.0" "@guardian/eslint-config-typescript": "npm:9.0.1" "@guardian/identity-auth": "npm:3.0.0" From f031d8179e73bb26422e21f40010bfc1540755ed Mon Sep 17 00:00:00 2001 From: Emma Imber Date: Thu, 17 Oct 2024 13:00:30 +0100 Subject: [PATCH 3/3] Undo formatting change to package.json --- package.json | 424 +++++++++++++++++++++++++-------------------------- 1 file changed, 212 insertions(+), 212 deletions(-) diff --git a/package.json b/package.json index 02a1153c016..473903de0d2 100644 --- a/package.json +++ b/package.json @@ -1,214 +1,214 @@ { - "name": "@guardian/frontend", - "version": "0.1.0", - "private": true, - "engines": { - "yarn": ">=1.22.19" - }, - "files": [ - "static/src/**/*" - ], - "dependencies": { - "@aws-sdk/client-cloudwatch": "3.621.0", - "@babel/cli": "^7.24.8", - "@babel/core": "^7.25.2", - "@babel/eslint-parser": "7.25.1", - "@babel/plugin-proposal-class-properties": "^7.10.4", - "@babel/plugin-proposal-object-rest-spread": "^7.11.0", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.24.7", - "@babel/preset-env": "^7.25.3", - "@babel/preset-react": "^7.24.7", - "@babel/preset-typescript": "^7.24.7", - "@babel/register": "^7.24.6", - "@babel/runtime": "^7.25.0", - "@braze/web-sdk-core": "3.5.1", - "@emotion/cache": "^11.13.1", - "@emotion/core": "^10.0.27", - "@emotion/react": "11.11.1", - "@emotion/styled": "^10.0.27", - "@guardian/ab-core": "8.0.0", - "@guardian/commercial": "23.1.0", - "@guardian/core-web-vitals": "6.0.0", - "@guardian/eslint-config-typescript": "9.0.1", - "@guardian/identity-auth": "3.0.0", - "@guardian/identity-auth-frontend": "4.0.0", - "@guardian/libs": "19.1.0", - "@guardian/prettier": "^8.0.1", - "@guardian/shimport": "^1.0.2", - "@guardian/source-foundations": "16.0.0", - "@guardian/source-react-components": "25.0.0", - "@guardian/source-react-components-development-kitchen": "21.0.0", - "@types/googletag": "^3.1.3", - "@types/jest": "29.5.12", - "@types/lodash-es": "^4.17.4", - "@types/webpack-env": "^1.16.2", - "@types/youtube": "^0.0.44", - "@typescript-eslint/eslint-plugin": "5.61.0", - "@typescript-eslint/parser": "8.0.1", - "amphtml-validator": "^1.0.38", - "any-observable": "^0.2.0", - "autoprefixer": "^10.3.7", - "babel-core": "^7.0.0-bridge.0", - "babel-jest": "29.7.0", - "babel-loader": "^8.1.0", - "babel-plugin-dynamic-import-node": "^2.3.3", - "bean": "~1.0.14", - "bonzo": "~2.0.0", - "bootstrap-sass": "3.4.1", - "browser-sync": "3.0.2", - "bs-fullscreen-message": "^1.1.0", - "btoa": "1.1.2", - "chalk": "^2.1.0", - "chance": "^1.0.11", - "chokidar": "^3.5.2", - "circular-dependency-plugin": "^5.0.1", - "classnames": "~2.5.1", - "copy-webpack-plugin": "6", - "core-js": "^3.38.0", - "cp-file": "^7.0.0", - "cpy": "^8.1.2", - "css-loader": "^5.2.7", - "cssstats": "^3.1.0", - "csstype": "^3.0.6", - "curl": "cujojs/curl#0.8.9", - "dialog-polyfill": "^0.5.6", - "domready": "^1.0.8", - "dynamic-import-polyfill": "^0.1.1", - "eslint": "8.56.0", - "eslint-config-prettier": "^7.1.0", - "eslint-import-resolver-webpack": "^0.13.8", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-guardian-frontend": "file:tools/eslint-plugin-guardian-frontend", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jasmine": "^2.10.1", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-react": "^7.22.0", - "eslint-plugin-react-hooks": "^4.2.0", - "execa": "^0.8.0", - "fastdom": "1.0.9", - "fence": "guardian/fence#0.2.11", - "figures": "^2.0.0", - "glob": "^7.2.0", - "gzip-size": "^3.0.0", - "hasha": "^3.0.0", - "jest": "29.7.0", - "jest-environment-jsdom": "29.7.0", - "jest-environment-jsdom-global": "4.0.0", - "listr2": "^8.2.1", - "lodash-es": "^4.17.21", - "lodash.uniq": "^4.5.0", - "mkdirp": "^1.0.4", - "mockdate": "^3.0.5", - "object-fit-videos": "^1.0.3", - "ophan-tracker-js": "1.4.0", - "ora": "^1.3.0", - "pify": "^5.0.0", - "postcss": "^8.3.10", - "postcss-pxtorem": "^6.0.0", - "preact": "^10.5.13", - "prettier": "^2.2.1", - "prettysize": "^0.1.0", - "qwery": "3.4.2", - "rangefix": "^0.2.5", - "raven-js": "^3.19.1", - "raw-loader": "^0.5.1", - "request": "^2.81.0", - "requireindex": "^1.1.0", - "rimraf": "^2.6.1", - "rxjs": "^6.6.7", - "sass": "1.77.8", - "sass-graph": "4.0.1", - "sass-loader": "14.2.1", - "sass-mq": "5.0.1", - "semver": "^5.4.1", - "split": "^1.0.0", - "stream-to-observable": "^0.2.0", - "stylelint": "^16.5.0", - "stylelint-config-standard-scss": "^13.1.0", - "svgo": "^2.3.0", - "tcp-ping": "^0.1.1", - "ts-jest": "29.1.2", - "ts-loader": "^8.0.12", - "tslib": "2.6.2", - "typescript": "5.3.3", - "uglify-js": "^3.19.2", - "video.js": "~5.3", - "videojs-contrib-ads": "3.1.3", - "videojs-embed": "guardian/videojs-embed#v0.3.3", - "videojs-ima": "googleads/videojs-ima#0.3.0", - "videojs-persistvolume": "guardian/videojs-persistvolume#0.1.4", - "videojs-playlist": "guardian/videojs-playlist#0.1.4", - "web-vitals": "3.5.1", - "webpack": "^5.79.0", - "webpack-bundle-analyzer": "^4.10.2", - "webpack-cli": "^5.0.1", - "webpack-dev-server": "^5.0.4", - "webpack-merge": "^4.2.2", - "wolfy87-eventemitter": "~5.2.4", - "yargs": "^17.7.1" - }, - "optionalDependencies": { - "fsevents": "^2.3.2", - "react": "18.3.1", - "react-dom": "18.2.0" - }, - "jest": { - "preset": "ts-jest/presets/js-with-babel", - "moduleFileExtensions": [ - "ts", - "tsx", - "js" - ], - "transform": { - "^.+\\.(ts|tsx)$": [ - "ts-jest", - { - "tsconfig": "tsconfig.test.json" - } - ] - }, - "testMatch": [ - "**/*.(test|spec).+(ts|tsx|js)" - ], - "roots": [ - "/static/src/javascripts", - "/tools" - ], - "moduleDirectories": [ - "/static/src/javascripts", - "/static/src/javascripts/projects", - "/static/vendor/javascripts", - "node_modules" - ], - "moduleNameMapper": { - "videojs": "video.js", - "^svgs/(.*)$": "/__mocks__/svgMock.js", - "^(.*)\\.svg$": "/__mocks__/svgMock.js", - "^(.*)\\.html$": "/__mocks__/templateMock.js", - "ophan/ng": "ophan-tracker-js", - "ophan/embed": "ophan-tracker-js/build/ophan.embed" - }, - "setupFilesAfterEnv": [ - "/dev/jest.setupTestFrameworkScriptFile.js" - ], - "testEnvironment": "jest-environment-jsdom-global", - "testEnvironmentOptions": { - "url": "http://testurl.theguardian.com" - }, - "transformIgnorePatterns": [ - "/node_modules/(?!(@guardian|lodash-es|preact)/)" - ] - }, - "scripts": { - "eslint-fix": "eslint --color --fix", - "test": "jest" - }, - "prettier": "@guardian/prettier", - "packageManager": "yarn@4.1.1", - "resolutions": { - "micromatch": "4.0.8", - "unset-value": "^2.0.1" - } + "name": "@guardian/frontend", + "version": "0.1.0", + "private": true, + "engines": { + "yarn": ">=1.22.19" + }, + "files": [ + "static/src/**/*" + ], + "dependencies": { + "@aws-sdk/client-cloudwatch": "3.621.0", + "@babel/cli": "^7.24.8", + "@babel/core": "^7.25.2", + "@babel/eslint-parser": "7.25.1", + "@babel/plugin-proposal-class-properties": "^7.10.4", + "@babel/plugin-proposal-object-rest-spread": "^7.11.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-transform-runtime": "^7.24.7", + "@babel/preset-env": "^7.25.3", + "@babel/preset-react": "^7.24.7", + "@babel/preset-typescript": "^7.24.7", + "@babel/register": "^7.24.6", + "@babel/runtime": "^7.25.0", + "@braze/web-sdk-core": "3.5.1", + "@emotion/cache": "^11.13.1", + "@emotion/core": "^10.0.27", + "@emotion/react": "11.11.1", + "@emotion/styled": "^10.0.27", + "@guardian/ab-core": "8.0.0", + "@guardian/commercial": "23.1.0", + "@guardian/core-web-vitals": "6.0.0", + "@guardian/eslint-config-typescript": "9.0.1", + "@guardian/identity-auth": "3.0.0", + "@guardian/identity-auth-frontend": "4.0.0", + "@guardian/libs": "19.1.0", + "@guardian/prettier": "^8.0.1", + "@guardian/shimport": "^1.0.2", + "@guardian/source-foundations": "16.0.0", + "@guardian/source-react-components": "25.0.0", + "@guardian/source-react-components-development-kitchen": "21.0.0", + "@types/googletag": "^3.1.3", + "@types/jest": "29.5.12", + "@types/lodash-es": "^4.17.4", + "@types/webpack-env": "^1.16.2", + "@types/youtube": "^0.0.44", + "@typescript-eslint/eslint-plugin": "5.61.0", + "@typescript-eslint/parser": "8.0.1", + "amphtml-validator": "^1.0.38", + "any-observable": "^0.2.0", + "autoprefixer": "^10.3.7", + "babel-core": "^7.0.0-bridge.0", + "babel-jest": "29.7.0", + "babel-loader": "^8.1.0", + "babel-plugin-dynamic-import-node": "^2.3.3", + "bean": "~1.0.14", + "bonzo": "~2.0.0", + "bootstrap-sass": "3.4.1", + "browser-sync": "3.0.2", + "bs-fullscreen-message": "^1.1.0", + "btoa": "1.1.2", + "chalk": "^2.1.0", + "chance": "^1.0.11", + "chokidar": "^3.5.2", + "circular-dependency-plugin": "^5.0.1", + "classnames": "~2.5.1", + "copy-webpack-plugin": "6", + "core-js": "^3.38.0", + "cp-file": "^7.0.0", + "cpy": "^8.1.2", + "css-loader": "^5.2.7", + "cssstats": "^3.1.0", + "csstype": "^3.0.6", + "curl": "cujojs/curl#0.8.9", + "dialog-polyfill": "^0.5.6", + "domready": "^1.0.8", + "dynamic-import-polyfill": "^0.1.1", + "eslint": "8.56.0", + "eslint-config-prettier": "^7.1.0", + "eslint-import-resolver-webpack": "^0.13.8", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-guardian-frontend": "file:tools/eslint-plugin-guardian-frontend", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jasmine": "^2.10.1", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-react": "^7.22.0", + "eslint-plugin-react-hooks": "^4.2.0", + "execa": "^0.8.0", + "fastdom": "1.0.9", + "fence": "guardian/fence#0.2.11", + "figures": "^2.0.0", + "glob": "^7.2.0", + "gzip-size": "^3.0.0", + "hasha": "^3.0.0", + "jest": "29.7.0", + "jest-environment-jsdom": "29.7.0", + "jest-environment-jsdom-global": "4.0.0", + "listr2": "^8.2.1", + "lodash-es": "^4.17.21", + "lodash.uniq": "^4.5.0", + "mkdirp": "^1.0.4", + "mockdate": "^3.0.5", + "object-fit-videos": "^1.0.3", + "ophan-tracker-js": "1.4.0", + "ora": "^1.3.0", + "pify": "^5.0.0", + "postcss": "^8.3.10", + "postcss-pxtorem": "^6.0.0", + "preact": "^10.5.13", + "prettier": "^2.2.1", + "prettysize": "^0.1.0", + "qwery": "3.4.2", + "rangefix": "^0.2.5", + "raven-js": "^3.19.1", + "raw-loader": "^0.5.1", + "request": "^2.81.0", + "requireindex": "^1.1.0", + "rimraf": "^2.6.1", + "rxjs": "^6.6.7", + "sass": "1.77.8", + "sass-graph": "4.0.1", + "sass-loader": "14.2.1", + "sass-mq": "5.0.1", + "semver": "^5.4.1", + "split": "^1.0.0", + "stream-to-observable": "^0.2.0", + "stylelint": "^16.5.0", + "stylelint-config-standard-scss": "^13.1.0", + "svgo": "^2.3.0", + "tcp-ping": "^0.1.1", + "ts-jest": "29.1.2", + "ts-loader": "^8.0.12", + "tslib": "2.6.2", + "typescript": "5.3.3", + "uglify-js": "^3.19.2", + "video.js": "~5.3", + "videojs-contrib-ads": "3.1.3", + "videojs-embed": "guardian/videojs-embed#v0.3.3", + "videojs-ima": "googleads/videojs-ima#0.3.0", + "videojs-persistvolume": "guardian/videojs-persistvolume#0.1.4", + "videojs-playlist": "guardian/videojs-playlist#0.1.4", + "web-vitals": "3.5.1", + "webpack": "^5.79.0", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-cli": "^5.0.1", + "webpack-dev-server": "^5.0.4", + "webpack-merge": "^4.2.2", + "wolfy87-eventemitter": "~5.2.4", + "yargs": "^17.7.1" + }, + "optionalDependencies": { + "fsevents": "^2.3.2", + "react": "18.3.1", + "react-dom": "18.2.0" + }, + "jest": { + "preset": "ts-jest/presets/js-with-babel", + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ], + "transform": { + "^.+\\.(ts|tsx)$": [ + "ts-jest", + { + "tsconfig": "tsconfig.test.json" + } + ] + }, + "testMatch": [ + "**/*.(test|spec).+(ts|tsx|js)" + ], + "roots": [ + "/static/src/javascripts", + "/tools" + ], + "moduleDirectories": [ + "/static/src/javascripts", + "/static/src/javascripts/projects", + "/static/vendor/javascripts", + "node_modules" + ], + "moduleNameMapper": { + "videojs": "video.js", + "^svgs/(.*)$": "/__mocks__/svgMock.js", + "^(.*)\\.svg$": "/__mocks__/svgMock.js", + "^(.*)\\.html$": "/__mocks__/templateMock.js", + "ophan/ng": "ophan-tracker-js", + "ophan/embed": "ophan-tracker-js/build/ophan.embed" + }, + "setupFilesAfterEnv": [ + "/dev/jest.setupTestFrameworkScriptFile.js" + ], + "testEnvironment": "jest-environment-jsdom-global", + "testEnvironmentOptions": { + "url": "http://testurl.theguardian.com" + }, + "transformIgnorePatterns": [ + "/node_modules/(?!(@guardian|lodash-es|preact)/)" + ] + }, + "scripts": { + "eslint-fix": "eslint --color --fix", + "test": "jest" + }, + "prettier": "@guardian/prettier", + "packageManager": "yarn@4.1.1", + "resolutions": { + "micromatch": "4.0.8", + "unset-value": "^2.0.1" + } }