Skip to content

Commit d076715

Browse files
committed
build: fix non hermetic test target compilations
Currenlty all `ts_library`'s using the test tsconfig file are not hermetic and will break when running remotely. This is because just `tsconfig-test.json` is referenced as action input while the tsconfig actually extends from the `tsconfig-build.json`.
1 parent 85f8ea7 commit d076715

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/BUILD.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package(default_visibility = ["//visibility:public"])
22

3+
load("@npm_bazel_typescript//:index.bzl", "ts_config")
34
load("//:packages.bzl", "CDK_PACKAGES", "MATERIAL_PACKAGES")
45
load("//tools:defaults.bzl", "ts_library")
56
load("//tools/dgeni:index.bzl", "dgeni_api_docs")
@@ -21,6 +22,12 @@ ts_library(
2122
srcs = [":module-typings.d.ts"],
2223
)
2324

25+
ts_config(
26+
name = "tsconfig-test",
27+
src = "bazel-tsconfig-test.json",
28+
deps = ["bazel-tsconfig-build.json"],
29+
)
30+
2431
dgeni_api_docs(
2532
name = "api-docs",
2633
srcs = apiSourceFiles + [

tools/defaults.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ load("//tools/markdown-to-html:index.bzl", _markdown_to_html = "markdown_to_html
88
load("//:packages.bzl", "ANGULAR_LIBRARY_UMDS", "VERSION_PLACEHOLDER_REPLACEMENTS")
99

1010
_DEFAULT_TSCONFIG_BUILD = "//src:bazel-tsconfig-build.json"
11-
_DEFAULT_TSCONFIG_TEST = "//src:bazel-tsconfig-test.json"
11+
_DEFAULT_TSCONFIG_TEST = "//src:tsconfig-test"
1212

1313
# Whether Angular type checking should be enabled or not. Enabled by
1414
# default but will be overwritten when running snapshots tests with Ivy

0 commit comments

Comments
 (0)