build: bump to node 18.20 to support v18 (#55162)

The v18 CLI requires node `^18.19.1`, so we need to bump the node version to be able to run ADEV with v18.

PR Close #55162
This commit is contained in:
Matthieu Riegler
2024-04-12 14:51:44 -07:00
committed by Andrew Scott
parent 6534c035c0
commit 5cf5f04460
7 changed files with 55 additions and 21 deletions
+1 -1
View File
@@ -1 +1 @@
18.18.2
18.20.0
+8 -8
View File
@@ -64,16 +64,16 @@ load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "nodejs",
node_repositories = {
"18.18.2-darwin_arm64": ("node-v18.18.2-darwin-arm64.tar.gz", "node-v18.18.2-darwin-arm64", "9f982cc91b28778dd8638e4f94563b0c2a1da7aba62beb72bd427721035ab553"),
"18.18.2-darwin_amd64": ("node-v18.18.2-darwin-x64.tar.gz", "node-v18.18.2-darwin-x64", "5bb8da908ed590e256a69bf2862238c8a67bc4600119f2f7721ca18a7c810c0f"),
"18.18.2-linux_arm64": ("node-v18.18.2-linux-arm64.tar.xz", "node-v18.18.2-linux-arm64", "2e630e18548627f61eaf573233da7949dc0a1df5eef3f486fa9820c5f6c121aa"),
"18.18.2-linux_ppc64le": ("node-v18.18.2-linux-ppc64le.tar.xz", "node-v18.18.2-linux-ppc64le", "b0adff5cf5938266b711d6c724fb134d802e0dee40b3a3f73d162de1b3d11880"),
"18.18.2-linux_s390x": ("node-v18.18.2-linux-s390x.tar.xz", "node-v18.18.2-linux-s390x", "c70ec2074b5e2b42c55bb4b8105418b67bf8a61c500d9376a07430dfcc341fdb"),
"18.18.2-linux_amd64": ("node-v18.18.2-linux-x64.tar.xz", "node-v18.18.2-linux-x64", "75aba25ae76999309fc6c598efe56ce53fbfc221381a44a840864276264ab8ac"),
"18.18.2-windows_amd64": ("node-v18.18.2-win-x64.zip", "node-v18.18.2-win-x64", "3bb0e51e579a41a22b3bf6cb2f3e79c03801aa17acbe0ca00fc555d1282e7acd"),
"18.20.0-darwin_arm64": ("node-v18.20.0-darwin-arm64.tar.gz", "node-v18.20.0-darwin-arm64", "10066ad4dd9e03ea5c4c45ef8775420ff37b860de09bbdf87b97e0c07b1ea036"),
"18.20.0-darwin_amd64": ("node-v18.20.0-darwin-x64.tar.gz", "node-v18.20.0-darwin-x64", "062ba71618e88e06321de5caa038843c350aababa2d315f3ca7b8551f8e66c1c"),
"18.20.0-linux_arm64": ("node-v18.20.0-linux-arm64.tar.xz", "node-v18.20.0-linux-arm64", "afe51da9ffb38ac1e3a20d9a06efd403ced4bf8831ab554a02a088dd8392fd79"),
"18.20.0-linux_ppc64le": ("node-v18.20.0-linux-ppc64le.tar.xz", "node-v18.20.0-linux-ppc64le", "9e652bbf53a3e37285b11dfb9d6a9bb8b02010c3b50e5c8229d4cc10e72681da"),
"18.20.0-linux_s390x": ("node-v18.20.0-linux-s390x.tar.xz", "node-v18.20.0-linux-s390x", "a6c2a5796b9d9e9bf21da62ec89ff30b41a8108880b9eaa3c912f1ce795a7743"),
"18.20.0-linux_amd64": ("node-v18.20.0-linux-x64.tar.xz", "node-v18.20.0-linux-x64", "03eea148e56785babb27930b05ed6bf311aaa3bc573c0399dd63cad2fe5713c7"),
"18.20.0-windows_amd64": ("node-v18.20.0-win-x64.zip", "node-v18.20.0-win-x64", "1c0aab05cc6836a8f5148cca345b92ebc948a4a2013f18d117b7ade6ff05aca6"),
},
# We need at least Node 18.17 due to some transitive dependencies.
node_version = "18.18.2",
node_version = "18.20.0",
)
# Download npm dependencies.
+4 -3
View File
@@ -24,8 +24,8 @@
"/ ": "",
"postinstall": "node --preserve-symlinks --preserve-symlinks-main ./tools/postinstall-patches.js && patch-package --patch-dir tools/esm-interop/patches/npm && patch-package --patch-dir tools/npm-patches",
"prepare": "husky",
"ng-dev": "ts-node --esm --project .ng-dev/tsconfig.json --transpile-only node_modules/@angular/ng-dev/bundles/cli.mjs",
"build": "ts-node --esm --project scripts/tsconfig.json scripts/build/build-packages-dist.mts",
"ng-dev": "tsx --tsconfig .ng-dev/tsconfig.json node_modules/@angular/ng-dev/bundles/cli.mjs",
"build": "tsx --tsconfig scripts/tsconfig.json scripts/build/build-packages-dist.mts",
"test": "bazelisk test",
"test:ci": "bazelisk test -- //... -//integration/... -//adev/... -//devtools/... -//aio/...",
"test-tsec": "bazelisk test //... --build_tag_filters=tsec --test_tag_filters=tsec",
@@ -45,7 +45,7 @@
"devtools:test": "bazelisk test --config snapshot-build --//devtools/projects/shell-browser/src:flag_browser=chrome -- //devtools/...",
"docs": "[[ -n $CI ]] && echo 'Cannot run this yarn script on CI' && exit 1 || yarn bazel run //adev:serve --fast_adev",
"docs:build": "[[ -n $CI ]] && echo 'Cannot run this yarn script on CI' && exit 1 || yarn bazel build //adev:build --fast_adev",
"benchmarks": "ts-node --esm scripts/benchmarks/index.mts"
"benchmarks": "tsx --tsconfig=scripts/tsconfig.json scripts/benchmarks/index.mts"
},
"// 1": "dependencies are used locally and by bazel",
"dependencies": {
@@ -141,6 +141,7 @@
"todomvc-common": "^1.0.5",
"tslib": "^2.3.0",
"tslint": "6.1.3",
"tsx": "^4.7.2",
"typescript": "5.4.2",
"webtreemap": "^2.0.1",
"ws": "^8.15.0",
@@ -0,0 +1,13 @@
diff --git a/node_modules/@angular/ng-dev/bundles/chunk-UNUYI25Y.mjs b/node_modules/@angular/ng-dev/bundles/chunk-UNUYI25Y.mjs
index ff6ab3e..58998e7 100755
--- a/node_modules/@angular/ng-dev/bundles/chunk-UNUYI25Y.mjs
+++ b/node_modules/@angular/ng-dev/bundles/chunk-UNUYI25Y.mjs
@@ -820,7 +820,7 @@ function getCachedConfig() {
}
// bazel-out/k8-fastbuild/bin/ng-dev/utils/config.js
-var CONFIG_FILE_PATH = ".ng-dev/config.mjs";
+var CONFIG_FILE_PATH = ".ng-dev/config.mts";
var USER_CONFIG_FILE_PATH = ".ng-dev.user";
var userConfig = null;
var setConfig = setCachedConfig;
+3 -1
View File
@@ -11,7 +11,9 @@ const Lint = require('tslint');
// Custom rule that registers all of the custom rules, written in TypeScript, with ts-node.
// This is necessary, because `tslint` and IDEs won't execute any rules that aren't in a .js file.
require('ts-node').register();
require('ts-node').register({
project: path.join(__dirname, '../../tsconfig-tslint.json'),
});
// Add a noop rule so tslint doesn't complain.
exports.Rule = class Rule extends Lint.Rules.AbstractRule {
+2 -1
View File
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"allowJs": true
"allowJs": true,
"esModuleInterop": true
},
"include": [
"packages/**/*",
+24 -7
View File
@@ -395,7 +395,6 @@
"@angular/build-tooling@https://github.com/angular/dev-infra-private-build-tooling-builds.git#dbc38030d8201fe5bf1f90313667563fc7d84146":
version "0.0.0-375d0b78a4921f80cb51251b752f35c4b951091a"
uid dbc38030d8201fe5bf1f90313667563fc7d84146
resolved "https://github.com/angular/dev-infra-private-build-tooling-builds.git#dbc38030d8201fe5bf1f90313667563fc7d84146"
dependencies:
"@angular-devkit/build-angular" "17.3.3"
@@ -504,7 +503,6 @@
"@angular/docs@https://github.com/angular/dev-infra-private-docs-builds.git#2baf8cb925305d55d0ea2e54086e7012c576e5b2":
version "0.0.0-375d0b78a4921f80cb51251b752f35c4b951091a"
uid "2baf8cb925305d55d0ea2e54086e7012c576e5b2"
resolved "https://github.com/angular/dev-infra-private-docs-builds.git#2baf8cb925305d55d0ea2e54086e7012c576e5b2"
dependencies:
"@angular/cdk" "18.0.0-next.3"
@@ -646,7 +644,6 @@
"@angular/ng-dev@https://github.com/angular/dev-infra-private-ng-dev-builds.git#d10a5d49f160594a93a4cc03d52c40cbf249f8e2":
version "0.0.0-375d0b78a4921f80cb51251b752f35c4b951091a"
uid d10a5d49f160594a93a4cc03d52c40cbf249f8e2
resolved "https://github.com/angular/dev-infra-private-ng-dev-builds.git#d10a5d49f160594a93a4cc03d52c40cbf249f8e2"
dependencies:
"@yarnpkg/lockfile" "^1.1.0"
@@ -7501,8 +7498,7 @@ domhandler@^5.0.2, domhandler@^5.0.3:
domelementtype "^2.3.0"
"domino@https://github.com/angular/domino.git#9e7881d2ac1e5977cefbc557f935931ec23f6658":
version "2.1.6+git"
uid "9e7881d2ac1e5977cefbc557f935931ec23f6658"
version "2.1.6"
resolved "https://github.com/angular/domino.git#9e7881d2ac1e5977cefbc557f935931ec23f6658"
dompurify@^3.0.5:
@@ -7877,7 +7873,7 @@ [email protected]:
"@esbuild/win32-ia32" "0.20.1"
"@esbuild/win32-x64" "0.20.1"
esbuild@^0.19.3:
esbuild@^0.19.3, esbuild@~0.19.10:
version "0.19.12"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.12.tgz#dc82ee5dc79e82f5a5c3b4323a2a641827db3e04"
integrity sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==
@@ -8836,6 +8832,13 @@ get-symbol-description@^1.0.2:
es-errors "^1.3.0"
get-intrinsic "^1.2.4"
get-tsconfig@^4.7.2:
version "4.7.3"
resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.3.tgz#0498163d98f7b58484dd4906999c0c9d5f103f83"
integrity sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==
dependencies:
resolve-pkg-maps "^1.0.0"
get-uri@^6.0.1:
version "6.0.3"
resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.3.tgz#0d26697bc13cf91092e519aa63aa60ee5b6f385a"
@@ -13594,6 +13597,11 @@ resolve-options@^2.0.0:
dependencies:
value-or-function "^4.0.0"
resolve-pkg-maps@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f"
integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==
[email protected]:
version "5.0.0"
resolved "https://registry.yarnpkg.com/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz#ee3142fb1f1e0d9db9524d539cfa166e9314f795"
@@ -13919,7 +13927,6 @@ [email protected]:
"sauce-connect@https://saucelabs.com/downloads/sc-4.9.1-linux.tar.gz":
version "0.0.0"
uid "9310bc860f7870a1f872b11c4dc6073a1ad34e5e"
resolved "https://saucelabs.com/downloads/sc-4.9.1-linux.tar.gz#9310bc860f7870a1f872b11c4dc6073a1ad34e5e"
[email protected], saucelabs@^1.5.0, saucelabs@^4.6.3:
@@ -15295,6 +15302,16 @@ tsutils@^2.29.0:
dependencies:
tslib "^1.8.1"
tsx@^4.7.2:
version "4.7.2"
resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.7.2.tgz#a108b1a6e16876cd4c9a4b4ba263f2a07f9cf562"
integrity sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==
dependencies:
esbuild "~0.19.10"
get-tsconfig "^4.7.2"
optionalDependencies:
fsevents "~2.3.3"
tuf-js@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-2.2.0.tgz#4daaa8620ba7545501d04dfa933c98abbcc959b9"