Skip to content

Commit 8042433

Browse files
gregmagolanatscott
authored andcommitted
build: update to rules nodejs 1.0.1 (angular#34589)
This brings in a few minor fixes including a better way to patch require for bootstrap scripts. PR Close angular#34589
1 parent 1ba6fd3 commit 8042433

File tree

16 files changed

+95
-116
lines changed

16 files changed

+95
-116
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
# Fetch rules_nodejs so we can install our npm dependencies
99
http_archive(
1010
name = "build_bazel_rules_nodejs",
11-
sha256 = "3887b948779431ac443e6a64f31b9e1e17b8d386a31eebc50ec1d9b0a6cabd2b",
12-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.0.0/rules_nodejs-1.0.0.tar.gz"],
11+
sha256 = "e1a0d6eb40ec89f61a13a028e7113aa3630247253bcb1406281b627e44395145",
12+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.0.1/rules_nodejs-1.0.1.tar.gz"],
1313
)
1414

1515
# Check the bazel version and download npm dependencies

integration/bazel/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
# Fetch rules_nodejs so we can install our npm dependencies
99
http_archive(
1010
name = "build_bazel_rules_nodejs",
11-
sha256 = "3887b948779431ac443e6a64f31b9e1e17b8d386a31eebc50ec1d9b0a6cabd2b",
12-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.0.0/rules_nodejs-1.0.0.tar.gz"],
11+
sha256 = "e1a0d6eb40ec89f61a13a028e7113aa3630247253bcb1406281b627e44395145",
12+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.0.1/rules_nodejs-1.0.1.tar.gz"],
1313
)
1414

1515
# Fetch sass rules for compiling sass files

integration/bazel/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
"@angular/compiler": "file:../../dist/packages-dist/compiler",
2424
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
2525
"@bazel/bazel": "file:../../node_modules/@bazel/bazel",
26-
"@bazel/karma": "1.0.0",
27-
"@bazel/protractor": "1.0.0",
28-
"@bazel/rollup": "1.0.0",
29-
"@bazel/terser": "1.0.0",
30-
"@bazel/typescript": "1.0.0",
26+
"@bazel/karma": "1.0.1",
27+
"@bazel/protractor": "1.0.1",
28+
"@bazel/rollup": "1.0.1",
29+
"@bazel/terser": "1.0.1",
30+
"@bazel/typescript": "1.0.1",
3131
"@types/jasmine": "2.8.8",
3232
"http-server": "0.12.0",
3333
"karma": "4.4.1",

integration/bazel/yarn.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -92,32 +92,32 @@
9292
resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.38.3.tgz#e98231d3d360d51860d9c1a7c3345b40dab4cf81"
9393
integrity sha512-o+dNkfDm3qxWQ8h/04cWuTcjR7qnjZi3pQGv4aklVb16oPWx2jF8BzbkwvWuIkdbOl9VnqYP0vaHzwQVJRRcIA==
9494

95-
"@bazel/karma@1.0.0":
96-
version "1.0.0"
97-
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-1.0.0.tgz#6f1e31bc2cb698e50d76f43ec9f1ee095d8e72b8"
98-
integrity sha512-esfsHRVWVcp6OyTk/QI1sBV7bcygFiXY6LUMPLPYqVZkQvJ0x+/L1weiwuRrqFf+FCwCajhYjwiR6S9kX2Z9LA==
95+
"@bazel/karma@1.0.1":
96+
version "1.0.1"
97+
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-1.0.1.tgz#f60de501367125ece03af1250ccb69d836fee2cc"
98+
integrity sha512-AJ7KOx+oWHTAwstTMH95jpPP4MSKnG2eZiTms5OilhLz6KWg+l4hGumJ+jB8ntt/ZlMv9nrLVohS5zjEUyeTYA==
9999
dependencies:
100100
tmp "0.1.0"
101101

102-
"@bazel/protractor@1.0.0":
103-
version "1.0.0"
104-
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-1.0.0.tgz#b77fde3bb53a008c330c13a953a0bf93aa06b5f1"
105-
integrity sha512-8kGuM3NkFfokjzKBlYxK9rUwJO/ICnYTHC567KJk6T4pjm4kfyh6iVI3Df3K+ONRCEYmiuZrQ37U06lzMMGN9g==
102+
"@bazel/protractor@1.0.1":
103+
version "1.0.1"
104+
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-1.0.1.tgz#48d1f12c9edec114b04b45a159fa8c231c65c688"
105+
integrity sha512-gAJ4nMQRXu4/k+EvH/aD4BUBrSy9dn/xtAI0qRs8t2997Zafb2HI0Ejd0Ep3geBcnloC/EWGSQAIBt5vQrOWAw==
106106

107-
"@bazel/rollup@1.0.0":
108-
version "1.0.0"
109-
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-1.0.0.tgz#85f38cf07ba8ea192e54c42cb53a44d1fd1f56ac"
110-
integrity sha512-pOWwyeM/H+LWRpKm3xuSAXoZ1gl6o8kFh5ltf0tM+ZfqGnSNbakME6ZswfmVj7FHUgF40BXzSoFTUdqgn1xy/w==
107+
"@bazel/rollup@1.0.1":
108+
version "1.0.1"
109+
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-1.0.1.tgz#aaef886ff6cb00fc19995479aef4275359b57eee"
110+
integrity sha512-LL9eszGoHbw50+59KqqgmHB1AFQKlYeJFDCMzJU5DnAMLWz/bSlf77CaC3iipL7AVQXVqu1aJEviiNYDVGTlig==
111111

112-
"@bazel/terser@1.0.0":
113-
version "1.0.0"
114-
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-1.0.0.tgz#f9ef724cd4a81776dae71ae904934994d5006960"
115-
integrity sha512-L+Q7YH+OA0W7Qp30DrnTKdNA6gasip9CdzI0zSvFOk18B7XBR+WswkIY2RkwwhH+y4SROqkHbX16z02jDHsnng==
112+
"@bazel/terser@1.0.1":
113+
version "1.0.1"
114+
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-1.0.1.tgz#edc22ef7d507ddf249ab039fc9f8c4d05c4789f9"
115+
integrity sha512-ldww7M6V6itnhCbtIdiGenKJZVwfpeA+h1z41KYCPQouNBrf0zBH717NYUx1IXkxmWfuT1cmgDWLYEhBC+R2Sw==
116116

117-
"@bazel/typescript@1.0.0":
118-
version "1.0.0"
119-
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.0.0.tgz#2c7318b9a3aaa730f282b094ddf41dd16fda7b5a"
120-
integrity sha512-caNOKz7EjVMgbedjVTreao9++9Sb9oYlU2nqDOMIK8MyoOUQvgGQWhFwF65XXGSb79Tzv8kaFQskoaH/iAs4ng==
117+
"@bazel/typescript@1.0.1":
118+
version "1.0.1"
119+
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.0.1.tgz#23c8232f9a08199971a306a688843f10832f2458"
120+
integrity sha512-dEZVAqmsJRcxnUPedXJ5QJIcmzxxXLDSybNO2uBXET8PvDfRpFGwu/ui+FE3uC3gYYXUFUas6WIEw5oiSeicVQ==
121121
dependencies:
122122
protobufjs "6.8.8"
123123
semver "5.6.0"

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141
"@angular-devkit/schematics": "9.0.0-rc.4",
4242
"@angular/bazel": "file:./tools/npm/@angular_bazel",
4343
"@babel/core": "^7.6.4",
44-
"@bazel/jasmine": "1.0.0",
45-
"@bazel/karma": "1.0.0",
46-
"@bazel/protractor": "1.0.0",
47-
"@bazel/rollup": "1.0.0",
48-
"@bazel/terser": "1.0.0",
49-
"@bazel/typescript": "1.0.0",
44+
"@bazel/jasmine": "1.0.1",
45+
"@bazel/karma": "1.0.1",
46+
"@bazel/protractor": "1.0.1",
47+
"@bazel/rollup": "1.0.1",
48+
"@bazel/terser": "1.0.1",
49+
"@bazel/typescript": "1.0.1",
5050
"@microsoft/api-extractor": "^7.3.9",
5151
"@schematics/angular": "9.0.0-rc.4",
5252
"@types/angular": "^1.6.47",

packages/bazel/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"peerDependencies": {
3434
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
35-
"@bazel/typescript": "0.*",
35+
"@bazel/typescript": ">=1.0.0",
3636
"terser": "^4.3.1",
3737
"typescript": ">=3.6 <3.7",
3838
"rollup": ">=1.20.0",

packages/bazel/src/builders/files/WORKSPACE.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ workspace(
1515

1616
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
1717

18-
RULES_NODEJS_VERSION = "1.0.0"
19-
RULES_NODEJS_SHA256 = "3887b948779431ac443e6a64f31b9e1e17b8d386a31eebc50ec1d9b0a6cabd2b"
18+
RULES_NODEJS_VERSION = "1.0.1"
19+
RULES_NODEJS_SHA256 = "e1a0d6eb40ec89f61a13a028e7113aa3630247253bcb1406281b627e44395145"
2020
http_archive(
2121
name = "build_bazel_rules_nodejs",
2222
sha256 = RULES_NODEJS_SHA256,

packages/bazel/src/schematics/ng-add/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ function addDevDependenciesToPackageJson(options: Schema) {
4040
['@angular/bazel', angularCore.version],
4141
['@bazel/bazel', '1.1.0'],
4242
['@bazel/ibazel', '0.10.3'],
43-
['@bazel/karma', '1.0.0'],
44-
['@bazel/protractor', '1.0.0'],
45-
['@bazel/rollup', '1.0.0'],
46-
['@bazel/terser', '1.0.0'],
47-
['@bazel/typescript', '1.0.0'],
43+
['@bazel/karma', '1.0.1'],
44+
['@bazel/protractor', '1.0.1'],
45+
['@bazel/rollup', '1.0.1'],
46+
['@bazel/terser', '1.0.1'],
47+
['@bazel/typescript', '1.0.1'],
4848
['history-server', '1.3.1'],
4949
['html-insert-assets', '0.2.0'],
5050
['karma', '4.4.1'],

packages/core/test/render3/load_domino.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
if (process.env['TEST_SRCDIR']) {
10-
// bootstrap the bazel require resolve patch since this
11-
// script is a bootstrap script loaded with --node_options=--require=...
12-
const path = require('path');
13-
require(path.posix.join(
14-
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
15-
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
9+
// bootstrap the bazel require patch since this bootstrap script is loaded with
10+
// `--node_options=--require=$(rlocation $(location script.js))`
11+
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
12+
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
1613
}
1714

1815
// Needed to run animation tests

packages/zone.js/test/node_bluebird_entry_point.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
if (process.env['TEST_SRCDIR']) {
10-
// bootstrap the bazel require resolve patch since this
11-
// script is a bootstrap script loaded with --node_options=--require=...
12-
const path = require('path');
13-
require(path.posix.join(
14-
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
15-
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
9+
// bootstrap the bazel require patch since this bootstrap script is loaded with
10+
// `--node_options=--require=$(rlocation $(location script.js))`
11+
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
12+
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
1613
}
1714

1815
// Must be loaded before zone loads, so that zone can detect WTF.

0 commit comments

Comments
 (0)