Skip to content

Commit 465d462

Browse files
committed
build: remove unused bazel rules
This commit remove unused bazel rules.
1 parent a8060ed commit 465d462

File tree

3 files changed

+6
-50
lines changed

3 files changed

+6
-50
lines changed

Diff for: package.json

-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
"@bazel/bazelisk": "1.19.0",
8383
"@bazel/buildifier": "7.1.2",
8484
"@bazel/concatjs": "patch:@bazel/concatjs@npm%3A5.8.1#~/.yarn/patches/@bazel-concatjs-npm-5.8.1-1bf81df846.patch",
85-
"@bazel/esbuild": "5.8.1",
8685
"@bazel/jasmine": "patch:@bazel/jasmine@npm%3A5.8.1#~/.yarn/patches/@bazel-jasmine-npm-5.8.1-3370fee155.patch",
8786
"@discoveryjs/json-ext": "0.6.0",
8887
"@inquirer/confirm": "3.1.14",

Diff for: tools/defaults.bzl

+6-48
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
"""Re-export of some bazel rules with repository-wide defaults."""
22

3+
load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
4+
load("@aspect_bazel_lib//lib:jq.bzl", "jq")
5+
load("@aspect_bazel_lib//lib:utils.bzl", "to_label")
6+
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin", _js_library = "js_library", _pkg_npm = "pkg_npm")
37
load("@npm//@angular/bazel:index.bzl", _ng_module = "ng_module", _ng_package = "ng_package")
8+
load("@npm//@angular/build-tooling/bazel:extract_js_module_output.bzl", "extract_js_module_output")
49
load("@npm//@bazel/concatjs:index.bzl", _ts_library = "ts_library")
5-
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin", _js_library = "js_library", _pkg_npm = "pkg_npm")
610
load("@rules_pkg//:pkg.bzl", "pkg_tar")
7-
load("@npm//@bazel/esbuild:index.bzl", "esbuild")
8-
load("@npm//@angular/build-tooling/bazel:extract_js_module_output.bzl", "extract_js_module_output")
9-
load("@aspect_bazel_lib//lib:utils.bzl", "to_label")
10-
load("@aspect_bazel_lib//lib:jq.bzl", "jq")
11-
load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
11+
load("//:constants.bzl", "RELEASE_ENGINES_NODE", "RELEASE_ENGINES_NPM", "RELEASE_ENGINES_YARN")
1212
load("//tools:link_package_json_to_tarballs.bzl", "link_package_json_to_tarballs")
1313
load("//tools:snapshot_repo_filter.bzl", "SNAPSHOT_REPO_JQ_FILTER")
14-
load("//:constants.bzl", "RELEASE_ENGINES_NODE", "RELEASE_ENGINES_NPM", "RELEASE_ENGINES_YARN")
1514

1615
_DEFAULT_TSCONFIG = "//:tsconfig-build.json"
1716
_DEFAULT_TSCONFIG_NG = "//:tsconfig-build-ng"
@@ -281,44 +280,3 @@ def ng_package(deps = [], **kwargs):
281280
}),
282281
**kwargs
283282
)
284-
285-
def ng_test_library(name, entry_point = None, deps = [], tsconfig = None, **kwargs):
286-
local_deps = [
287-
# We declare "@angular/core" as default dependencies because
288-
# all Angular component unit tests use the `TestBed` and `Component` exports.
289-
"@npm//@angular/core",
290-
] + deps
291-
292-
if not tsconfig:
293-
tsconfig = _DEFAULT_TSCONFIG_TEST
294-
295-
ts_library_name = name + "_ts_library"
296-
ts_library(
297-
name = ts_library_name,
298-
testonly = 1,
299-
tsconfig = tsconfig,
300-
deps = local_deps,
301-
**kwargs
302-
)
303-
304-
esbuild(
305-
name,
306-
testonly = 1,
307-
args = {
308-
"keepNames": True,
309-
# ensure that esbuild prefers .mjs to .js if both are available
310-
# since ts_library produces both
311-
"resolveExtensions": [
312-
".mjs",
313-
".js",
314-
],
315-
},
316-
output = name + "_spec.js",
317-
entry_point = entry_point,
318-
format = "iife",
319-
# We cannot use `ES2017` or higher as that would result in `async/await` not being downleveled.
320-
# ZoneJS needs to be able to intercept these as otherwise change detection would not work properly.
321-
target = "es2016",
322-
platform = "node",
323-
deps = [":" + ts_library_name],
324-
)

Diff for: yarn.lock

-1
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,6 @@ __metadata:
667667
"@bazel/bazelisk": "npm:1.19.0"
668668
"@bazel/buildifier": "npm:7.1.2"
669669
"@bazel/concatjs": "patch:@bazel/concatjs@npm%3A5.8.1#~/.yarn/patches/@bazel-concatjs-npm-5.8.1-1bf81df846.patch"
670-
"@bazel/esbuild": "npm:5.8.1"
671670
"@bazel/jasmine": "patch:@bazel/jasmine@npm%3A5.8.1#~/.yarn/patches/@bazel-jasmine-npm-5.8.1-3370fee155.patch"
672671
"@discoveryjs/json-ext": "npm:0.6.0"
673672
"@inquirer/confirm": "npm:3.1.14"

0 commit comments

Comments
 (0)