Skip to content

Commit 78c6d97

Browse files
devversionmmalerba
authored andcommitted
build: update to rules_nodejs v3.3.0
Updates to the latest version of `rules_nodejs` that supports the most recent NodeJS lts version v14.16.1. Additionally the latest version of `rules_nodejs` provides a package for runfile resolution w/ types that we can leverage.
1 parent b722fcf commit 78c6d97

File tree

11 files changed

+68
-58
lines changed

11 files changed

+68
-58
lines changed

WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
88
# Add NodeJS rules
99
http_archive(
1010
name = "build_bazel_rules_nodejs",
11-
sha256 = "bfacf15161d96a6a39510e7b3d3b522cf61cb8b82a31e79400a84c5abcab5347",
12-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.2.1/rules_nodejs-3.2.1.tar.gz"],
11+
sha256 = "f533eeefc8fe1ddfe93652ec50f82373d0c431f7faabd5e6323f6903195ef227",
12+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.3.0/rules_nodejs-3.3.0.tar.gz"],
1313
)
1414

1515
# Add sass rules

integration/ts-compat/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ typescript_version_packages = [
3131
"//src/material:npm_package",
3232
"//src/material-experimental:npm_package",
3333
"//src/youtube-player:npm_package",
34+
"@npm//@bazel/runfiles",
3435
"@npm//shelljs",
3536
"@npm//%s" % ts_pkg_name,
3637
"@npm//@types/node",

integration/ts-compat/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const {relative, sep, join} = require('path');
22
const {readdirSync, readFileSync, existsSync, unlinkSync} = require('fs');
33
const {set, ln, rm, mkdir} = require('shelljs');
44
const {fork} = require('child_process');
5-
const runfiles = require(process.env.BAZEL_NODE_RUNFILES_HELPER);
5+
const {runfiles} = require('@bazel/runfiles');
66

77
// Exit if any command fails.
88
set('-e');

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,16 @@
8181
"@angular/platform-server": "^12.0.0-next.7",
8282
"@angular/router": "^12.0.0-next.7",
8383
"@axe-core/webdriverjs": "^4.1.0",
84-
"@bazel/bazelisk": "^1.4.0",
85-
"@bazel/buildifier": "^4.0.0",
84+
"@bazel/bazelisk": "1.7.5",
85+
"@bazel/buildifier": "4.0.1",
8686
"@bazel/concatjs": "3.2.1",
87-
"@bazel/ibazel": "^0.14.0",
88-
"@bazel/jasmine": "3.2.1",
89-
"@bazel/protractor": "3.2.1",
90-
"@bazel/rollup": "3.2.1",
91-
"@bazel/terser": "3.2.2",
92-
"@bazel/typescript": "3.2.1",
87+
"@bazel/ibazel": "0.15.8",
88+
"@bazel/jasmine": "3.3.0",
89+
"@bazel/protractor": "3.3.0",
90+
"@bazel/rollup": "3.3.0",
91+
"@bazel/runfiles": "^3.3.0",
92+
"@bazel/terser": "3.3.0",
93+
"@bazel/typescript": "3.3.0",
9394
"@firebase/app-types": "^0.6.1",
9495
"@material/animation": "11.0.0-canary.15604bd0d.0",
9596
"@material/auto-init": "11.0.0-canary.15604bd0d.0",
@@ -222,7 +223,7 @@
222223
"yaml": "^1.10.0"
223224
},
224225
"resolutions": {
225-
"browser-sync-client" : "2.26.13",
226+
"browser-sync-client": "2.26.13",
226227
"dgeni-packages/typescript": "4.2.3"
227228
}
228229
}

src/cdk/schematics/testing/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ts_library(
1414
deps = [
1515
"@npm//@angular-devkit/core",
1616
"@npm//@angular-devkit/schematics",
17+
"@npm//@bazel/runfiles",
1718
"@npm//@schematics/angular",
1819
"@npm//@types/fs-extra",
1920
"@npm//@types/glob",

src/cdk/schematics/testing/resolve-bazel-path.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ export function resolveBazelPath(parent: string, relativePath: string) {
1818
if (process.env['RUNFILES_MANIFEST_ONLY'] !== '1') {
1919
return path.join(parent, relativePath);
2020
}
21-
// Imports the runfile helpers from the Bazel NodeJS rules. This should be ideally
22-
// a separate package with types. https://github.com/bazelbuild/rules_nodejs/issues/1793.
2321
// Note: We don't want to import this outside of this function as the runfile helpers are
2422
// quite large we don't want to load them for every import to `@angular/cdk/testing/private`.
25-
const runfiles = require(process.env['BAZEL_NODE_RUNFILES_HELPER']!);
23+
const {runfiles} = require('@bazel/runfiles');
2624
const projectDirs = [
2725
// Workspace symlinked into `@npm//:node_modules/`.
2826
path.join(runfiles.resolve('npm/node_modules'), runfiles.workspace),

src/cdk/testing/tests/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ ts_library(
8787
":test_harnesses",
8888
"//src/cdk/testing",
8989
"//src/cdk/testing/webdriver",
90+
"@npm//@bazel/runfiles",
9091
"@npm//@types/jasmine",
9192
"@npm//@types/node",
9293
"@npm//@types/selenium-webdriver",

src/cdk/testing/tests/webdriver.e2e.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {runfiles} from '@bazel/runfiles';
12
import {HarnessLoader, parallel} from '@angular/cdk/testing';
23
import {waitForAngularReady, WebDriverHarnessEnvironment} from '@angular/cdk/testing/webdriver';
34
import * as webdriver from 'selenium-webdriver';
@@ -22,7 +23,6 @@ if (process.env['WEB_TEST_METADATA'] === undefined) {
2223
process.exit(1);
2324
}
2425

25-
const runfiles = require(process.env['BAZEL_NODE_RUNFILES_HELPER']!);
2626
const webTestMetadata: WebTestMetadata =
2727
require(runfiles.resolve(process.env['WEB_TEST_METADATA']));
2828
const port = process.env['TEST_SERVER_PORT'];

tools/server-test/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ package(default_visibility = ["//visibility:public"])
55
ts_library(
66
name = "test_runner_lib",
77
srcs = ["test-runner.ts"],
8-
deps = ["@npm//@types/node"],
8+
deps = [
9+
"@npm//@bazel/runfiles",
10+
"@npm//@types/node",
11+
],
912
)

tools/server-test/test-runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* to that port, and then running tests against it.
44
*/
55

6-
const runfiles = require(process.env['BAZEL_NODE_RUNFILES_HELPER']!);
76
import * as child_process from 'child_process';
87
import * as net from 'net';
8+
import {runfiles} from '@bazel/runfiles';
99

1010
/** Checks if the given port is free. */
1111
function isPortFree(port: number) {

yarn.lock

Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@
644644
lodash "^4.17.19"
645645
to-fast-properties "^2.0.0"
646646

647-
"@bazel/bazelisk@^1.4.0":
647+
"@bazel/bazelisk@1.7.5":
648648
version "1.7.5"
649649
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.7.5.tgz#dd1a52e3d23464f72de55aa3dc4777847fa85373"
650650
integrity sha512-JHwP9JhfZUSoj4sku471Bjw4uE773U2Agujnx0CdPkeRk25khy1l3VyjaPaHB+z1fmMnM6ED3M7tetQUsovUQg==
@@ -664,6 +664,11 @@
664664
resolved "https://registry.yarnpkg.com/@bazel/buildifier-win32_x64/-/buildifier-win32_x64-0.29.0.tgz#a63438c7a7d2dc593e626ed6e163e9d8ea93917a"
665665
integrity sha512-hnOQfPhQNAIqbrhsHT3MWAyAZSUhKwxzEuZJZoOsGrW8fPonhKysdvfZJqfqJ6vDVYaMJKvLnSO1c9QZRhU7kQ==
666666

667+
668+
version "4.0.1"
669+
resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-4.0.1.tgz#52cfbad5cbb86e9183a29dde2370cd465730ea0d"
670+
integrity sha512-BTmtvJbeeEVrqRApI1gr5hvPgYcHLpdGJ5EXNXEWO692ztMPSj5fB/dH0xUlaW45jn6LimYx8ymqTMhj3538og==
671+
667672
"@bazel/buildifier@^0.29.0":
668673
version "0.29.0"
669674
resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-0.29.0.tgz#7984739270c8d1dd23650f87a810e1e6367188d9"
@@ -673,11 +678,6 @@
673678
"@bazel/buildifier-linux_x64" "0.29.0"
674679
"@bazel/buildifier-win32_x64" "0.29.0"
675680

676-
"@bazel/buildifier@^4.0.0":
677-
version "4.0.0"
678-
resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-4.0.0.tgz#c99fb21295c7e2858fa176c2b950c589217ae8ac"
679-
integrity sha512-e242AK+shp+5bpAc9l93pmG5YRYRfM0INV3gfbdxNeBxccx1MJUagaiwxqAV+Mw55zk92gsb99f2TAc9tt6C7w==
680-
681681
682682
version "3.2.1"
683683
resolved "https://registry.yarnpkg.com/@bazel/concatjs/-/concatjs-3.2.1.tgz#638210bf31011b1617e373624c61d9a10bd7f842"
@@ -687,38 +687,43 @@
687687
source-map-support "0.5.9"
688688
tsutils "2.27.2"
689689

690-
"@bazel/ibazel@^0.14.0":
691-
version "0.14.0"
692-
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.14.0.tgz#86fa0002bed2ce1123b7ad98d4dd4623a0d93244"
693-
integrity sha512-s0gyec6lArcRDwVfIP6xpY8iEaFpzrSpyErSppd3r2O49pOEg7n6HGS/qJ8ncvme56vrDk6crl/kQ6VAdEO+rg==
690+
"@bazel/ibazel@0.15.8":
691+
version "0.15.8"
692+
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.15.8.tgz#355632324fb4504611acb6f4a40cc6570c1a6c87"
693+
integrity sha512-VC60wGXKkzN35DZJnrlujl+fttLSdTBVrT+Hb9P+6nkR+dciN48f1KgluauG3DPopF/N681XhAiTYxg1WfGIYg==
694694

695-
"@bazel/jasmine@3.2.1":
696-
version "3.2.1"
697-
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-3.2.1.tgz#3a29b4a04222de2add06a57d771b9c2ecc97af80"
698-
integrity sha512-VPz4AuK0DTk8kyiUzWrh36zGyaX1Yvq1vTNvc0TM8cXsQPRNsQbFTmQsy/y4quLvdJfk8P1qP9N95gqqkz9M9Q==
695+
"@bazel/jasmine@3.3.0":
696+
version "3.3.0"
697+
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-3.3.0.tgz#40d64507dec504df79d8877f6ceb9d9b0ea7886a"
698+
integrity sha512-nsB1P/NQIOvxSTqVmQ3BqOSRQOvhqBP3M7owqDOl+3aQy1oIekXtj0S4s4pVFVMUFZf4acXXgZ4TOv0uuMOB5Q==
699699
dependencies:
700700
c8 "~7.5.0"
701-
jasmine-reporters "~2.3.2"
701+
jasmine-reporters "~2.4.0"
702702

703-
"@bazel/protractor@3.2.1":
704-
version "3.2.1"
705-
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-3.2.1.tgz#872340d6287043496242998640dca3f568a9f31b"
706-
integrity sha512-4jac5lCz2DeOWQ5P8KUZHUf7YEmJwBk7qllSDfHN3k0cUqWthZCvnclU8oRkLJ+LL9zdNkX1MpB4iLRDYUTl0Q==
703+
"@bazel/protractor@3.3.0":
704+
version "3.3.0"
705+
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-3.3.0.tgz#6465f90e7bfa7aaf183aa855e6b17b3a3cd06f48"
706+
integrity sha512-QT8HeAZ7E7Q7IVU0KOSBc7GT9Aj/jjaX4UtDcYr0nHVi6wLnvJ+yLjrdgLcQ40Xpdd9FoR0lXT+cxN8jrBjGbQ==
707707

708-
"@bazel/rollup@3.2.1":
709-
version "3.2.1"
710-
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-3.2.1.tgz#c632d54298cf980fc0994a95349d938f8d0ee27c"
711-
integrity sha512-+vPpi/pjCmQP3TlsDfmZZMDCBDCq2aHFXRxVx78t+1Vjz8ZT1JFx6J65V9YEPrCUowjBhkgrO5dk3IXeOvwXJA==
708+
"@bazel/rollup@3.3.0":
709+
version "3.3.0"
710+
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-3.3.0.tgz#f3b8a9593080f9dce1cf25dd5f3e6afc6a2afd61"
711+
integrity sha512-LuAIikmze3/KQgw2z6KHGX5YGhXQm7kdsSd8SXvrkauO0LFjorB2bReOMWBsjIA7dvqP48skOvM2OrFsDWeZqQ==
712712

713-
714-
version "3.2.2"
715-
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-3.2.2.tgz#90cd14f1c9d1c1784730adab5208dafa2342260a"
716-
integrity sha512-RI5XBDQN72zikhIZXFrbVsWWdJ+B4W0YcQndahm87t+nu26hXcmpNfSJuMjVmVrFCEB4G/z7CxgHINQCGjRgxg==
713+
"@bazel/runfiles@^3.3.0":
714+
version "3.3.0"
715+
resolved "https://registry.yarnpkg.com/@bazel/runfiles/-/runfiles-3.3.0.tgz#4bc0c3a12bb690a4361416f18577dd066b8cbb4e"
716+
integrity sha512-hUsQJN37h2wMinddTPyPbLA4PSRCXHzJOmxMRLrlnOyW01ekOXMxtiryCodrEnB6qkOSsVk1JJ8Bb+CJkDSM7A==
717717

718-
719-
version "3.2.1"
720-
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-3.2.1.tgz#564849e2f05387612d13ef64304b7a7582bd107a"
721-
integrity sha512-2KgMqKcbqL89WWWVC2iwTCS0tMWmQ4LpQgFhaF3Lp56Edl0nv/fy0TOu+waw2Qs2rTBbTVKhk5/9DRiqJmOd2g==
718+
719+
version "3.3.0"
720+
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-3.3.0.tgz#8f4036bcd9e00cf0add15020962d6eb513c9fc74"
721+
integrity sha512-F5RqBLYqev9zSuPCpz8CpQui3I6DuPgrOBIadGq8D+c3341dyR2QxwYcJ2ZEiMtCMWtNM1KsOF2vQsvE7HnqqQ==
722+
723+
724+
version "3.3.0"
725+
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-3.3.0.tgz#6781f3aec3f974b864519ae9f47eaf09b134910b"
726+
integrity sha512-neprCOVshAjlDAHgD5PAA4uqhkBzWve20Rl07Ip6BGnCNhU3XLkv+b86TtyWcU8tYMILoCSey9gzXs07XhEz6g==
722727
dependencies:
723728
protobufjs "6.8.8"
724729
semver "5.6.0"
@@ -7749,13 +7754,13 @@ jasmine-core@~2.8.0:
77497754
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"
77507755
integrity sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=
77517756

7752-
jasmine-reporters@~2.3.2:
7753-
version "2.3.2"
7754-
resolved "https://registry.yarnpkg.com/jasmine-reporters/-/jasmine-reporters-2.3.2.tgz#898818ffc234eb8b3f635d693de4586f95548d43"
7755-
integrity sha512-u/7AT9SkuZsUfFBLLzbErohTGNsEUCKaQbsVYnLFW1gEuL2DzmBL4n8v90uZsqIqlWvWUgian8J6yOt5Fyk/+A==
7757+
jasmine-reporters@~2.4.0:
7758+
version "2.4.0"
7759+
resolved "https://registry.yarnpkg.com/jasmine-reporters/-/jasmine-reporters-2.4.0.tgz#708c17ae70ba6671e3a930bb1b202aab80a31409"
7760+
integrity sha512-jxONSrBLN1vz/8zCx5YNWQSS8iyDAlXQ5yk1LuqITe4C6iXCDx5u6Q0jfNtkKhL4qLZPe69fL+AWvXFt9/x38w==
77567761
dependencies:
77577762
mkdirp "^0.5.1"
7758-
xmldom "^0.1.22"
7763+
xmldom "^0.5.0"
77597764

77607765
77617766
version "2.8.0"
@@ -13638,10 +13643,10 @@ [email protected]:
1363813643
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9"
1363913644
integrity sha1-1QH5ezvbQDr4757MIFcxh6rawOk=
1364013645

13641-
xmldom@^0.1.22:
13642-
version "0.1.31"
13643-
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff"
13644-
integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==
13646+
xmldom@^0.5.0:
13647+
version "0.5.0"
13648+
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.5.0.tgz#193cb96b84aa3486127ea6272c4596354cb4962e"
13649+
integrity sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA==
1364513650

1364613651
xmlhttprequest-ssl@~1.5.4:
1364713652
version "1.5.5"

0 commit comments

Comments
 (0)