build: update to rules nodejs 1.0.1 (#34736)
This brings in a few minor fixes including a better way to patch require for bootstrap scripts Also remove install_source_map_support attribute from nodejs_binary targets This attribute will be removed from nodejs_binary in the future PR Close #34736
This commit is contained in:

committed by
Matias Niemelä

parent
1cf28929f1
commit
fa30e31cd5
@ -32,7 +32,7 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
|
||||
"@bazel/typescript": "0.*",
|
||||
"@bazel/typescript": ">=1.0.0",
|
||||
"terser": "^4.3.1",
|
||||
"typescript": ">=3.6 <3.8",
|
||||
"rollup": ">=1.20.0",
|
||||
|
@ -19,7 +19,6 @@ nodejs_binary(
|
||||
name = "modify_tsconfig",
|
||||
data = ["modify_tsconfig.js"],
|
||||
entry_point = ":modify_tsconfig.js",
|
||||
install_source_map_support = False,
|
||||
node_modules = ":empty_node_modules",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
@ -15,8 +15,8 @@ workspace(
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
RULES_NODEJS_VERSION = "1.0.0"
|
||||
RULES_NODEJS_SHA256 = "3887b948779431ac443e6a64f31b9e1e17b8d386a31eebc50ec1d9b0a6cabd2b"
|
||||
RULES_NODEJS_VERSION = "1.0.1"
|
||||
RULES_NODEJS_SHA256 = "e1a0d6eb40ec89f61a13a028e7113aa3630247253bcb1406281b627e44395145"
|
||||
http_archive(
|
||||
name = "build_bazel_rules_nodejs",
|
||||
sha256 = RULES_NODEJS_SHA256,
|
||||
|
@ -24,7 +24,6 @@ nodejs_binary(
|
||||
"@npm//shelljs",
|
||||
],
|
||||
entry_point = ":packager.ts",
|
||||
install_source_map_support = False,
|
||||
)
|
||||
|
||||
nodejs_binary(
|
||||
@ -36,7 +35,6 @@ nodejs_binary(
|
||||
"@npm//rollup-plugin-sourcemaps",
|
||||
],
|
||||
entry_point = "@npm//:node_modules/rollup/dist/bin/rollup",
|
||||
install_source_map_support = False,
|
||||
)
|
||||
|
||||
exports_files([
|
||||
|
@ -40,11 +40,11 @@ function addDevDependenciesToPackageJson(options: Schema) {
|
||||
['@angular/bazel', angularCore.version],
|
||||
['@bazel/bazel', '1.1.0'],
|
||||
['@bazel/ibazel', '0.10.3'],
|
||||
['@bazel/karma', '1.0.0'],
|
||||
['@bazel/protractor', '1.0.0'],
|
||||
['@bazel/rollup', '1.0.0'],
|
||||
['@bazel/terser', '1.0.0'],
|
||||
['@bazel/typescript', '1.0.0'],
|
||||
['@bazel/karma', '1.0.1'],
|
||||
['@bazel/protractor', '1.0.1'],
|
||||
['@bazel/rollup', '1.0.1'],
|
||||
['@bazel/terser', '1.0.1'],
|
||||
['@bazel/typescript', '1.0.1'],
|
||||
['history-server', '1.3.1'],
|
||||
['html-insert-assets', '0.2.0'],
|
||||
['karma', '4.4.1'],
|
||||
|
@ -6,13 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
if (process.env['TEST_SRCDIR']) {
|
||||
// bootstrap the bazel require resolve patch since this
|
||||
// script is a bootstrap script loaded with --node_options=--require=...
|
||||
const path = require('path');
|
||||
require(path.posix.join(
|
||||
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
|
||||
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
|
||||
// bootstrap the bazel require patch since this bootstrap script is loaded with
|
||||
// `--node_options=--require=$(rlocation $(location script.js))`
|
||||
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
|
||||
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
|
||||
}
|
||||
|
||||
// Needed to run animation tests
|
||||
|
@ -6,13 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
if (process.env['TEST_SRCDIR']) {
|
||||
// bootstrap the bazel require resolve patch since this
|
||||
// script is a bootstrap script loaded with --node_options=--require=...
|
||||
const path = require('path');
|
||||
require(path.posix.join(
|
||||
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
|
||||
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
|
||||
// bootstrap the bazel require patch since this bootstrap script is loaded with
|
||||
// `--node_options=--require=$(rlocation $(location script.js))`
|
||||
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
|
||||
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
|
||||
}
|
||||
|
||||
// Must be loaded before zone loads, so that zone can detect WTF.
|
||||
|
@ -13,13 +13,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
if (process.env['TEST_SRCDIR']) {
|
||||
// bootstrap the bazel require resolve patch since this
|
||||
// script is a bootstrap script loaded with --node_options=--require=...
|
||||
const path = require('path');
|
||||
require(path.posix.join(
|
||||
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
|
||||
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
|
||||
// bootstrap the bazel require patch since this bootstrap script is loaded with
|
||||
// `--node_options=--require=$(rlocation $(location script.js))`
|
||||
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
|
||||
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
|
||||
}
|
||||
|
||||
// Must be loaded before zone loads, so that zone can detect WTF.
|
||||
|
@ -13,13 +13,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
if (process.env['TEST_SRCDIR']) {
|
||||
// bootstrap the bazel require resolve patch since this
|
||||
// script is a bootstrap script loaded with --node_options=--require=...
|
||||
const path = require('path');
|
||||
require(path.posix.join(
|
||||
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
|
||||
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
|
||||
// bootstrap the bazel require patch since this bootstrap script is loaded with
|
||||
// `--node_options=--require=$(rlocation $(location script.js))`
|
||||
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
|
||||
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
|
||||
}
|
||||
|
||||
// Must be loaded before zone loads, so that zone can detect WTF.
|
||||
|
@ -6,13 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
if (process.env['TEST_SRCDIR']) {
|
||||
// bootstrap the bazel require resolve patch since this
|
||||
// script is a bootstrap script loaded with --node_options=--require=...
|
||||
const path = require('path');
|
||||
require(path.posix.join(
|
||||
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
|
||||
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
|
||||
// bootstrap the bazel require patch since this bootstrap script is loaded with
|
||||
// `--node_options=--require=$(rlocation $(location script.js))`
|
||||
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
|
||||
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
|
||||
}
|
||||
|
||||
process.env['errorpolicy'] = (global as any)['__Zone_Error_BlacklistedStackFrames_policy'] =
|
||||
|
@ -6,13 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
if (process.env['TEST_SRCDIR']) {
|
||||
// bootstrap the bazel require resolve patch since this
|
||||
// script is a bootstrap script loaded with --node_options=--require=...
|
||||
const path = require('path');
|
||||
require(path.posix.join(
|
||||
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
|
||||
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
|
||||
// bootstrap the bazel require patch since this bootstrap script is loaded with
|
||||
// `--node_options=--require=$(rlocation $(location script.js))`
|
||||
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
|
||||
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
|
||||
}
|
||||
|
||||
process.env['errorpolicy'] = (global as any)['__Zone_Error_BlacklistedStackFrames_policy'] = 'lazy';
|
||||
|
Reference in New Issue
Block a user