build: add a before-all-other bootstrap script that patches require (#34736)

This removes the churn in the existing bootstrap scripts.

PR Close #34736
This commit is contained in:
Greg Magolan
2020-01-08 01:14:27 -08:00
committed by Matias Niemelä
parent 449a9fccc2
commit 8560f016cd
10 changed files with 34 additions and 43 deletions
+6 -1
View File
@@ -268,11 +268,16 @@ def jasmine_node_test(bootstrap = [], **kwargs):
"@npm//source-map-support",
"@npm//tslib",
"@npm//xhr2",
"//tools/testing:bazel_patch_require.js",
]
configuration_env_vars = kwargs.pop("configuration_env_vars", []) + [
"angular_ivy_enabled",
]
templated_args = kwargs.pop("templated_args", [])
templated_args = [
# bazel_patch_require.js must be first
# TODO(gregmagolan): remove this once linker has been applied to nodejs_binary targets by default in rules_nodejs
"--node_options=--require=$(rlocation $(location //tools/testing:bazel_patch_require.js))",
] + kwargs.pop("templated_args", [])
for label in bootstrap:
deps += [label]
templated_args += ["--node_options=--require=$(rlocation $(location %s))" % label]