Skip to content

Commit 9bb349e

Browse files
gregmagolanatscott
authored andcommitted
refactor: handle breaking changes in rules_nodejs 1.0.0 (angular#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 angular#34589
1 parent 96643e7 commit 9bb349e

69 files changed

Lines changed: 318 additions & 131 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/animations/browser/test/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ ts_library(
1616

1717
jasmine_node_test(
1818
name = "test",
19-
bootstrap = ["angular/tools/testing/init_node_spec.js"],
19+
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
2020
deps = [
2121
":test_lib",
2222
"//tools/testing:node",
23+
"//tools/testing:node_es5",
2324
],
2425
)
2526

packages/animations/test/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ ts_library(
1313

1414
jasmine_node_test(
1515
name = "test",
16-
bootstrap = ["angular/tools/testing/init_node_spec.js"],
16+
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
1717
deps = [
1818
":test_lib",
1919
"//tools/testing:node",
20+
"//tools/testing:node_es5",
2021
],
2122
)
2223

packages/bazel/src/schematics/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ filegroup(
1212

1313
jasmine_node_test(
1414
name = "test",
15-
bootstrap = ["angular/tools/testing/init_node_spec.js"],
15+
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
1616
deps = [
1717
"//packages/bazel/src/schematics/ng-add:test",
1818
"//packages/bazel/src/schematics/ng-new:test",
1919
"//packages/bazel/src/schematics/utility:test",
2020
"//tools/testing:node",
21+
"//tools/testing:node_es5",
2122
],
2223
)

packages/benchpress/test/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ ts_library(
1515

1616
jasmine_node_test(
1717
name = "test",
18-
bootstrap = ["angular/tools/testing/init_node_spec.js"],
18+
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
1919
deps = [
2020
":test_lib",
2121
"//packages/benchpress",
2222
"//packages/core/testing",
2323
"//tools/testing:node",
24+
"//tools/testing:node_es5",
2425
"@npm//protractor",
2526
],
2627
)

packages/common/http/test/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ ts_library(
1919

2020
jasmine_node_test(
2121
name = "test",
22-
bootstrap = ["angular/tools/testing/init_node_spec.js"],
22+
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
2323
deps = [
2424
":test_lib",
2525
"//tools/testing:node",
26+
"//tools/testing:node_es5",
2627
],
2728
)
2829

packages/common/http/testing/test/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ ts_library(
1717

1818
jasmine_node_test(
1919
name = "test",
20-
bootstrap = ["angular/tools/testing/init_node_spec.js"],
20+
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
2121
deps = [
2222
":test_lib",
2323
"//tools/testing:node",
24+
"//tools/testing:node_es5",
2425
],
2526
)
2627

packages/common/test/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ ts_library(
2424

2525
jasmine_node_test(
2626
name = "test",
27-
bootstrap = ["angular/tools/testing/init_node_spec.js"],
27+
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
2828
deps = [
2929
":test_lib",
3030
"//tools/testing:node",
31+
"//tools/testing:node_es5",
3132
],
3233
)
3334

packages/common/upgrade/test/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ ts_library(
1616

1717
jasmine_node_test(
1818
name = "test",
19-
bootstrap = ["angular/tools/testing/init_node_spec.js"],
19+
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
2020
deps = [
2121
":test_lib",
2222
"//tools/testing:node",
23+
"//tools/testing:node_es5",
2324
],
2425
)

packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ ts_library(
2121

2222
jasmine_node_test(
2323
name = "test",
24-
bootstrap = ["angular/tools/testing/init_node_spec.js"],
24+
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
2525
deps = [
2626
":test_lib",
2727
"//packages/platform-server",
2828
"//packages/platform-server/testing",
2929
"//packages/private/testing",
3030
"//tools/testing:node",
31+
"//tools/testing:node_es5",
3132
],
3233
)

packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ ts_library(
2222

2323
jasmine_node_test(
2424
name = "test",
25-
bootstrap = ["angular/tools/testing/init_node_spec.js"],
2625
tags = [
2726
"ivy-only",
2827
],
28+
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
2929
deps = [
3030
":test_lib",
3131
"//tools/testing:node",
32+
"//tools/testing:node_es5",
3233
],
3334
)

0 commit comments

Comments
 (0)