refactor: handle breaking changes in rules_nodejs 1.0.0 (#34736)
The major one that affects the angular repo is the removal of the bootstrap attribute in nodejs_binary, nodejs_test and jasmine_node_test in favor of using templated_args --node_options=--require=/path/to/script. The side-effect of this is that the bootstrap script does not get the require.resolve patches with explicitly loading the targets _loader.js file. PR Close #34736
This commit is contained in:

committed by
Matias Niemelä

parent
ba662fa7a9
commit
dcff76e8b9
@ -14,11 +14,9 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "test",
|
||||
bootstrap = [
|
||||
"angular/tools/testing/init_node_no_angular_spec.js",
|
||||
],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"],
|
||||
deps = [
|
||||
":test_lib",
|
||||
"//tools/testing:node_no_angular",
|
||||
"//tools/testing:node_no_angular_es5",
|
||||
],
|
||||
)
|
||||
|
@ -22,12 +22,10 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "test",
|
||||
bootstrap = [
|
||||
"angular/tools/testing/init_node_no_angular_spec.js",
|
||||
],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"],
|
||||
deps = [
|
||||
":test_lib",
|
||||
"//tools/testing:node_no_angular",
|
||||
"//tools/testing:node_no_angular_es5",
|
||||
"@npm//glob",
|
||||
],
|
||||
)
|
||||
|
@ -14,18 +14,16 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "integration",
|
||||
bootstrap = [
|
||||
"angular/tools/testing/init_node_no_angular_spec.js",
|
||||
],
|
||||
data = glob(
|
||||
[
|
||||
"locales/**",
|
||||
"test_files/**",
|
||||
],
|
||||
),
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"],
|
||||
deps = [
|
||||
":test_lib",
|
||||
"//tools/testing:node_no_angular",
|
||||
"//tools/testing:node_no_angular_es5",
|
||||
"@npm//glob",
|
||||
"@npm//yargs",
|
||||
],
|
||||
|
@ -14,11 +14,9 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "test",
|
||||
bootstrap = [
|
||||
"angular/tools/testing/init_node_no_angular_spec.js",
|
||||
],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"],
|
||||
deps = [
|
||||
":test_lib",
|
||||
"//tools/testing:node_no_angular",
|
||||
"//tools/testing:node_no_angular_es5",
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user