-
Notifications
You must be signed in to change notification settings - Fork 51
[PROD RELEASE] - Feb 5 2026 (Engagements) #1723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f372d50
d1e8a11
9c974b1
bed5a22
3023780
db99a15
0c00adb
716feb2
7ae46d5
d1abf94
5edacb4
a91aa85
46e56d1
ce6d2d5
534f702
a126dd1
9f08052
2c0f48a
a828dd1
723bf4a
11fa6da
97f497f
984db2f
c648bc0
917caf5
168b3dc
20f0c29
3cdb283
9a42d25
a903302
a192264
fb1e064
29fc7f3
a9e5872
4a8beb5
5d66635
3eaa70b
5ea1a40
9465973
84bbe66
73f230c
4333353
d1435d1
6ff326d
e79b94a
d66ada9
0e5d222
fe397bc
87071c5
e6e4ae4
1f6f10e
8f7876f
f3354a1
8931e60
bd52ae7
1a6b856
3456026
c1fb185
b6c82c2
286b824
5d692a9
672142a
59d88ad
67df58f
91ffd6f
2d4712a
2eb49ca
31a0c79
e94e663
6b65f64
62a1673
7dd486f
4a3266b
7931b8a
a267b17
8feadc9
3d0b54b
55630b8
9a6256d
d952efd
48bce3a
9000717
ced6f94
fcafa57
73d861a
1c97cb2
3c3a7c7
98cffff
3bb2d04
909f029
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,10 +26,15 @@ module.exports = { | |
| ACCOUNTS_APP_CONNECTOR_URL: `https://accounts-auth0.${DOMAIN}`, | ||
| ACCOUNTS_APP_LOGIN_URL: `https://accounts-auth0.${DOMAIN}`, | ||
| COMMUNITY_APP_URL: `https://www.${DOMAIN}`, | ||
| ENGAGEMENTS_APP_URL: 'https://engagements.topcoder-dev.com', | ||
|
|
||
| // Local service URLs | ||
| MEMBER_API_URL: `${LOCAL_MEMBER_API}/members`, | ||
| CHALLENGE_API_URL: `${LOCAL_CHALLENGE_API}/challenges`, | ||
| ENGAGEMENTS_API_URL: `${LOCAL_CHALLENGE_API}/engagements/engagements`, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| ENGAGEMENTS_ROOT_API_URL: `${LOCAL_CHALLENGE_API}/engagements`, | ||
| APPLICATIONS_API_URL: `${LOCAL_CHALLENGE_API}/engagements/applications`, | ||
| TC_FINANCE_API_URL: process.env.TC_FINANCE_API_URL || 'http://localhost:3009/v6/finance', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| CHALLENGE_DEFAULT_REVIEWERS_URL: `${LOCAL_CHALLENGE_API.replace(/\/v6$/, '')}/v6/challenge/default-reviewers`, | ||
| CHALLENGE_API_VERSION: '1.1.0', | ||
| CHALLENGE_TIMELINE_TEMPLATES_URL: `${LOCAL_CHALLENGE_API}/timeline-templates`, | ||
|
|
@@ -90,6 +95,7 @@ module.exports = { | |
|
|
||
| // Standardized skills API on local | ||
| SKILLS_V5_API_URL: `${LOCAL_SKILLS_API_V5}/skills/autocomplete`, | ||
| SKILLS_V5_SKILLS_URL: `${LOCAL_SKILLS_API_V5}/skills`, | ||
| UPDATE_SKILLS_V5_API_URL: `${LOCAL_SKILLS_API_V5}/challenge-skills`, | ||
|
|
||
| SALESFORCE_BILLING_ACCOUNT_LINK: 'https://c.cs18.visual.force.com/apex/baredirect?id=', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,8 +12,13 @@ module.exports = { | |
| ACCOUNTS_APP_CONNECTOR_URL: process.env.ACCOUNTS_APP_CONNECTOR_URL || `https://accounts-auth0.${DOMAIN}`, | ||
| ACCOUNTS_APP_LOGIN_URL: `https://accounts-auth0.${DOMAIN}`, | ||
| COMMUNITY_APP_URL: `https://www.${DOMAIN}`, | ||
| ENGAGEMENTS_APP_URL: 'https://engagements.topcoder.com', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
||
| MEMBER_API_URL: `${PROD_API_HOSTNAME}/v6/members`, | ||
| CHALLENGE_API_URL: `${PROD_API_HOSTNAME}/v6/challenges`, | ||
| ENGAGEMENTS_API_URL: `${PROD_API_HOSTNAME}/v6/engagements/engagements`, | ||
| ENGAGEMENTS_ROOT_API_URL: `${PROD_API_HOSTNAME}/v6/engagements`, | ||
| APPLICATIONS_API_URL: `${PROD_API_HOSTNAME}/v6/engagements/applications`, | ||
| TC_FINANCE_API_URL: process.env.TC_FINANCE_API_URL || `${API_V6}/finance`, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| CHALLENGE_DEFAULT_REVIEWERS_URL: `${PROD_API_HOSTNAME}/v6/challenge/default-reviewers`, | ||
| CHALLENGE_API_VERSION: '1.1.0', | ||
| CHALLENGE_TIMELINE_TEMPLATES_URL: `${PROD_API_HOSTNAME}/v6/timeline-templates`, | ||
|
|
@@ -62,6 +67,7 @@ module.exports = { | |
| HEADER_AUTH_URLS_HREF: `https://accounts-auth0.${DOMAIN}?utm_source=community-app-main`, | ||
| HEADER_AUTH_URLS_LOCATION: `https://accounts-auth0.${DOMAIN}?retUrl=%S&utm_source=community-app-main`, | ||
| SKILLS_V5_API_URL: `${API_V5}/standardized-skills/skills/autocomplete`, | ||
| SKILLS_V5_SKILLS_URL: `${API_V5}/standardized-skills/skills`, | ||
| UPDATE_SKILLS_V5_API_URL: `${API_V5}/standardized-skills/challenge-skills`, | ||
| SALESFORCE_BILLING_ACCOUNT_LINK: 'https://topcoder.my.salesforce.com/apex/baredirect?id=', | ||
| PROFILE_URL: 'https://profiles.topcoder.com/' | ||
|
|
||
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,138 @@ | |||||||||||||||||||||||||||||
| /** | |||||||||||||||||||||||||||||
| * Copyright (c) 2015-present, Facebook, Inc. | |||||||||||||||||||||||||||||
| * | |||||||||||||||||||||||||||||
| * This source code is licensed under the MIT license found in the | |||||||||||||||||||||||||||||
| * LICENSE file in the root directory of this source tree. | |||||||||||||||||||||||||||||
| */ | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| 'use strict'; | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| const chalk = require('chalk'); | |||||||||||||||||||||||||||||
| const friendlySyntaxErrorLabel = 'Syntax error:'; | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| function isLikelyASyntaxError(message) { | |||||||||||||||||||||||||||||
| return message.indexOf(friendlySyntaxErrorLabel) !== -1; | |||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| // Cleans up webpack error messages. | |||||||||||||||||||||||||||||
| // eslint-disable-next-line no-unused-vars | |||||||||||||||||||||||||||||
| function formatMessage(message, isError) { | |||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
|||||||||||||||||||||||||||||
| // Webpack 5 can emit warning/error objects; normalize to strings. | |||||||||||||||||||||||||||||
| if (typeof message !== 'string') { | |||||||||||||||||||||||||||||
| if (message && typeof message.message === 'string') { | |||||||||||||||||||||||||||||
| message = message.message; | |||||||||||||||||||||||||||||
| } else if (message && typeof message.stack === 'string') { | |||||||||||||||||||||||||||||
| message = message.stack; | |||||||||||||||||||||||||||||
| } else { | |||||||||||||||||||||||||||||
| message = String(message); | |||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| let lines = message.split('\n'); | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| // Strip Webpack-added headers off errors/warnings | |||||||||||||||||||||||||||||
| // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js | |||||||||||||||||||||||||||||
| lines = lines.filter(line => !/Module [A-z ]+\(from/.test(line)); | |||||||||||||||||||||||||||||
Check warningCode scanning / CodeQL Overly permissive regular expression range Medium
Suspicious character range that is equivalent to [A-Z[]^_`a-z].
Copilot AutofixAI about 1 month ago In general, to fix overly permissive regex ranges, replace ambiguous ranges like In this file, the best fix is to change the character class in the filter on line 35 from
Suggested changeset
1
config/formatWebpackMessages.js
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| // Transform parsing error into syntax error | |||||||||||||||||||||||||||||
| // TODO: move this to our ESLint formatter? | |||||||||||||||||||||||||||||
| lines = lines.map(line => { | |||||||||||||||||||||||||||||
| const parsingError = /Line (\d+):(?:(\d+):)?\s*Parsing error: (.+)$/.exec( | |||||||||||||||||||||||||||||
| line | |||||||||||||||||||||||||||||
| ); | |||||||||||||||||||||||||||||
| if (!parsingError) { | |||||||||||||||||||||||||||||
| return line; | |||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||
| const [, errorLine, errorColumn, errorMessage] = parsingError; | |||||||||||||||||||||||||||||
| return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`; | |||||||||||||||||||||||||||||
| }); | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| message = lines.join('\n'); | |||||||||||||||||||||||||||||
| // Smoosh syntax errors (commonly found in CSS) | |||||||||||||||||||||||||||||
| message = message.replace( | |||||||||||||||||||||||||||||
| /SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g, | |||||||||||||||||||||||||||||
| `${friendlySyntaxErrorLabel} $3 ($1:$2)\n` | |||||||||||||||||||||||||||||
| ); | |||||||||||||||||||||||||||||
| // Remove columns from ESLint formatter output (we added these for more | |||||||||||||||||||||||||||||
| // accurate syntax errors) | |||||||||||||||||||||||||||||
| message = message.replace(/Line (\d+):\d+:/g, 'Line $1:'); | |||||||||||||||||||||||||||||
| // Clean up export errors | |||||||||||||||||||||||||||||
| message = message.replace( | |||||||||||||||||||||||||||||
| /^.*export '(.+?)' was not found in '(.+?)'.*$/gm, | |||||||||||||||||||||||||||||
| `Attempted import error: '$1' is not exported from '$2'.` | |||||||||||||||||||||||||||||
| ); | |||||||||||||||||||||||||||||
| message = message.replace( | |||||||||||||||||||||||||||||
| /^.*export 'default' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm, | |||||||||||||||||||||||||||||
| `Attempted import error: '$2' does not contain a default export (imported as '$1').` | |||||||||||||||||||||||||||||
| ); | |||||||||||||||||||||||||||||
| message = message.replace( | |||||||||||||||||||||||||||||
| /^.*export '(.+?)' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm, | |||||||||||||||||||||||||||||
| `Attempted import error: '$1' is not exported from '$3' (imported as '$2').` | |||||||||||||||||||||||||||||
| ); | |||||||||||||||||||||||||||||
| lines = message.split('\n'); | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| // Remove leading newline | |||||||||||||||||||||||||||||
| if (lines.length > 2 && lines[1].trim() === '') { | |||||||||||||||||||||||||||||
| lines.splice(1, 1); | |||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||
| // Clean up file name | |||||||||||||||||||||||||||||
| lines[0] = lines[0].replace(/^(.*) \d+:\d+-\d+$/, '$1'); | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| // Cleans up verbose "module not found" messages for files and packages. | |||||||||||||||||||||||||||||
| if (lines[1] && lines[1].indexOf('Module not found: ') === 0) { | |||||||||||||||||||||||||||||
| lines = [ | |||||||||||||||||||||||||||||
| lines[0], | |||||||||||||||||||||||||||||
| lines[1] | |||||||||||||||||||||||||||||
| .replace('Error: ', '') | |||||||||||||||||||||||||||||
| .replace('Module not found: Cannot find file:', 'Cannot find file:'), | |||||||||||||||||||||||||||||
| ]; | |||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| // Add helpful message for users trying to use Sass for the first time | |||||||||||||||||||||||||||||
| if (lines[1] && lines[1].match(/Cannot find module.+node-sass/)) { | |||||||||||||||||||||||||||||
| lines[1] = 'To import Sass files, you first need to install node-sass.\n'; | |||||||||||||||||||||||||||||
| lines[1] += | |||||||||||||||||||||||||||||
| 'Run `npm install node-sass` or `yarn add node-sass` inside your workspace.'; | |||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| lines[0] = chalk.inverse(lines[0]); | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| message = lines.join('\n'); | |||||||||||||||||||||||||||||
| // Internal stacks are generally useless so we strip them... with the | |||||||||||||||||||||||||||||
| // exception of stacks containing `webpack:` because they're normally | |||||||||||||||||||||||||||||
| // from user code generated by Webpack. For more information see | |||||||||||||||||||||||||||||
| // https://github.com/facebook/create-react-app/pull/1050 | |||||||||||||||||||||||||||||
| message = message.replace( | |||||||||||||||||||||||||||||
| /^\s*at\s((?!webpack:).)*:\d+:\d+[\s)]*(\n|$)/gm, | |||||||||||||||||||||||||||||
| '' | |||||||||||||||||||||||||||||
| ); // at ... ...:x:y | |||||||||||||||||||||||||||||
| message = message.replace(/^\s*at\s<anonymous>(\n|$)/gm, ''); // at <anonymous> | |||||||||||||||||||||||||||||
| lines = message.split('\n'); | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| // Remove duplicated newlines | |||||||||||||||||||||||||||||
| lines = lines.filter( | |||||||||||||||||||||||||||||
| (line, index, arr) => | |||||||||||||||||||||||||||||
| index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim() | |||||||||||||||||||||||||||||
| ); | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| // Reassemble the message | |||||||||||||||||||||||||||||
| message = lines.join('\n'); | |||||||||||||||||||||||||||||
| return message.trim(); | |||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| function formatWebpackMessages(json) { | |||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
|||||||||||||||||||||||||||||
| const formattedErrors = json.errors.map(function(message) { | |||||||||||||||||||||||||||||
| return formatMessage(message, true); | |||||||||||||||||||||||||||||
| }); | |||||||||||||||||||||||||||||
| const formattedWarnings = json.warnings.map(function(message) { | |||||||||||||||||||||||||||||
| return formatMessage(message, false); | |||||||||||||||||||||||||||||
| }); | |||||||||||||||||||||||||||||
| const result = { errors: formattedErrors, warnings: formattedWarnings }; | |||||||||||||||||||||||||||||
| if (result.errors.some(isLikelyASyntaxError)) { | |||||||||||||||||||||||||||||
| // If there are any syntax errors, show just them. | |||||||||||||||||||||||||||||
| result.errors = result.errors.filter(isLikelyASyntaxError); | |||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||
| return result; | |||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| module.exports = formatWebpackMessages; | |||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,7 @@ module.exports = function (webpackEnv) { | |
| const isEnvDevelopment = webpackEnv === 'development' | ||
| const isEnvProduction = webpackEnv === 'production' | ||
| const WM_DEBUG = /^(1|true|on|yes)$/i.test(String(process.env.WM_DEBUG || '')) | ||
| const reactDevUtilsContextRegExp = /[\\/]react-dev-utils[\\/]/ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
||
|
|
||
| // Webpack uses `publicPath` to determine where the app is being served from. | ||
| // It requires a trailing slash, or the file assets will get an incorrect path. | ||
|
|
@@ -60,6 +61,14 @@ module.exports = function (webpackEnv) { | |
|
|
||
| // common function to get style loaders | ||
| const getStyleLoaders = (cssOptions, preProcessor) => { | ||
| const resolvedCssOptions = Object.assign( | ||
| { | ||
| url: { | ||
| filter: url => !url.toLowerCase().startsWith('data:') | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| } | ||
| }, | ||
| cssOptions | ||
| ) | ||
| const loaders = [ | ||
| isEnvDevelopment && require.resolve('style-loader'), | ||
| isEnvProduction && { | ||
|
|
@@ -71,7 +80,7 @@ module.exports = function (webpackEnv) { | |
| }, | ||
| { | ||
| loader: require.resolve('css-loader'), | ||
| options: cssOptions | ||
| options: resolvedCssOptions | ||
| }, | ||
| { | ||
| // Options for PostCSS as we reference these options twice | ||
|
|
@@ -476,6 +485,13 @@ module.exports = function (webpackEnv) { | |
| // This gives some necessary context to module not found errors, such as | ||
| // the requesting resource. | ||
| new ModuleNotFoundPlugin(paths.appPath), | ||
| // Ensure the dev client tolerates webpack 5 warning/error objects. | ||
| isEnvDevelopment && | ||
| new webpack.NormalModuleReplacementPlugin(/\.\/formatWebpackMessages$/, (resource) => { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| if (reactDevUtilsContextRegExp.test(resource.context || '')) { | ||
| resource.request = path.resolve(__dirname, 'formatWebpackMessages') | ||
| } | ||
| }), | ||
| // (DefinePlugin already added above with merged env) | ||
| // This is necessary to emit hot updates (currently CSS only): | ||
| isEnvDevelopment && new webpack.HotModuleReplacementPlugin(), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[⚠️
correctness]Using
process.env.TC_FINANCE_API_URLas a fallback is good, but ensure that this environment variable is set in all environments where this code will run to avoid unexpected behavior.