Skip to content

Commit cfd2de8

Browse files
committed
build: remove unused ng_module rule
The ssr package uses ts_project directly now.
1 parent f00c2c1 commit cfd2de8

File tree

2 files changed

+1
-50
lines changed

2 files changed

+1
-50
lines changed

BUILD.bazel

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
66
# found in the LICENSE file at https://angular.dev/license
77
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
88
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
9-
load("@npm//@bazel/concatjs:index.bzl", "ts_config")
109
load("@npm2//:defs.bzl", "npm_link_all_packages")
1110

1211
package(default_visibility = ["//visibility:public"])
@@ -92,11 +91,3 @@ config_setting(
9291
":enable_snapshot_repo_deps": "true",
9392
},
9493
)
95-
96-
ts_config(
97-
name = "tsconfig-build-ng",
98-
src = "tsconfig-build-ng.json",
99-
deps = [
100-
":tsconfig.json",
101-
],
102-
)

tools/defaults.bzl

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
55
load("@aspect_bazel_lib//lib:jq.bzl", "jq")
66
load("@aspect_bazel_lib//lib:utils.bzl", "to_label")
77
load("@build_bazel_rules_nodejs//:index.bzl", _js_library = "js_library", _pkg_npm = "pkg_npm")
8-
load("@npm//@angular/bazel:index.bzl", _ng_module = "ng_module", _ng_package = "ng_package")
8+
load("@npm//@angular/bazel:index.bzl", _ng_package = "ng_package")
99
load("@npm//@angular/build-tooling/bazel:extract_js_module_output.bzl", "extract_js_module_output")
1010
load("@rules_pkg//:pkg.bzl", "pkg_tar")
1111
load("//tools:link_package_json_to_tarballs.bzl", "link_package_json_to_tarballs")
1212
load("//tools:snapshot_repo_filter.bzl", "SNAPSHOT_REPO_JQ_FILTER")
1313
load("//tools:substitutions.bzl", "NO_STAMP_PACKAGE_SUBSTITUTIONS", "NPM_PACKAGE_SUBSTITUTIONS")
1414

15-
_DEFAULT_TSCONFIG_NG = "//:tsconfig-build-ng"
1615
_DEFAULT_TSCONFIG_TEST = "//:tsconfig-test.json"
1716

1817
def _default_module_name(testonly):
@@ -177,45 +176,6 @@ def pkg_npm(name, pkg_deps = [], use_prodmode_output = False, **kwargs):
177176
visibility = visibility,
178177
)
179178

180-
def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps = [], module_name = None, package_name = None, **kwargs):
181-
"""Default values for ng_module"""
182-
deps = deps + ["@npm//tslib"]
183-
if testonly:
184-
# Match the types[] in //packages:tsconfig-test.json
185-
deps.append("@npm//@types/jasmine")
186-
deps.append("@npm//@types/node")
187-
if not tsconfig:
188-
if testonly:
189-
tsconfig = _DEFAULT_TSCONFIG_TEST
190-
else:
191-
tsconfig = _DEFAULT_TSCONFIG_NG
192-
193-
if not module_name:
194-
module_name = _default_module_name(testonly)
195-
196-
# If no `package_name` is explicitly set, we use the default module name as package
197-
# name, so that the target can be resolved within NodeJS executions, by activating
198-
# the Bazel NodeJS linker. See: https://github.com/bazelbuild/rules_nodejs/pull/2799.
199-
if not package_name:
200-
package_name = _default_module_name(testonly)
201-
202-
if not entry_point:
203-
entry_point = "public_api.ts"
204-
_ng_module(
205-
name = name,
206-
flat_module_out_file = name,
207-
tsconfig = tsconfig,
208-
entry_point = entry_point,
209-
testonly = testonly,
210-
deps = deps,
211-
# `module_name` is used for AMD module names within emitted JavaScript files.
212-
module_name = module_name,
213-
# `package_name` can be set to allow for the Bazel NodeJS linker to run. This
214-
# allows for resolution of the given target within the `node_modules/`.
215-
package_name = package_name,
216-
**kwargs
217-
)
218-
219179
def ng_package(deps = [], **kwargs):
220180
_ng_package(
221181
deps = deps,

0 commit comments

Comments
 (0)