From e337c04acd41e4731cafd72f69ee0667fd05c87d Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 15 Mar 2024 12:28:40 +1100 Subject: [PATCH 1/5] Better access control headers PROD-4372 --- config/webpack/development.js | 1 + config/webpack/production.js | 1 + config/webpack/qa.js | 1 + 3 files changed, 3 insertions(+) diff --git a/config/webpack/development.js b/config/webpack/development.js index bc853989aa..54ee2dcb03 100644 --- a/config/webpack/development.js +++ b/config/webpack/development.js @@ -13,6 +13,7 @@ const standardDevelopmentConfig = configFactory({ main: './src/client', }, publicPath: '/api/cdn/public/static-assets', + crossOriginLoading: 'anonymous', }); const jsxRule = standardDevelopmentConfig.module.rules.find(rule => rule.loader === 'babel-loader'); diff --git a/config/webpack/production.js b/config/webpack/production.js index ab95dbac37..89010e8953 100644 --- a/config/webpack/production.js +++ b/config/webpack/production.js @@ -20,6 +20,7 @@ const standardDevelopmentConfig = configFactory({ }, keepBuildInfo: Boolean(global.KEEP_BUILD_INFO), publicPath, + crossOriginLoading: 'anonymous', }); const jsxRule = standardDevelopmentConfig.module.rules.find(rule => rule.loader === 'babel-loader'); diff --git a/config/webpack/qa.js b/config/webpack/qa.js index 388f95a4ab..b04db2dcaf 100644 --- a/config/webpack/qa.js +++ b/config/webpack/qa.js @@ -25,6 +25,7 @@ const standardDevelopmentConfig = configFactory({ }, keepBuildInfo: Boolean(global.KEEP_BUILD_INFO), publicPath, + crossOriginLoading: 'anonymous', }); const jsxRule = standardDevelopmentConfig.module.rules.find(rule => rule.loader === 'babel-loader'); From 7adcba5713be4752b713add502feeb946fcf1ffe Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 15 Mar 2024 14:22:37 +1100 Subject: [PATCH 2/5] Updated package.json for new react-utils version for PROD-4372 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b780139693..97a124b0ad 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "tc-ui": "^1.0.12", "topcoder-react-lib": "1.2.14", "topcoder-react-ui-kit": "2.0.1", - "topcoder-react-utils": "0.7.8", + "topcoder-react-utils": "github:topcoder-platform/topcoder-react-utils#0.9.3", "turndown": "^4.0.2", "uninav-react": "git+https://github.com/topcoder-platform/uninav-react.git#0.0.2", "url-parse": "^1.4.1", From ad9f80439f84c0df6284bf5f3e99135f1461d54a Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 15 Mar 2024 14:54:20 +1100 Subject: [PATCH 3/5] Update reference to react utils version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 97a124b0ad..3fdc1c444e 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "tc-ui": "^1.0.12", "topcoder-react-lib": "1.2.14", "topcoder-react-ui-kit": "2.0.1", - "topcoder-react-utils": "github:topcoder-platform/topcoder-react-utils#0.9.3", + "topcoder-react-utils": "github:topcoder-platform/topcoder-react-utils#v0.9.3", "turndown": "^4.0.2", "uninav-react": "git+https://github.com/topcoder-platform/uninav-react.git#0.0.2", "url-parse": "^1.4.1", From e2464a634fa82318ac71e1429cd2092d708f6504 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 15 Mar 2024 15:43:49 +1100 Subject: [PATCH 4/5] Updated react-utils version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3fdc1c444e..45c9302fe6 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "tc-ui": "^1.0.12", "topcoder-react-lib": "1.2.14", "topcoder-react-ui-kit": "2.0.1", - "topcoder-react-utils": "github:topcoder-platform/topcoder-react-utils#v0.9.3", + "topcoder-react-utils": "github:topcoder-platform/topcoder-react-utils#v0.9.5", "turndown": "^4.0.2", "uninav-react": "git+https://github.com/topcoder-platform/uninav-react.git#0.0.2", "url-parse": "^1.4.1", From 24db7ac1ce1c93842fa075c25b7d7fbad5aebddf Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 15 Mar 2024 05:04:14 +0000 Subject: [PATCH 5/5] Update tests --- .../BadgesModal/__snapshots__/index.jsx.snap | 4 +- .../GalleryModal/__snapshots__/index.jsx.snap | 4 +- .../__snapshots__/JoinCommunity.jsx.snap | 4 +- package-lock.json | 87 ++++++++++++++++++- 4 files changed, 90 insertions(+), 9 deletions(-) diff --git a/__tests__/shared/components/ProfilePage/BadgesModal/__snapshots__/index.jsx.snap b/__tests__/shared/components/ProfilePage/BadgesModal/__snapshots__/index.jsx.snap index 1ba79c3fd6..d1fe5e89ef 100644 --- a/__tests__/shared/components/ProfilePage/BadgesModal/__snapshots__/index.jsx.snap +++ b/__tests__/shared/components/ProfilePage/BadgesModal/__snapshots__/index.jsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders achievements correctly 1`] = ` - - + `; diff --git a/__tests__/shared/components/ProfilePage/Stats/SubTrackChallengeView/GalleryModal/__snapshots__/index.jsx.snap b/__tests__/shared/components/ProfilePage/Stats/SubTrackChallengeView/GalleryModal/__snapshots__/index.jsx.snap index 5d9362487e..41f4f357c9 100644 --- a/__tests__/shared/components/ProfilePage/Stats/SubTrackChallengeView/GalleryModal/__snapshots__/index.jsx.snap +++ b/__tests__/shared/components/ProfilePage/Stats/SubTrackChallengeView/GalleryModal/__snapshots__/index.jsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders gallery modal 1`] = ` - - + `; diff --git a/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap b/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap index 653f417362..edd0c75282 100644 --- a/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap +++ b/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap @@ -110,7 +110,7 @@ exports[`Matches shallow shapshot 4`] = ` > Join Community - Return to the Community - + `; diff --git a/package-lock.json b/package-lock.json index 7b1c9fa740..9423834165 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26128,12 +26128,93 @@ "react-css-super-themr": "^2.2.0", "react-dom": "^16.4.1", "topcoder-react-utils": "^0.7.8" + }, + "dependencies": { + "config": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/config/-/config-3.3.11.tgz", + "integrity": "sha512-Dhn63ZoWCW5EMg4P0Sl/XNsj/7RLiUIA1x1npCy+m2cRwRHzLnt3UtYtxRDMZW/6oOMdWhCzaGYkOcajGgrAOA==", + "requires": { + "json5": "^2.2.3" + } + }, + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" + }, + "react-redux": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-6.0.1.tgz", + "integrity": "sha512-T52I52Kxhbqy/6TEfBv85rQSDz6+Y28V/pf52vDWs1YRXG19mcFOGfHnY2HsNFHyhP+ST34Aih98fvt6tqwVcQ==", + "requires": { + "@babel/runtime": "^7.3.1", + "hoist-non-react-statics": "^3.3.0", + "invariant": "^2.2.4", + "loose-envify": "^1.4.0", + "prop-types": "^15.7.2", + "react-is": "^16.8.2" + } + }, + "redux": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "requires": { + "@babel/runtime": "^7.9.2" + } + }, + "serialize-javascript": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", + "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==" + }, + "topcoder-react-utils": { + "version": "0.7.9", + "resolved": "https://registry.npmjs.org/topcoder-react-utils/-/topcoder-react-utils-0.7.9.tgz", + "integrity": "sha512-bH5t7lVTezl3rh2S1pguMWhUlJb39gOLLkCG9jwLCsMKTzri+LsOvpRJ6dOvYZPzA7GdmCgQNeGAoctiqAGb4g==", + "requires": { + "@babel/register": "^7.0.0", + "@babel/runtime": "^7.0.0", + "body-parser": "^1.18.3", + "command-line-args": "^5.0.2", + "command-line-usage": "^5.0.5", + "compression": "^1.7.3", + "config": "^3.0.1", + "cookie-parser": "^1.4.3", + "cross-env": "^5.2.0", + "express": "^4.16.4", + "helmet": "^3.15.0", + "lodash": "^4.17.11", + "moment": "^2.23.0", + "morgan": "^1.9.1", + "node-forge": "^0.7.6", + "prop-types": "^15.6.2", + "raf": "^3.4.1", + "react": "^16.7.0", + "react-css-super-themr": "^2.2.0", + "react-dom": "^16.7.0", + "react-helmet": "^5.2.0", + "react-redux": "^6.0.0", + "react-router-dom": "^4.3.1", + "redux": "^4.0.1", + "redux-actions": "^2.6.4", + "redux-devtools": "^3.5.0", + "redux-devtools-dock-monitor": "^1.1.3", + "redux-devtools-log-monitor": "^1.4.0", + "redux-promise": "^0.6.0", + "request-ip": "^2.1.3", + "serialize-javascript": "^1.6.0", + "serve-favicon": "^2.5.0", + "shortid": "^2.2.14", + "url-parse": "^1.4.4" + } + } } }, "topcoder-react-utils": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/topcoder-react-utils/-/topcoder-react-utils-0.7.8.tgz", - "integrity": "sha512-/QW4HMCce2Bc7RZ82d26Wzyit6kyrv2wuLwpzUttWwKbufg85uOx/f188Qu7yzas7Y+D85Rk6PCWiw/V88sRyQ==", + "version": "github:topcoder-platform/topcoder-react-utils#0fcf9a756a371e0ad633636ba050a7881d862cb8", + "from": "github:topcoder-platform/topcoder-react-utils#v0.9.5", "requires": { "babel-runtime": "^6.26.0", "body-parser": "^1.18.3",