Skip to content

Commit a7bf1d5

Browse files
committed
build: update to rules_nodejs v1.4.0 (#18687)
Updates to the latest rules_nodejs version. Also removes the unnecessary Yarn resolution since we sent an upstream fix to update to the latest jasmine version. See: bazel-contrib/rules_nodejs@98fab93
1 parent 48f7892 commit a7bf1d5

File tree

5 files changed

+68
-56
lines changed

5 files changed

+68
-56
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 = "b6670f9f43faa66e3009488bbd909bc7bc46a5a9661a33f6bc578068d1837f37",
12-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.3.0/rules_nodejs-1.3.0.tar.gz"],
11+
sha256 = "c9e59009049fa42198f7087b80398fc4b2698a0f0c7fdde4fb3540c899c9b309",
12+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.4.0/rules_nodejs-1.4.0.tar.gz"],
1313
)
1414

1515
# Add sass rules

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@
7171
"@angular/router": "^9.0.1",
7272
"@bazel/bazelisk": "^1.3.0",
7373
"@bazel/buildifier": "^0.29.0",
74-
"@bazel/ibazel": "^0.12.0",
75-
"@bazel/jasmine": "^1.3.0",
76-
"@bazel/karma": "^1.3.0",
77-
"@bazel/protractor": "^1.3.0",
78-
"@bazel/typescript": "^1.3.0",
74+
"@bazel/ibazel": "^0.12.2",
75+
"@bazel/jasmine": "^1.4.0",
76+
"@bazel/karma": "^1.4.0",
77+
"@bazel/protractor": "^1.4.0",
78+
"@bazel/typescript": "^1.4.0",
7979
"@firebase/app-types": "^0.3.2",
8080
"@octokit/rest": "^16.28.7",
8181
"@schematics/angular": "^9.0.2",
@@ -155,8 +155,6 @@
155155
},
156156
"resolutions": {
157157
"dgeni-packages/typescript": "3.7.4",
158-
"@bazel/jasmine/jasmine": "3.5.0",
159-
"@bazel/jasmine/jasmine-core": "3.5.0",
160158
"**/graceful-fs": "4.2.2"
161159
}
162160
}

tools/postinstall/apply-patches.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ function applyPatch(patchFile) {
164164
return;
165165
}
166166

167-
writePatchMarker(patchMarkerPath);
168167
shelljs.cat(patchFile).exec('patch -p0');
168+
writePatchMarker(patchMarkerPath);
169169
}
170170

171171
/**

tools/postinstall/manifest_externs_hermeticity.patch

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -61,27 +61,27 @@ diff --git node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js no
6161
index 0346123..3d9bc64 100644
6262
--- node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js
6363
+++ node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js
64-
@@ -307,6 +307,23 @@
65-
}
66-
else {
67-
diagnostics = emitWithTypescript(program, compilationTargets, transforms);
68-
+ if (bazelOpts.manifest) {
69-
+ fs.writeFileSync(bazelOpts.manifest, "");
70-
+ }
71-
+ if (bazelOpts.tsickleExternsPath) {
72-
+ fs.writeFileSync(bazelOpts.tsickleExternsPath, "");
73-
+ if (bazelOpts.tsickleGenerateExterns && compilerHost.provideExternalModuleDtsNamespace) {
74-
+ for (const extern of compilationTargets) {
75-
+ if (!extern.isDeclarationFile)
76-
+ continue;
77-
+ const outputBaseDir = options.outDir;
78-
+ const relativeOutputPath = compilerHost.relativeOutputPath(extern.fileName);
79-
+ mkdirp(outputBaseDir, path.dirname(relativeOutputPath));
80-
+ const outputPath = path.join(outputBaseDir, relativeOutputPath);
81-
+ fs.writeFileSync(outputPath, "");
82-
+ }
64+
@@ -381,6 +381,23 @@ function createProgramAndEmit(fileLoader, options, bazelOpts, files, disabledTse
65+
}
66+
else {
67+
diagnostics = emitWithTypescript(program, compilationTargets, transformers);
68+
+ if (bazelOpts.manifest) {
69+
+ fs.writeFileSync(bazelOpts.manifest, "");
70+
+ }
71+
+ if (bazelOpts.tsickleExternsPath) {
72+
+ fs.writeFileSync(bazelOpts.tsickleExternsPath, "");
73+
+ if (bazelOpts.tsickleGenerateExterns && compilerHost.provideExternalModuleDtsNamespace) {
74+
+ for (const extern of compilationTargets) {
75+
+ if (!extern.isDeclarationFile)
76+
+ continue;
77+
+ const outputBaseDir = options.outDir;
78+
+ const relativeOutputPath = compilerHost.relativeOutputPath(extern.fileName);
79+
+ mkdirp(outputBaseDir, path.dirname(relativeOutputPath));
80+
+ const outputPath = path.join(outputBaseDir, relativeOutputPath);
81+
+ fs.writeFileSync(outputPath, "");
8382
+ }
8483
+ }
85-
}
86-
if (diagnostics.length > 0) {
87-
console.error(bazelDiagnostics.format(bazelOpts.target, diagnostics));
84+
+ }
85+
}
86+
if (diagnostics.length > 0) {
87+
worker_1.debug('compilation failed at', new Error().stack);

yarn.lock

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -259,36 +259,37 @@
259259
"@bazel/buildifier-linux_x64" "0.29.0"
260260
"@bazel/buildifier-win32_x64" "0.29.0"
261261

262-
"@bazel/ibazel@^0.12.0":
263-
version "0.12.0"
264-
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.12.0.tgz#97aea5ee2d41d91995539df89efe11fd3fe128ca"
265-
integrity sha512-8ix3hmaV30xD9FIa9aJBtKhxUOBDo0NEULgOhgz5c8nytnD0ipPWqssWWq0iFU8oRBHpvNnuIESbzL1h/LU5iw==
262+
"@bazel/ibazel@^0.12.2":
263+
version "0.12.2"
264+
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.12.2.tgz#98a290dbf8025076dd3040eab4f13a3d7e99357c"
265+
integrity sha512-CktVREceZn+6VokQ7A2qByuXBSGRM0THuyv68JUShHYyCkYS94nYMZEIe5NXk12CRzcpMLfZGD5Gdtr+jWs9pw==
266266

267-
"@bazel/jasmine@^1.3.0":
268-
version "1.3.0"
269-
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-1.3.0.tgz#1d03aa67c18f122ffed4eb88e85455a797a8121d"
270-
integrity sha512-HY633xVy83eyLWt4o6CT8zHDxzVk+UfXCWCCWgJXWqpkB2BoYlq0Bvvpqcuj7Ilzn9vNX6w8gVeddRckIdBa/Q==
267+
"@bazel/jasmine@^1.4.0":
268+
version "1.4.0"
269+
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-1.4.0.tgz#c4124090f933a879d8b0fc7c2c2c2436f17094fe"
270+
integrity sha512-As7hqdmkUJLKNAUmj6CkFR2azaHA6dxdOLFNasrXX4Qc+jBXxDEgnGb4DSFewn5ds45BKahZOpCsKH3Fq1g4Sw==
271271
dependencies:
272-
jasmine "~3.4.0"
273-
jasmine-core "~3.4.0"
272+
jasmine "~3.5.0"
273+
jasmine-core "~3.5.0"
274+
jasmine-reporters "~2.3.2"
274275
v8-coverage "1.0.9"
275276

276-
"@bazel/karma@^1.3.0":
277-
version "1.3.0"
278-
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-1.3.0.tgz#8d4c336f04357ccc9633b9b6cdf8c79b15793ef1"
279-
integrity sha512-TyGoLBGTt9Mlp/FhwAytYaolUfrwMYuhNNzOYQ0lNzF73oEXOD1G9vIYLn2NvxQLPAaa2guBmNWSf0EkLhMuiw==
277+
"@bazel/karma@^1.4.0":
278+
version "1.4.0"
279+
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-1.4.0.tgz#42517b3a236d0589da265e195814960e6b4a691c"
280+
integrity sha512-KLBKZHN4b9w+Ll9DrW6+mqKeR6a4kuc4PMPWNIqrgTHBTnJgRQpnDR4V/kyqEjcmJ9zG/rJgzkrboRHyXsQrxA==
280281
dependencies:
281282
tmp "0.1.0"
282283

283-
"@bazel/protractor@^1.3.0":
284-
version "1.3.0"
285-
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-1.3.0.tgz#050edc3480a6b5cf2b4c96daeced5cb871839298"
286-
integrity sha512-EwTlHbMwHIyPy7FhDiKLum2nlmmy27p/yQzWzN8dRnCIjmq4ezTfgNMnyZ5Z9HiQ2HM4kyzNx1f65eKNXXZK7w==
284+
"@bazel/protractor@^1.4.0":
285+
version "1.4.0"
286+
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-1.4.0.tgz#577bc7243d88b58fc4733e39b233f38ee97eeebb"
287+
integrity sha512-flAzhCAfkVjOQQT1JOLvUz5PBiNKgg8/4jMUw90ZcOSj8u6mOSrR0Fh7LT7V+Rc3VLrH+uNaP9Iq31gjEKxl6A==
287288

288-
"@bazel/typescript@^1.3.0":
289-
version "1.3.0"
290-
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.3.0.tgz#6df7409ad8b2fcd80dfe859904fe91aacfb1a2cf"
291-
integrity sha512-F1Cjnjby+b3cO+rVuZY/9tzepf8wgoXZP9PtFmVWTQ+NtBkKEYx6IQ3AXZJl33mYVoN/Zb5qBTrGW/QfHUvakw==
289+
"@bazel/typescript@^1.4.0":
290+
version "1.4.0"
291+
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.4.0.tgz#8a86c3c58c3ebe17ccb2f71b35720457f4bc434a"
292+
integrity sha512-VFUCAyGXMZDx/ZyZ8YUj5rn/Rg9xSxoZxcqxJ457YxMzWGISKpNyzgUty9J/ZVcPg1xKKoISSvcjQWFtWOwX2A==
292293
dependencies:
293294
protobufjs "6.8.8"
294295
semver "5.6.0"
@@ -6509,7 +6510,7 @@ istanbul@^0.4.5:
65096510
which "^1.1.1"
65106511
wordwrap "^1.0.0"
65116512

6512-
[email protected], jasmine-core@^3.5.0, jasmine-core@~3.4.0, jasmine-core@~3.5.0:
6513+
[email protected], jasmine-core@^3.5.0, jasmine-core@~3.5.0:
65136514
version "3.5.0"
65146515
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.5.0.tgz#132c23e645af96d85c8bca13c8758b18429fc1e4"
65156516
integrity sha512-nCeAiw37MIMA9w9IXso7bRaLl+c/ef3wnxsoSAlYrzS+Ot0zTG6nU8G/cIfGkqpkjX2wNaIW9RFG0TwIFnG6bA==
@@ -6519,6 +6520,14 @@ jasmine-core@~2.8.0:
65196520
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"
65206521
integrity sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=
65216522

6523+
jasmine-reporters@~2.3.2:
6524+
version "2.3.2"
6525+
resolved "https://registry.yarnpkg.com/jasmine-reporters/-/jasmine-reporters-2.3.2.tgz#898818ffc234eb8b3f635d693de4586f95548d43"
6526+
integrity sha512-u/7AT9SkuZsUfFBLLzbErohTGNsEUCKaQbsVYnLFW1gEuL2DzmBL4n8v90uZsqIqlWvWUgian8J6yOt5Fyk/+A==
6527+
dependencies:
6528+
mkdirp "^0.5.1"
6529+
xmldom "^0.1.22"
6530+
65226531
65236532
version "2.8.0"
65246533
resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.8.0.tgz#6b089c0a11576b1f16df11b80146d91d4e8b8a3e"
@@ -6528,7 +6537,7 @@ [email protected]:
65286537
glob "^7.0.6"
65296538
jasmine-core "~2.8.0"
65306539

6531-
[email protected], jasmine@~3.4.0:
6540+
[email protected], jasmine@~3.5.0:
65326541
version "3.5.0"
65336542
resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.5.0.tgz#7101eabfd043a1fc82ac24e0ab6ec56081357f9e"
65346543
integrity sha512-DYypSryORqzsGoMazemIHUfMkXM7I7easFaxAvNM3Mr6Xz3Fy36TupTrAOxZWN8MVKEU5xECv22J4tUQf3uBzQ==
@@ -12238,6 +12247,11 @@ [email protected]:
1223812247
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9"
1223912248
integrity sha1-1QH5ezvbQDr4757MIFcxh6rawOk=
1224012249

12250+
xmldom@^0.1.22:
12251+
version "0.1.31"
12252+
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff"
12253+
integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==
12254+
1224112255
xmlhttprequest-ssl@~1.5.4:
1224212256
version "1.5.5"
1224312257
resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e"

0 commit comments

Comments
 (0)