Skip to content

Commit a9a3db3

Browse files
committed
build: remove ts_library from defaults.bzl
This rule is no longer needed, so we can remove it from our macros. Also removes patches for it.
1 parent b45475c commit a9a3db3

File tree

4 files changed

+4
-58
lines changed

4 files changed

+4
-58
lines changed

WORKSPACE

-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ yarn_install(
114114
"//:tools/postinstall/apply-patches.js",
115115
"//:tools/postinstall/patches/@angular+bazel+20.0.0-next.1.patch",
116116
"//:tools/postinstall/patches/@angular+build-tooling+0.0.0-1ebf18a3a60b182a3dbad12e9a149fd93af5c29b.patch",
117-
"//:tools/postinstall/patches/@bazel+concatjs+5.8.1.patch",
118117
"//:tools/postinstall/patches/tsec+0.2.2.patch",
119118
"//src/cdk:package.json",
120119
],

tools/defaults.bzl

-44
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ load("@npm//@angular/build-tooling/bazel/http-server:index.bzl", _http_server =
1212
load("@npm//@angular/build-tooling/bazel:extract_js_module_output.bzl", "extract_js_module_output")
1313
load("@npm//@bazel/jasmine:index.bzl", _jasmine_node_test = "jasmine_node_test")
1414
load("@npm//@bazel/protractor:index.bzl", _protractor_web_test_suite = "protractor_web_test_suite")
15-
load("@npm//@bazel/concatjs:index.bzl", _ts_library = "ts_library")
1615
load("@npm//tsec:index.bzl", _tsec_test = "tsec_test")
1716
load("//:packages.bzl", "NO_STAMP_NPM_PACKAGE_SUBSTITUTIONS", "NPM_PACKAGE_SUBSTITUTIONS")
1817
load("//:pkg-externals.bzl", "PKG_EXTERNALS")
@@ -68,49 +67,6 @@ def sass_library(**kwargs):
6867
def npm_sass_library(**kwargs):
6968
_npm_sass_library(**kwargs)
7069

71-
def ts_library(
72-
tsconfig = None,
73-
deps = [],
74-
testonly = False,
75-
# TODO(devversion): disallow configuration of the target when schematics use ESM.
76-
devmode_target = None,
77-
prodmode_target = None,
78-
devmode_module = None,
79-
**kwargs):
80-
# Add tslib because we use import helpers for all public packages.
81-
local_deps = ["@npm//tslib"] + deps
82-
83-
if not tsconfig:
84-
tsconfig = _getDefaultTsConfig(testonly)
85-
86-
# Compute an AMD module name for the target.
87-
module_name = compute_module_name(testonly)
88-
89-
_ts_library(
90-
# `module_name` is used for AMD module names within emitted JavaScript files.
91-
module_name = module_name,
92-
# We use the module name as package name, so that the target can be resolved within
93-
# NodeJS executions, by activating the Bazel NodeJS linker.
94-
# See: https://github.com/bazelbuild/rules_nodejs/pull/2799.
95-
package_name = module_name,
96-
# For prodmode, the target is set to `ES2022`. `@bazel/typecript` sets `ES2015` by default. Note
97-
# that this should be in sync with the `ng_module` tsconfig generation to emit proper APF v13.
98-
# https://github.com/bazelbuild/rules_nodejs/blob/901df3868e3ceda177d3ed181205e8456a5592ea/third_party/github.com/bazelbuild/rules_typescript/internal/common/tsconfig.bzl#L195
99-
prodmode_target = prodmode_target if prodmode_target != None else "es2022",
100-
# We also set devmode output to the same settings as prodmode as a first step in combining
101-
# devmode and prodmode output. We will not rely on AMD output anyway due to the linker processing.
102-
devmode_target = devmode_target if devmode_target != None else "es2022",
103-
devmode_module = devmode_module if devmode_module != None else "esnext",
104-
tsconfig = tsconfig,
105-
testonly = testonly,
106-
deps = local_deps,
107-
**kwargs
108-
)
109-
110-
# TODO(devversion): Partner with ISE team to support `rules_js` here.
111-
if False and module_name and not testonly:
112-
_make_tsec_test(kwargs["name"])
113-
11470
def ng_module(
11571
deps = [],
11672
srcs = [],

tools/defaults2.bzl

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ def ts_project(
1919
**kwargs
2020
)
2121

22+
# TODO(devversion): Partner with ISE team to support `rules_js` here.
23+
# if False and not testonly:
24+
# _make_tsec_test(kwargs["name"])
25+
2226
def jasmine_test(data = [], args = [], **kwargs):
2327
# Create relative path to root, from current package dir. Necessary as
2428
# we change the `chdir` below to the package directory.

tools/postinstall/patches/@bazel+concatjs+5.8.1.patch

-13
This file was deleted.

0 commit comments

Comments
 (0)