1
1
"""Re-export of some bazel rules with repository-wide defaults."""
2
2
3
- load ("@rules_pkg//:pkg.bzl" , "pkg_tar" )
4
3
load ("@build_bazel_rules_nodejs//:index.bzl" , "generated_file_test" , _npm_package_bin = "npm_package_bin" , _pkg_npm = "pkg_npm" )
5
- load ("@npm//@bazel/jasmine:index.bzl" , _jasmine_node_test = "jasmine_node_test" )
6
- load ("@npm//@bazel/concatjs:index.bzl" , _ts_config = "ts_config" , _ts_library = "ts_library" )
7
- load ("@npm//@bazel/rollup:index.bzl" , _rollup_bundle = "rollup_bundle" )
8
- load ("@npm//@bazel/terser:index.bzl" , "terser_minified" )
9
- load ("@npm//@bazel/protractor:index.bzl" , _protractor_web_test_suite = "protractor_web_test_suite" )
10
- load ("@npm//typescript:index.bzl" , "tsc" )
11
- load ("@npm//@angular/build-tooling/bazel/app-bundling:index.bzl" , _app_bundle = "app_bundle" )
12
- load ("@npm//@angular/build-tooling/bazel/http-server:index.bzl" , _http_server = "http_server" )
13
- load ("@npm//@angular/build-tooling/bazel/karma:index.bzl" , _karma_web_test = "karma_web_test" , _karma_web_test_suite = "karma_web_test_suite" )
14
- load ("@npm//@angular/build-tooling/bazel/api-golden:index.bzl" , _api_golden_test = "api_golden_test" , _api_golden_test_npm_package = "api_golden_test_npm_package" )
15
4
load ("@npm//@angular/build-tooling/bazel:extract_js_module_output.bzl" , "extract_js_module_output" )
16
5
load ("@npm//@angular/build-tooling/bazel:extract_types.bzl" , _extract_types = "extract_types" )
6
+ load ("@npm//@angular/build-tooling/bazel/api-golden:index.bzl" , _api_golden_test = "api_golden_test" , _api_golden_test_npm_package = "api_golden_test_npm_package" )
7
+ load ("@npm//@angular/build-tooling/bazel/app-bundling:index.bzl" , _app_bundle = "app_bundle" )
17
8
load ("@npm//@angular/build-tooling/bazel/esbuild:index.bzl" , _esbuild = "esbuild" , _esbuild_config = "esbuild_config" , _esbuild_esm_bundle = "esbuild_esm_bundle" )
18
- load ("@npm//@angular/build-tooling/bazel/spec-bundling:spec-entrypoint.bzl" , "spec_entrypoint" )
9
+ load ("@npm//@angular/build-tooling/bazel/http-server:index.bzl" , _http_server = "http_server" )
10
+ load ("@npm//@angular/build-tooling/bazel/karma:index.bzl" , _karma_web_test = "karma_web_test" , _karma_web_test_suite = "karma_web_test_suite" )
19
11
load ("@npm//@angular/build-tooling/bazel/spec-bundling:index.bzl" , "spec_bundle" )
12
+ load ("@npm//@angular/build-tooling/bazel/spec-bundling:spec-entrypoint.bzl" , "spec_entrypoint" )
13
+ load ("@npm//@bazel/concatjs:index.bzl" , _ts_config = "ts_config" , _ts_library = "ts_library" )
14
+ load ("@npm//@bazel/jasmine:index.bzl" , _jasmine_node_test = "jasmine_node_test" )
15
+ load ("@npm//@bazel/protractor:index.bzl" , _protractor_web_test_suite = "protractor_web_test_suite" )
16
+ load ("@npm//@bazel/rollup:index.bzl" , _rollup_bundle = "rollup_bundle" )
17
+ load ("@npm//@bazel/terser:index.bzl" , "terser_minified" )
20
18
load ("@npm//tsec:index.bzl" , _tsec_test = "tsec_test" )
19
+ load ("@npm//typescript:index.bzl" , "tsc" )
20
+ load ("@rules_pkg//:pkg.bzl" , "pkg_tar" )
21
+ load ("//adev/shared-docs/pipeline/api-gen:generate_api_docs.bzl" , _generate_api_docs = "generate_api_docs" )
21
22
load ("//packages/bazel:index.bzl" , _ng_module = "ng_module" , _ng_package = "ng_package" )
22
23
load ("//tools/esm-interop:index.bzl" , "enable_esm_node_module_loader" , _nodejs_binary = "nodejs_binary" , _nodejs_test = "nodejs_test" )
23
- load ("//adev/shared-docs/pipeline/api-gen:generate_api_docs.bzl" , _generate_api_docs = "generate_api_docs" )
24
24
25
25
_DEFAULT_TSCONFIG_TEST = "//packages:tsconfig-test"
26
26
_INTERNAL_NG_MODULE_COMPILER = "//packages/bazel/src/ngc-wrapped"
@@ -479,7 +479,7 @@ def esbuild_jasmine_node_test(name, specs = [], external = [], bootstrap = [], *
479
479
** kwargs
480
480
)
481
481
482
- def jasmine_node_test (name , srcs = [], data = [], bootstrap = [], env = {}, ** kwargs ):
482
+ def jasmine_node_test (name , srcs = [], data = [], bootstrap = [], env = {}, templated_args = [], enable_linker = False , ** kwargs ):
483
483
# Very common dependencies for tests
484
484
deps = kwargs .pop ("deps" , []) + [
485
485
"@npm//chokidar" ,
@@ -492,13 +492,16 @@ def jasmine_node_test(name, srcs = [], data = [], bootstrap = [], env = {}, **kw
492
492
]
493
493
configuration_env_vars = kwargs .pop ("configuration_env_vars" , [])
494
494
495
- # Disable the linker and rely on patched resolution which works better on Windows
496
- # and is less prone to race conditions when targets build concurrently.
497
- templated_args = ["--nobazel_run_linker" ] + kwargs .pop ("templated_args" , [])
495
+ if not enable_linker :
496
+ templated_args = templated_args + [
497
+ # Disable the linker and rely on patched resolution which works better on Windows
498
+ # and is less prone to race conditions when targets build concurrently.
499
+ "--nobazel_run_linker" ,
500
+ ]
498
501
499
- # We disable the linker, so the ESM node module loader needs to be enabled.
500
- npm_workspace = _node_modules_workspace_name ()
501
- env = enable_esm_node_module_loader (npm_workspace , env )
502
+ # We disable the linker, so the ESM node module loader needs to be enabled.
503
+ npm_workspace = _node_modules_workspace_name ()
504
+ env = enable_esm_node_module_loader (npm_workspace , env )
502
505
503
506
spec_entrypoint (
504
507
name = "%s_spec_entrypoint.spec" % name ,
0 commit comments