Skip to content

Commit bde72e3

Browse files
authored
Merge pull request #1723 from topcoder-platform/develop
[PROD RELEASE] - Feb 5 2026 (Engagements)
2 parents 65e7035 + 909f029 commit bde72e3

84 files changed

Lines changed: 14338 additions & 1324 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ workflows:
160160
context: org-global
161161
filters: &filters-dev
162162
branches:
163-
only: ["develop", "pm-2917"]
163+
only: ["develop", "pm-2917", "points", "pm-3270", "engagements"]
164164

165165
# Production builds are exectuted only on tagged commits to the
166166
# master branch.

config/constants/development.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ module.exports = {
1313
ACCOUNTS_APP_CONNECTOR_URL: `https://accounts-auth0.${DOMAIN}`,
1414
ACCOUNTS_APP_LOGIN_URL: `https://accounts-auth0.${DOMAIN}`,
1515
COMMUNITY_APP_URL: `https://www.${DOMAIN}`,
16+
ENGAGEMENTS_APP_URL: 'https://engagements.topcoder-dev.com',
1617
MEMBER_API_URL: `${DEV_API_HOSTNAME}/v6/members`,
1718
CHALLENGE_API_URL: `${DEV_API_HOSTNAME}/v6/challenges`,
19+
ENGAGEMENTS_API_URL: `${DEV_API_HOSTNAME}/v6/engagements/engagements`,
20+
ENGAGEMENTS_ROOT_API_URL: `${DEV_API_HOSTNAME}/v6/engagements`,
21+
APPLICATIONS_API_URL: `${DEV_API_HOSTNAME}/v6/engagements/applications`,
22+
TC_FINANCE_API_URL: process.env.TC_FINANCE_API_URL || `${API_V6}/finance`,
1823
CHALLENGE_DEFAULT_REVIEWERS_URL: `${DEV_API_HOSTNAME}/v6/challenge/default-reviewers`,
1924
CHALLENGE_API_VERSION: '1.1.0',
2025
CHALLENGE_TIMELINE_TEMPLATES_URL: `${DEV_API_HOSTNAME}/v6/timeline-templates`,
@@ -62,6 +67,7 @@ module.exports = {
6267
HEADER_AUTH_URLS_HREF: `https://accounts-auth0.${DOMAIN}?utm_source=community-app-main`,
6368
HEADER_AUTH_URLS_LOCATION: `https://accounts-auth0.${DOMAIN}?retUrl=%S&utm_source=community-app-main`,
6469
SKILLS_V5_API_URL: `${API_V5}/standardized-skills/skills/autocomplete`,
70+
SKILLS_V5_SKILLS_URL: `${API_V5}/standardized-skills/skills`,
6571
UPDATE_SKILLS_V5_API_URL: `${API_V5}/standardized-skills/challenge-skills`,
6672
SALESFORCE_BILLING_ACCOUNT_LINK: 'https://c.cs18.visual.force.com/apex/baredirect?id=',
6773
PROFILE_URL: 'https://profiles.topcoder-dev.com/'

config/constants/local.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ module.exports = {
2626
ACCOUNTS_APP_CONNECTOR_URL: `https://accounts-auth0.${DOMAIN}`,
2727
ACCOUNTS_APP_LOGIN_URL: `https://accounts-auth0.${DOMAIN}`,
2828
COMMUNITY_APP_URL: `https://www.${DOMAIN}`,
29+
ENGAGEMENTS_APP_URL: 'https://engagements.topcoder-dev.com',
2930

3031
// Local service URLs
3132
MEMBER_API_URL: `${LOCAL_MEMBER_API}/members`,
3233
CHALLENGE_API_URL: `${LOCAL_CHALLENGE_API}/challenges`,
34+
ENGAGEMENTS_API_URL: `${LOCAL_CHALLENGE_API}/engagements/engagements`,
35+
ENGAGEMENTS_ROOT_API_URL: `${LOCAL_CHALLENGE_API}/engagements`,
36+
APPLICATIONS_API_URL: `${LOCAL_CHALLENGE_API}/engagements/applications`,
37+
TC_FINANCE_API_URL: process.env.TC_FINANCE_API_URL || 'http://localhost:3009/v6/finance',
3338
CHALLENGE_DEFAULT_REVIEWERS_URL: `${LOCAL_CHALLENGE_API.replace(/\/v6$/, '')}/v6/challenge/default-reviewers`,
3439
CHALLENGE_API_VERSION: '1.1.0',
3540
CHALLENGE_TIMELINE_TEMPLATES_URL: `${LOCAL_CHALLENGE_API}/timeline-templates`,
@@ -90,6 +95,7 @@ module.exports = {
9095

9196
// Standardized skills API on local
9297
SKILLS_V5_API_URL: `${LOCAL_SKILLS_API_V5}/skills/autocomplete`,
98+
SKILLS_V5_SKILLS_URL: `${LOCAL_SKILLS_API_V5}/skills`,
9399
UPDATE_SKILLS_V5_API_URL: `${LOCAL_SKILLS_API_V5}/challenge-skills`,
94100

95101
SALESFORCE_BILLING_ACCOUNT_LINK: 'https://c.cs18.visual.force.com/apex/baredirect?id=',

config/constants/production.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ module.exports = {
1212
ACCOUNTS_APP_CONNECTOR_URL: process.env.ACCOUNTS_APP_CONNECTOR_URL || `https://accounts-auth0.${DOMAIN}`,
1313
ACCOUNTS_APP_LOGIN_URL: `https://accounts-auth0.${DOMAIN}`,
1414
COMMUNITY_APP_URL: `https://www.${DOMAIN}`,
15+
ENGAGEMENTS_APP_URL: 'https://engagements.topcoder.com',
1516
MEMBER_API_URL: `${PROD_API_HOSTNAME}/v6/members`,
1617
CHALLENGE_API_URL: `${PROD_API_HOSTNAME}/v6/challenges`,
18+
ENGAGEMENTS_API_URL: `${PROD_API_HOSTNAME}/v6/engagements/engagements`,
19+
ENGAGEMENTS_ROOT_API_URL: `${PROD_API_HOSTNAME}/v6/engagements`,
20+
APPLICATIONS_API_URL: `${PROD_API_HOSTNAME}/v6/engagements/applications`,
21+
TC_FINANCE_API_URL: process.env.TC_FINANCE_API_URL || `${API_V6}/finance`,
1722
CHALLENGE_DEFAULT_REVIEWERS_URL: `${PROD_API_HOSTNAME}/v6/challenge/default-reviewers`,
1823
CHALLENGE_API_VERSION: '1.1.0',
1924
CHALLENGE_TIMELINE_TEMPLATES_URL: `${PROD_API_HOSTNAME}/v6/timeline-templates`,
@@ -62,6 +67,7 @@ module.exports = {
6267
HEADER_AUTH_URLS_HREF: `https://accounts-auth0.${DOMAIN}?utm_source=community-app-main`,
6368
HEADER_AUTH_URLS_LOCATION: `https://accounts-auth0.${DOMAIN}?retUrl=%S&utm_source=community-app-main`,
6469
SKILLS_V5_API_URL: `${API_V5}/standardized-skills/skills/autocomplete`,
70+
SKILLS_V5_SKILLS_URL: `${API_V5}/standardized-skills/skills`,
6571
UPDATE_SKILLS_V5_API_URL: `${API_V5}/standardized-skills/challenge-skills`,
6672
SALESFORCE_BILLING_ACCOUNT_LINK: 'https://topcoder.my.salesforce.com/apex/baredirect?id=',
6773
PROFILE_URL: 'https://profiles.topcoder.com/'

config/formatWebpackMessages.js

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
'use strict';
9+
10+
const chalk = require('chalk');
11+
const friendlySyntaxErrorLabel = 'Syntax error:';
12+
13+
function isLikelyASyntaxError(message) {
14+
return message.indexOf(friendlySyntaxErrorLabel) !== -1;
15+
}
16+
17+
// Cleans up webpack error messages.
18+
// eslint-disable-next-line no-unused-vars
19+
function formatMessage(message, isError) {
20+
// Webpack 5 can emit warning/error objects; normalize to strings.
21+
if (typeof message !== 'string') {
22+
if (message && typeof message.message === 'string') {
23+
message = message.message;
24+
} else if (message && typeof message.stack === 'string') {
25+
message = message.stack;
26+
} else {
27+
message = String(message);
28+
}
29+
}
30+
31+
let lines = message.split('\n');
32+
33+
// Strip Webpack-added headers off errors/warnings
34+
// https://github.com/webpack/webpack/blob/master/lib/ModuleError.js
35+
lines = lines.filter(line => !/Module [A-z ]+\(from/.test(line));
36+
37+
// Transform parsing error into syntax error
38+
// TODO: move this to our ESLint formatter?
39+
lines = lines.map(line => {
40+
const parsingError = /Line (\d+):(?:(\d+):)?\s*Parsing error: (.+)$/.exec(
41+
line
42+
);
43+
if (!parsingError) {
44+
return line;
45+
}
46+
const [, errorLine, errorColumn, errorMessage] = parsingError;
47+
return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;
48+
});
49+
50+
message = lines.join('\n');
51+
// Smoosh syntax errors (commonly found in CSS)
52+
message = message.replace(
53+
/SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g,
54+
`${friendlySyntaxErrorLabel} $3 ($1:$2)\n`
55+
);
56+
// Remove columns from ESLint formatter output (we added these for more
57+
// accurate syntax errors)
58+
message = message.replace(/Line (\d+):\d+:/g, 'Line $1:');
59+
// Clean up export errors
60+
message = message.replace(
61+
/^.*export '(.+?)' was not found in '(.+?)'.*$/gm,
62+
`Attempted import error: '$1' is not exported from '$2'.`
63+
);
64+
message = message.replace(
65+
/^.*export 'default' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm,
66+
`Attempted import error: '$2' does not contain a default export (imported as '$1').`
67+
);
68+
message = message.replace(
69+
/^.*export '(.+?)' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm,
70+
`Attempted import error: '$1' is not exported from '$3' (imported as '$2').`
71+
);
72+
lines = message.split('\n');
73+
74+
// Remove leading newline
75+
if (lines.length > 2 && lines[1].trim() === '') {
76+
lines.splice(1, 1);
77+
}
78+
// Clean up file name
79+
lines[0] = lines[0].replace(/^(.*) \d+:\d+-\d+$/, '$1');
80+
81+
// Cleans up verbose "module not found" messages for files and packages.
82+
if (lines[1] && lines[1].indexOf('Module not found: ') === 0) {
83+
lines = [
84+
lines[0],
85+
lines[1]
86+
.replace('Error: ', '')
87+
.replace('Module not found: Cannot find file:', 'Cannot find file:'),
88+
];
89+
}
90+
91+
// Add helpful message for users trying to use Sass for the first time
92+
if (lines[1] && lines[1].match(/Cannot find module.+node-sass/)) {
93+
lines[1] = 'To import Sass files, you first need to install node-sass.\n';
94+
lines[1] +=
95+
'Run `npm install node-sass` or `yarn add node-sass` inside your workspace.';
96+
}
97+
98+
lines[0] = chalk.inverse(lines[0]);
99+
100+
message = lines.join('\n');
101+
// Internal stacks are generally useless so we strip them... with the
102+
// exception of stacks containing `webpack:` because they're normally
103+
// from user code generated by Webpack. For more information see
104+
// https://github.com/facebook/create-react-app/pull/1050
105+
message = message.replace(
106+
/^\s*at\s((?!webpack:).)*:\d+:\d+[\s)]*(\n|$)/gm,
107+
''
108+
); // at ... ...:x:y
109+
message = message.replace(/^\s*at\s<anonymous>(\n|$)/gm, ''); // at <anonymous>
110+
lines = message.split('\n');
111+
112+
// Remove duplicated newlines
113+
lines = lines.filter(
114+
(line, index, arr) =>
115+
index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()
116+
);
117+
118+
// Reassemble the message
119+
message = lines.join('\n');
120+
return message.trim();
121+
}
122+
123+
function formatWebpackMessages(json) {
124+
const formattedErrors = json.errors.map(function(message) {
125+
return formatMessage(message, true);
126+
});
127+
const formattedWarnings = json.warnings.map(function(message) {
128+
return formatMessage(message, false);
129+
});
130+
const result = { errors: formattedErrors, warnings: formattedWarnings };
131+
if (result.errors.some(isLikelyASyntaxError)) {
132+
// If there are any syntax errors, show just them.
133+
result.errors = result.errors.filter(isLikelyASyntaxError);
134+
}
135+
return result;
136+
}
137+
138+
module.exports = formatWebpackMessages;

config/webpack.config.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module.exports = function (webpackEnv) {
3737
const isEnvDevelopment = webpackEnv === 'development'
3838
const isEnvProduction = webpackEnv === 'production'
3939
const WM_DEBUG = /^(1|true|on|yes)$/i.test(String(process.env.WM_DEBUG || ''))
40+
const reactDevUtilsContextRegExp = /[\\/]react-dev-utils[\\/]/
4041

4142
// Webpack uses `publicPath` to determine where the app is being served from.
4243
// It requires a trailing slash, or the file assets will get an incorrect path.
@@ -60,6 +61,14 @@ module.exports = function (webpackEnv) {
6061

6162
// common function to get style loaders
6263
const getStyleLoaders = (cssOptions, preProcessor) => {
64+
const resolvedCssOptions = Object.assign(
65+
{
66+
url: {
67+
filter: url => !url.toLowerCase().startsWith('data:')
68+
}
69+
},
70+
cssOptions
71+
)
6372
const loaders = [
6473
isEnvDevelopment && require.resolve('style-loader'),
6574
isEnvProduction && {
@@ -71,7 +80,7 @@ module.exports = function (webpackEnv) {
7180
},
7281
{
7382
loader: require.resolve('css-loader'),
74-
options: cssOptions
83+
options: resolvedCssOptions
7584
},
7685
{
7786
// Options for PostCSS as we reference these options twice
@@ -476,6 +485,13 @@ module.exports = function (webpackEnv) {
476485
// This gives some necessary context to module not found errors, such as
477486
// the requesting resource.
478487
new ModuleNotFoundPlugin(paths.appPath),
488+
// Ensure the dev client tolerates webpack 5 warning/error objects.
489+
isEnvDevelopment &&
490+
new webpack.NormalModuleReplacementPlugin(/\.\/formatWebpackMessages$/, (resource) => {
491+
if (reactDevUtilsContextRegExp.test(resource.context || '')) {
492+
resource.request = path.resolve(__dirname, 'formatWebpackMessages')
493+
}
494+
}),
479495
// (DefinePlugin already added above with merged env)
480496
// This is necessary to emit hot updates (currently CSS only):
481497
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),

0 commit comments

Comments
 (0)