Skip to content
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

ci: add Node.js v20 #3739

Merged
merged 5 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x, 16.x, 18.x, 19.x]
node-version: [14.x, 16.x, 18.x, 20.x]
shard: ["1/4", "2/4", "3/4", "4/4"]
webpack-version: [latest]
dev-server-version: [latest]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"style-loader": "^3.3.1",
"ts-jest": "^29.0.1",
"ts-loader": "^9.3.1",
"ts-node": "^10.8.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.4",
"webpack": "^5.72.0",
"webpack-bundle-analyzer": "^4.5.0",
Expand Down
5 changes: 4 additions & 1 deletion test/build/config-format/typescript-esnext/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"type": "module"
"type": "module",
"engines": {
"node": ">=14.15.0"
}
}
11 changes: 10 additions & 1 deletion test/build/config-format/typescript-esnext/typescript.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@ describe("webpack cli", () => {
return;
}

const env = { ...process.env };

if (majorNodeVersion >= 20) {
// Node.js 20+ change logic, so we need to force esm config loading for test purposes
env.WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG = true;
}

const { exitCode, stderr, stdout } = await run(__dirname, ["-c", "./webpack.config.ts"], {
nodeOptions: ["--loader=ts-node/esm"],
nodeOptions: ["--experimental-loader=ts-node/esm"],
env,
});

expect(stderr).not.toBeFalsy(); // Deprecation warning logs on stderr
expect(stdout).toBeTruthy();
expect(exitCode).toBe(0);
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9700,7 +9700,7 @@ ts-loader@^9.3.1:
micromatch "^4.0.0"
semver "^7.3.4"

ts-node@^10.8.0, ts-node@^10.8.1:
ts-node@^10.8.1, ts-node@^10.9.1:
version "10.9.1"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b"
integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==
Expand Down