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.
This commit is contained in:
Paul Gschwendtner 2025-01-29 13:17:23 +00:00 committed by Alan Agius
parent 01ea33e372
commit 83b9d33946
2 changed files with 10 additions and 9 deletions

View File

@ -53,7 +53,7 @@ ng_package(
"../../third_party/beasties",
],
nested_packages = [
"//packages/angular/ssr/schematics:npm_package",
"//packages/angular/ssr/schematics:pkg",
],
deps = [
":ssr",

View File

@ -3,7 +3,7 @@
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.dev/license
load("//tools:defaults.bzl", "pkg_npm")
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
load("//tools:defaults2.bzl", "jasmine_test", "ts_project")
load("//tools:ts_json_schema.bzl", "ts_json_schema")
@ -57,7 +57,6 @@ ts_project(
"//packages/angular/ssr/schematics:" + src.replace(".json", ".ts")
for (src, _) in ALL_SCHEMA_TARGETS
],
data = [":schematics_assets"],
module_name = "@angular/ssr/schematics",
deps = [
"//packages/angular/ssr:node_modules/@angular-devkit/schematics",
@ -86,16 +85,18 @@ ts_project(
jasmine_test(
name = "ssr_schematics_test",
data = [
":schematics_assets",
":ssr_schematics_test_lib_rjs",
],
)
# This package is intended to be combined into the main @angular/ssr package as a dep.
pkg_npm(
name = "npm_package",
pkg_json = None,
visibility = ["//packages/angular/ssr:__pkg__"],
deps = [
":schematics",
npm_package(
name = "pkg",
srcs = [
"package.json",
":schematics_assets",
":schematics_rjs",
],
visibility = ["//packages/angular/ssr:__pkg__"],
)