Skip to content

Commit c9fb4e3

Browse files
josephperrottthePunderWoman
authored andcommitted
build: use ts_project based extract_types (#62875)
Use the extract_types that pulls from ts_project deps PR Close #62875
1 parent ea1afec commit c9fb4e3

6 files changed

Lines changed: 15 additions & 23 deletions

File tree

‎packages/compiler-cli/BUILD.bazel‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
load("@aspect_rules_esbuild//esbuild:defs.bzl", "esbuild")
22
load("@npm2//:defs.bzl", "npm_link_all_packages")
3-
load("//tools:defaults.bzl", "extract_types", "pkg_npm")
4-
load("//tools:defaults2.bzl", "api_golden_test", "npm_package", "ts_config", "ts_project")
3+
load("//tools:defaults.bzl", "pkg_npm")
4+
load("//tools:defaults2.bzl", "api_golden_test", "extract_types", "npm_package", "ts_config", "ts_project")
55

66
package(default_visibility = ["//visibility:public"])
77

88
PUBLIC_TARGETS = [
9-
":compiler-cli",
10-
"//packages/compiler-cli/private",
11-
"//packages/compiler-cli/linker",
12-
"//packages/compiler-cli/linker/babel",
13-
]
14-
15-
PUBLIC_TARGETS_RJS = [
169
":compiler-cli_rjs",
1710
"//packages/compiler-cli/private:private_rjs",
1811
"//packages/compiler-cli/linker:linker_rjs",
@@ -68,7 +61,7 @@ esbuild(
6861
platform = "node",
6962
splitting = True,
7063
target = "node20",
71-
deps = PUBLIC_TARGETS_RJS,
64+
deps = PUBLIC_TARGETS,
7265
)
7366

7467
ts_project(

‎packages/language-service/BUILD.bazel‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
load("@aspect_rules_esbuild//esbuild:defs.bzl", "esbuild")
2-
load("//tools:defaults.bzl", "extract_types", "pkg_npm")
3-
load("//tools:defaults2.bzl", "ts_config", "ts_project")
2+
load("//tools:defaults.bzl", "pkg_npm")
3+
load("//tools:defaults2.bzl", "extract_types", "ts_config", "ts_project")
44

55
package(default_visibility = ["//visibility:public"])
66

@@ -50,8 +50,8 @@ esbuild(
5050
extract_types(
5151
name = "types",
5252
deps = [
53-
":api",
54-
":factory_lib",
53+
":api_rjs",
54+
":factory_lib_rjs",
5555
],
5656
)
5757

‎packages/localize/tools/BUILD.bazel‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
load("@aspect_rules_esbuild//esbuild:defs.bzl", "esbuild")
2-
load("//tools:defaults.bzl", "extract_types", "pkg_npm")
3-
load("//tools:defaults2.bzl", "ts_config", "ts_project")
2+
load("//tools:defaults.bzl", "pkg_npm")
3+
load("//tools:defaults2.bzl", "extract_types", "ts_config", "ts_project")
44

55
ts_config(
66
name = "tsconfig_build",
@@ -60,7 +60,7 @@ esbuild(
6060

6161
extract_types(
6262
name = "api_type_definitions",
63-
deps = [":tools"],
63+
deps = [":tools_rjs"],
6464
)
6565

6666
pkg_npm(

‎packages/zone.js/BUILD.bazel‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
load("//packages/zone.js:bundles.bzl", "BUNDLES_ENTRY_POINTS")
22
load("//packages/zone.js:tools.bzl", "generate_rollup_bundle")
3-
load("//tools:defaults.bzl", "extract_types", "pkg_npm")
4-
load("//tools:defaults2.bzl", "npm_package", "ts_config", "ts_project")
3+
load("//tools:defaults.bzl", "pkg_npm")
4+
load("//tools:defaults2.bzl", "extract_types", "npm_package", "ts_config", "ts_project")
55

66
package(default_visibility = ["//visibility:public"])
77

@@ -48,7 +48,7 @@ ts_project(
4848
extract_types(
4949
name = "zone_d_ts",
5050
visibility = ["//visibility:private"],
51-
deps = [":zone_js"],
51+
deps = [":zone_js_rjs"],
5252
)
5353

5454
generate_rollup_bundle(

‎tools/defaults.bzl‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33
load("@build_bazel_rules_nodejs//:index.bzl", _pkg_npm = "pkg_npm")
44
load("@devinfra//bazel:extract_js_module_output.bzl", "extract_js_module_output")
5-
load("@devinfra//bazel:extract_types.bzl", _extract_types = "extract_types")
65
load("@rules_pkg//:pkg.bzl", "pkg_tar")
76

8-
extract_types = _extract_types
9-
107
# Packages which are versioned together on npm
118
ANGULAR_SCOPED_PACKAGES = ["@angular/%s" % p for p in [
129
# core should be the first package because it's the main package in the group

‎tools/defaults2.bzl‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", _copy_to_bin = "copy_to_bin")
22
load("@aspect_rules_js//npm:defs.bzl", _npm_package = "npm_package")
33
load("@aspect_rules_ts//ts:defs.bzl", _ts_config = "ts_config")
4+
load("@devinfra//bazel:extract_types_rjs.bzl", _extract_types = "extract_types")
45
load("@devinfra//bazel/http-server:index.bzl", _http_server = "http_server")
56
load("@rules_angular//src/ng_project:index.bzl", _ng_project = "ng_project")
67
load("@rules_sass//src:index.bzl", _npm_sass_library = "npm_sass_library", _sass_binary = "sass_binary", _sass_library = "sass_library")
@@ -17,6 +18,7 @@ load("//tools/bazel:tsec.bzl", _tsec_test = "tsec_test")
1718
load("//tools/bazel:web_test.bzl", _ng_web_test_suite = "ng_web_test_suite", _web_test = "web_test", _zoneless_web_test_suite = "zoneless_web_test_suite")
1819
load("//tools/bazel/esbuild:zone_bundle.bzl", _zone_bundle = "zone_bundle")
1920

21+
extract_types = _extract_types
2022
esbuild = _esbuild
2123
zone_bundle = _zone_bundle
2224
js_binary = _js_binary

0 commit comments

Comments
 (0)