Skip to content

Commit 3777b2f

Browse files
committed
refactor: initial set of testing/ targets migrated to ts_project
This is an initial commit to migrate some `testing/` targets to `ts_project`, leveraging the interop rule we've built. Notably we also turn of strict deps checking temporarily as the deps checking is only applicable when there are no interop deps anymore!
1 parent 79cb078 commit 3777b2f

File tree

11 files changed

+41
-31
lines changed

11 files changed

+41
-31
lines changed

.bazelrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ build:remote --google_default_credentials=true
9191

9292
# Setup the toolchain and platform for the remote build execution. The platform
9393
# is provided by the shared dev-infra package and targets k8 remote containers.
94-
build:remote --crosstool_top=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain_suite
95-
build:remote --extra_toolchains=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain
9694
build:remote --extra_execution_platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform_with_network
9795
build:remote --host_platform=@npm//@angular/build-tooling/bazel/remote-execution:platform_with_network
9896
build:remote --platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform_with_network

src/BUILD.bazel

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ ts_config(
6363
rules_js_tsconfig(
6464
name = "build-tsconfig",
6565
src = "bazel-tsconfig-build.json",
66-
deps = [],
66+
deps = [
67+
"//:node_modules/tslib",
68+
],
6769
)
6870

6971
rules_js_tsconfig(

src/material/dialog/testing/BUILD.bazel

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library")
1+
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite")
2+
load("//tools:defaults2.bzl", "ts_project")
23

34
package(default_visibility = ["//visibility:public"])
45

5-
ts_library(
6+
ts_project(
67
name = "testing",
78
srcs = glob(
89
["**/*.ts"],
910
exclude = ["**/*.spec.ts"],
1011
),
11-
deps = [
12+
interop_deps = [
1213
"//src/cdk/overlay",
1314
"//src/cdk/testing",
1415
"//src/material/dialog",
15-
"@npm//@angular/core",
16-
"@npm//@angular/platform-browser",
17-
"@npm//rxjs",
16+
],
17+
deps = [
18+
"//:node_modules/@angular/core",
19+
"//:node_modules/@angular/platform-browser",
20+
"//:node_modules/rxjs",
1821
],
1922
)
2023

src/material/divider/testing/BUILD.bazel

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library")
1+
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite")
2+
load("//tools:defaults2.bzl", "ts_project")
23

34
package(default_visibility = ["//visibility:public"])
45

5-
ts_library(
6+
ts_project(
67
name = "testing",
78
srcs = glob(
89
["**/*.ts"],
910
exclude = ["**/*.spec.ts"],
1011
),
11-
deps = [
12+
interop_deps = [
1213
"//src/cdk/testing",
1314
],
1415
)

src/material/expansion/testing/BUILD.bazel

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library")
1+
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite")
2+
load("//tools:defaults2.bzl", "ts_project")
23

34
package(default_visibility = ["//visibility:public"])
45

5-
ts_library(
6+
ts_project(
67
name = "testing",
78
srcs = glob(
89
["**/*.ts"],
910
exclude = ["**/*.spec.ts"],
1011
),
11-
deps = [
12+
interop_deps = [
1213
"//src/cdk/testing",
1314
],
1415
)

src/material/form-field/testing/BUILD.bazel

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library")
1+
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite")
2+
load("//tools:defaults2.bzl", "ts_project")
23

34
package(default_visibility = ["//visibility:public"])
45

5-
ts_library(
6+
ts_project(
67
name = "testing",
78
srcs = glob(
89
["**/*.ts"],
910
exclude = ["**/*.spec.ts"],
1011
),
11-
deps = [
12+
interop_deps = [
1213
"//src/cdk/testing",
1314
"//src/material/datepicker/testing",
1415
"//src/material/form-field/testing/control",

src/material/form-field/testing/control/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
load("//tools:defaults.bzl", "ts_library")
1+
load("//tools:defaults2.bzl", "ts_project")
22

33
package(default_visibility = ["//visibility:public"])
44

5-
ts_library(
5+
ts_project(
66
name = "control",
77
srcs = glob(["**/*.ts"]),
8-
deps = ["//src/cdk/testing"],
8+
interop_deps = ["//src/cdk/testing"],
99
)
1010

1111
filegroup(

src/material/grid-list/testing/BUILD.bazel

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library")
1+
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite")
2+
load("//tools:defaults2.bzl", "ts_project")
23

34
package(default_visibility = ["//visibility:public"])
45

5-
ts_library(
6+
ts_project(
67
name = "testing",
78
srcs = glob(
89
["**/*.ts"],
910
exclude = ["**/*.spec.ts"],
1011
),
11-
deps = [
12+
interop_deps = [
1213
"//src/cdk/testing",
1314
"//src/material/grid-list",
1415
],

src/material/input/testing/BUILD.bazel

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library")
1+
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite")
2+
load("//tools:defaults2.bzl", "ts_project")
23

34
package(default_visibility = ["//visibility:public"])
45

5-
ts_library(
6+
ts_project(
67
name = "testing",
78
srcs = glob(
89
["**/*.ts"],
910
exclude = ["**/*.spec.ts"],
1011
),
11-
deps = [
12+
interop_deps = [
1213
"//src/cdk/coercion",
1314
"//src/cdk/testing",
1415
"//src/material/form-field/testing/control",

src/material/list/testing/BUILD.bazel

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library")
1+
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite")
2+
load("//tools:defaults2.bzl", "ts_project")
23

34
package(default_visibility = ["//visibility:public"])
45

5-
ts_library(
6+
ts_project(
67
name = "testing",
78
srcs = glob(
89
["**/*.ts"],
910
exclude = ["**/*.spec.ts"],
1011
),
11-
deps = [
12+
interop_deps = [
1213
"//src/cdk/coercion",
1314
"//src/cdk/testing",
1415
"//src/material/divider/testing",

0 commit comments

Comments
 (0)