44# found in the LICENSE file at https://angular.dev/license
55
66load ("@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" )
89load ("//tools:ts_json_schema.bzl" , "ts_json_schema" )
910
1011licenses (["notice" ])
@@ -35,9 +36,8 @@ ALL_SCHEMA_TARGETS = [
3536 for (src , name ) in ALL_SCHEMA_TARGETS
3637]
3738
38- ts_library (
39+ ts_project (
3940 name = "angular" ,
40- package_name = "@schematics/angular" ,
4141 srcs = glob (
4242 include = ["**/*.ts" ],
4343 exclude = [
@@ -78,16 +78,18 @@ ts_library(
7878 "node_modules/**" ,
7979 ],
8080 ),
81- module_name = "@schematics/angular" ,
82- deps = [
83- "//packages/angular_devkit/core" ,
81+ interop_deps = [
8482 "//packages/angular_devkit/schematics" ,
8583 "//packages/angular_devkit/schematics/tasks" ,
86- "//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript" ,
87- "@npm//@inquirer/prompts" ,
88- "@npm//@types/node" ,
89- "@npm//browserslist" ,
90- "@npm//jsonc-parser" ,
84+ ],
85+ module_name = "@schematics/angular" ,
86+ deps = [
87+ "//:root_modules/@inquirer/prompts" ,
88+ "//:root_modules/@types/node" ,
89+ "//:root_modules/browserslist" ,
90+ "//:root_modules/jsonc-parser" ,
91+ "//packages/angular_devkit/core:core_rjs" ,
92+ "//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript:TypeScript_rjs" ,
9193 ],
9294)
9395
@@ -96,11 +98,11 @@ jasmine_node_test(
9698 srcs = ["no_typescript_runtime_dep_spec.js" ],
9799 deps = [
98100 ":angular" ,
99- "@npm/ /jasmine" ,
101+ "//:root_modules/@types /jasmine" ,
100102 ],
101103)
102104
103- ts_library (
105+ ts_project (
104106 name = "angular_test_lib" ,
105107 testonly = True ,
106108 srcs = glob (
@@ -113,28 +115,24 @@ ts_library(
113115 "node_modules/**" ,
114116 ],
115117 ),
116- # @external_begin
117- deps = [
118- ":angular" ,
119- "//packages/angular_devkit/core" ,
120- "//packages/angular_devkit/core/node/testing" ,
118+ interop_deps = [
121119 "//packages/angular_devkit/schematics" ,
122120 "//packages/angular_devkit/schematics/tasks" ,
123121 "//packages/angular_devkit/schematics/testing" ,
124- "//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript" ,
125- "@npm//jsonc-parser" ,
126122 ],
127- # @external_end
123+ deps = [
124+ ":angular_rjs" ,
125+ "//:root_modules/@types/jasmine" ,
126+ "//:root_modules/jsonc-parser" ,
127+ "//packages/angular_devkit/core:core_rjs" ,
128+ "//packages/angular_devkit/core/node/testing:testing_rjs" ,
129+ "//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript:TypeScript_rjs" ,
130+ ],
128131)
129132
130133jasmine_node_test (
131134 name = "angular_test" ,
132135 srcs = [":angular_test_lib" ],
133- deps = [
134- "//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript" ,
135- "@npm//jasmine" ,
136- "@npm//source-map" ,
137- ],
138136)
139137
140138genrule (
0 commit comments