refactor: handle breaking changes in rules_nodejs 1.0.0 (#34589)
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 #34589
This commit is contained in:
@ -40,7 +40,6 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "extract_i18n",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
data = [
|
||||
"//packages/core:npm_package",
|
||||
],
|
||||
@ -49,11 +48,13 @@ jasmine_node_test(
|
||||
# tool will likely work differently.
|
||||
"no-ivy-aot",
|
||||
],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
|
||||
deps = [
|
||||
":extract_i18n_lib",
|
||||
"//packages/common:npm_package",
|
||||
"//packages/core",
|
||||
"//tools/testing:node",
|
||||
"//tools/testing:node_es5",
|
||||
"@npm//minimist",
|
||||
],
|
||||
)
|
||||
@ -76,7 +77,6 @@ ts_library(
|
||||
jasmine_node_test(
|
||||
name = "ngc",
|
||||
timeout = "long", # 900 seconds
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
data = [
|
||||
"//packages/common:npm_package",
|
||||
"//packages/core:npm_package",
|
||||
@ -88,10 +88,12 @@ jasmine_node_test(
|
||||
# own tests under //packages/compiler-cli/test/ngtsc.
|
||||
"no-ivy-aot",
|
||||
],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
|
||||
deps = [
|
||||
":ngc_lib",
|
||||
"//packages/core",
|
||||
"//tools/testing:node",
|
||||
"//tools/testing:node_es5",
|
||||
"@npm//minimist",
|
||||
"@npm//rxjs",
|
||||
"@npm//tsickle",
|
||||
@ -116,14 +118,15 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "perform_watch",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
data = [
|
||||
"//packages/core:npm_package",
|
||||
],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
|
||||
deps = [
|
||||
":perform_watch_lib",
|
||||
"//packages/core",
|
||||
"//tools/testing:node",
|
||||
"//tools/testing:node_es5",
|
||||
],
|
||||
)
|
||||
|
||||
@ -143,13 +146,14 @@ ts_library(
|
||||
|
||||
jasmine_node_test(
|
||||
name = "perform_compile",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
data = [
|
||||
"//packages/core:npm_package",
|
||||
],
|
||||
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
|
||||
deps = [
|
||||
":perform_compile_lib",
|
||||
"//packages/core",
|
||||
"//tools/testing:node",
|
||||
"//tools/testing:node_es5",
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user