-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5012 from kobotoolbox/node-20-upgrade-CI-testing
Use Node 20, and add it to CI
- Loading branch information
Showing
9 changed files
with
88 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v16.15.0 | ||
v20.17.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v16.15.0 | ||
v20.17.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/node_modules/mocha-chrome/lib/client.js b/node_modules/mocha-chrome/lib/client.js | ||
index 7629126..cd3d163 100644 | ||
--- a/node_modules/mocha-chrome/lib/client.js | ||
+++ b/node_modules/mocha-chrome/lib/client.js | ||
@@ -9,7 +9,7 @@ module.exports = async function connectClient(instance, log, options) { | ||
return fs.readFileSync(filePath, 'utf-8'); | ||
} | ||
|
||
- const client = await CDP({ port: instance.port }); | ||
+ const client = await CDP({ port: instance.port, host: '127.0.0.1' }); | ||
const { DOM, DOMStorage, Console, Network, Page, Runtime } = client; | ||
const mochaOptions = `window.mochaOptions = ${JSON.stringify(options.mocha)}`; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,19 +56,18 @@ if (process.env.SKIP_TS_CHECK && tsCheckAffects.includes(hintName)) { | |
/* | ||
NPM VERSION WARNING | ||
Issue a warning if not running with npm 8.5.5, since the errors | ||
that you get if you run a different version are not very obvious. | ||
Issue a warning if there's a version mismatch between expected and user's | ||
version of Node or npm, since it could cause strange difficulties. | ||
- Help contributors who switched their Node version inadvertently. | ||
- Support new contributors by printing more context / steps to remedy. | ||
- Give the benefit of the doubt to developers who run a different node/npm | ||
version on purpose. So, don't process.exit(1), even on npm install. | ||
It is a bit redundant with the EBADENGINE warning issued from package.json, | ||
but this script (originally written for a bumpy >=16.15.1 upgrade) provides | ||
a bit of context. | ||
Show on preinstall. Since it's easy to miss there, also show it on other | ||
run scripts such as 'watch'. | ||
*/ | ||
const ok_node = 'v16.15.0'; | ||
const ok_npm = '8.5.5'; | ||
const ok_node = 'v20.17.0'; | ||
const ok_npm = '10.8.2'; | ||
|
||
if (process.version !== ok_node) { | ||
const blu = '\u001b[94m'; // bright blue | ||
|
@@ -79,10 +78,10 @@ if (process.version !== ok_node) { | |
console.warn(`${blu} | ||
--------------------------------------------------------------`); | ||
|
||
console.warn(`${yel} | ||
Are you running the supported version of Node and npm? | ||
console.warn(`${nrm} | ||
Are you running a supported version of Node and npm? | ||
${nrm} | ||
node ${ok_node}, npm@${ok_npm} supported`); | ||
node ${yel}${ok_node}${nrm}, ${yel}npm@${ok_npm}${nrm} supported`); | ||
|
||
// Let's be more helpful by running `npm --version` instead of making | ||
// you do it. | ||
|
@@ -110,21 +109,24 @@ if (process.version !== ok_node) { | |
// what causes the most problems. | ||
if (wrongNpm) { | ||
console.warn(` | ||
Switch to a supported Node / npm version: | ||
${blu}(This is probably OK, but it's helpful to | ||
run the same version we're using in release.)${nrm} | ||
Use Node v16.15.0, which comes with [email protected] | ||
To switch to a supported Node / npm version: | ||
Use Node ${ok_node}, which comes with npm@${ok_npm} | ||
\`nvm use\` or \`fnm use\` | ||
or \`npm install -g npm@8.5.5\` | ||
or \`npm install -g npm@${ok_npm}\` | ||
to change npm for your current Node`); | ||
|
||
console.warn(`${red} | ||
If you've run \`npm install\` with an unsupported npm version,${nrm} | ||
there may be changes in node_modules and package-lock.json | ||
console.warn(`${yel} | ||
If you've run \`npm install\` with a different npm version,${nrm} | ||
there could be changes in node_modules and package-lock.json | ||
(1) Don't commit these changes to package-lock.json | ||
(2) You may want to reset these changes and run | ||
\`npm install\` again with 8.5.5 | ||
\`npm install\` again with ${ok_npm} | ||
`); | ||
|
||
// If you switch between Node projects and see this message often, | ||
|