Skip to content

Commit 7348e8c

Browse files
committed
build: migrate @angular/pwa to ts_project
The `@angular/pwa` package has been migrated to the `rules_js` ts_project rule.
1 parent 8a87ff8 commit 7348e8c

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

packages/angular/pwa/BUILD.bazel

+16-10
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# found in the LICENSE file at https://angular.dev/license
55

66
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
7-
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
7+
load("//tools:defaults.bzl", "pkg_npm")
8+
load("//tools:interop.bzl", "ts_project")
89
load("//tools:ts_json_schema.bzl", "ts_json_schema")
910

1011
licenses(["notice"])
1112

1213
package(default_visibility = ["//visibility:public"])
1314

14-
ts_library(
15+
ts_project(
1516
name = "pwa",
16-
package_name = "@angular/pwa",
1717
srcs = [
1818
"pwa/index.ts",
1919
"//packages/angular/pwa:pwa/schema.ts",
@@ -26,11 +26,14 @@ ts_library(
2626
"pwa/files/**/*",
2727
],
2828
),
29-
deps = [
29+
interop_deps = [
3030
"//packages/angular_devkit/schematics",
31-
"//packages/schematics/angular",
32-
"@npm//@types/node",
33-
"@npm//parse5-html-rewriting-stream",
31+
],
32+
module_name = "@angular/pwa",
33+
deps = [
34+
"//:root_modules/@types/node",
35+
"//:root_modules/parse5-html-rewriting-stream",
36+
"//packages/schematics/angular:angular_rjs",
3437
],
3538
)
3639

@@ -39,14 +42,17 @@ ts_json_schema(
3942
src = "pwa/schema.json",
4043
)
4144

42-
ts_library(
45+
ts_project(
4346
name = "pwa_test_lib",
4447
testonly = True,
4548
srcs = glob(["pwa/**/*_spec.ts"]),
46-
deps = [
47-
":pwa",
49+
interop_deps = [
4850
"//packages/angular_devkit/schematics/testing",
4951
],
52+
deps = [
53+
":pwa_rjs",
54+
"//:root_modules/@types/jasmine",
55+
],
5056
)
5157

5258
jasmine_node_test(

0 commit comments

Comments
 (0)