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
@ -70,7 +70,6 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "test",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
data = [
|
||||
"//packages/animations:npm_package",
|
||||
"//packages/common:npm_package",
|
||||
@ -80,10 +79,12 @@ jasmine_node_test(
|
||||
# Disabled as these tests pertain to the old ngc compilation and are not relevant in Ivy.
|
||||
"no-ivy-aot",
|
||||
],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
|
||||
deps = [
|
||||
":test_lib",
|
||||
":test_node_only_lib",
|
||||
"//tools/testing:node",
|
||||
"//tools/testing:node_es5",
|
||||
"@npm//base64-js",
|
||||
"@npm//source-map",
|
||||
],
|
||||
|
@ -16,10 +16,11 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "css_parser",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
|
||||
deps = [
|
||||
":css_parser_lib",
|
||||
"//tools/testing:node",
|
||||
"//tools/testing:node_es5",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -15,10 +15,11 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "expression_parser",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
|
||||
deps = [
|
||||
":expression_parser_lib",
|
||||
"//tools/testing:node",
|
||||
"//tools/testing:node_es5",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -13,10 +13,11 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "ml_parser",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
|
||||
deps = [
|
||||
":ml_parser_lib",
|
||||
"//tools/testing:node",
|
||||
"//tools/testing:node_es5",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -18,9 +18,10 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "test",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
|
||||
deps = [
|
||||
":test_lib",
|
||||
"//tools/testing:node",
|
||||
"//tools/testing:node_es5",
|
||||
],
|
||||
)
|
||||
|
@ -17,10 +17,11 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "selector",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
|
||||
deps = [
|
||||
":selector_lib",
|
||||
"//tools/testing:node",
|
||||
"//tools/testing:node_es5",
|
||||
],
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user