Skip to content

Commit 83b9d33

Browse files
devversionalan-agius4
authored andcommitted
build: migrate remaining usage of pkg_npm to rules_js
This is necessary so that we can delete the `pkg_npm` macro and fully leverage the `rules_js` variant.
1 parent 01ea33e commit 83b9d33

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

packages/angular/ssr/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ng_package(
5353
"../../third_party/beasties",
5454
],
5555
nested_packages = [
56-
"//packages/angular/ssr/schematics:npm_package",
56+
"//packages/angular/ssr/schematics:pkg",
5757
],
5858
deps = [
5959
":ssr",

packages/angular/ssr/schematics/BUILD.bazel

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Use of this source code is governed by an MIT-style license that can be
44
# found in the LICENSE file at https://angular.dev/license
55

6-
load("//tools:defaults.bzl", "pkg_npm")
6+
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
77
load("//tools:defaults2.bzl", "jasmine_test", "ts_project")
88
load("//tools:ts_json_schema.bzl", "ts_json_schema")
99

@@ -57,7 +57,6 @@ ts_project(
5757
"//packages/angular/ssr/schematics:" + src.replace(".json", ".ts")
5858
for (src, _) in ALL_SCHEMA_TARGETS
5959
],
60-
data = [":schematics_assets"],
6160
module_name = "@angular/ssr/schematics",
6261
deps = [
6362
"//packages/angular/ssr:node_modules/@angular-devkit/schematics",
@@ -86,16 +85,18 @@ ts_project(
8685
jasmine_test(
8786
name = "ssr_schematics_test",
8887
data = [
88+
":schematics_assets",
8989
":ssr_schematics_test_lib_rjs",
9090
],
9191
)
9292

9393
# This package is intended to be combined into the main @angular/ssr package as a dep.
94-
pkg_npm(
95-
name = "npm_package",
96-
pkg_json = None,
97-
visibility = ["//packages/angular/ssr:__pkg__"],
98-
deps = [
99-
":schematics",
94+
npm_package(
95+
name = "pkg",
96+
srcs = [
97+
"package.json",
98+
":schematics_assets",
99+
":schematics_rjs",
100100
],
101+
visibility = ["//packages/angular/ssr:__pkg__"],
101102
)

0 commit comments

Comments
 (0)