Skip to content

Commit ef70b77

Browse files
devversionalan-agius4
authored andcommitted
build: remove usages of rules_nodejs copy_to_bin
Replaces usages of `rules_nodejs` `copy_to_bin` with the `rules_js`/Aspect bazel lib equivalent.
1 parent 448e920 commit ef70b77

File tree

4 files changed

+11
-17
lines changed

4 files changed

+11
-17
lines changed

BUILD.bazel

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
2-
3-
# Copyright Google Inc. All Rights Reserved.
4-
#
5-
# Use of this source code is governed by an MIT-style license that can be
6-
# found in the LICENSE file at https://angular.dev/license
72
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
8-
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
9-
load("@npm//@bazel/concatjs:index.bzl", "ts_config")
103
load("@npm2//:defs.bzl", "npm_link_all_packages")
4+
load("//tools:defaults2.bzl", "copy_to_bin")
115

126
package(default_visibility = ["//visibility:public"])
137

@@ -100,11 +94,3 @@ config_setting(
10094
":enable_snapshot_repo_deps": "true",
10195
},
10296
)
103-
104-
ts_config(
105-
name = "tsconfig-build-esm",
106-
src = "tsconfig-build-esm.json",
107-
deps = [
108-
":tsconfig.json",
109-
],
110-
)

tests/legacy-cli/e2e/assets/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
1+
load("//tools:defaults2.bzl", "copy_to_bin")
22

33
copy_to_bin(
44
name = "assets",

tests/legacy-cli/e2e/ng-snapshot/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
1+
load("//tools:defaults2.bzl", "copy_to_bin")
22

33
copy_to_bin(
44
name = "ng-snapshot",

tools/defaults2.bzl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", _copy_to_bin = "copy_to_bin")
12
load("@aspect_rules_jasmine//jasmine:defs.bzl", _jasmine_test = "jasmine_test")
3+
load("@aspect_rules_js//js:defs.bzl", _js_binary = "js_binary")
24
load("//tools:interop.bzl", _ts_project = "ts_project")
35
load("//tools/bazel:npm_package.bzl", _npm_package = "npm_package")
46

@@ -8,6 +10,12 @@ def ts_project(**kwargs):
810
def npm_package(**kwargs):
911
_npm_package(**kwargs)
1012

13+
def copy_to_bin(**kwargs):
14+
_copy_to_bin(**kwargs)
15+
16+
def js_binary(**kwargs):
17+
_js_binary(**kwargs)
18+
1119
def jasmine_test(data = [], args = [], **kwargs):
1220
# Create relative path to root, from current package dir. Necessary as
1321
# we change the `chdir` below to the package directory.

0 commit comments

Comments
 (0)