4
4
# found in the LICENSE file at https://angular.dev/license
5
5
6
6
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" )
8
9
load ("//tools:ts_json_schema.bzl" , "ts_json_schema" )
9
10
10
11
licenses (["notice" ])
@@ -35,9 +36,8 @@ ALL_SCHEMA_TARGETS = [
35
36
for (src , name ) in ALL_SCHEMA_TARGETS
36
37
]
37
38
38
- ts_library (
39
+ ts_project (
39
40
name = "angular" ,
40
- package_name = "@schematics/angular" ,
41
41
srcs = glob (
42
42
include = ["**/*.ts" ],
43
43
exclude = [
@@ -78,16 +78,18 @@ ts_library(
78
78
"node_modules/**" ,
79
79
],
80
80
),
81
- module_name = "@schematics/angular" ,
82
- deps = [
83
- "//packages/angular_devkit/core" ,
81
+ interop_deps = [
84
82
"//packages/angular_devkit/schematics" ,
85
83
"//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" ,
91
93
],
92
94
)
93
95
@@ -96,11 +98,11 @@ jasmine_node_test(
96
98
srcs = ["no_typescript_runtime_dep_spec.js" ],
97
99
deps = [
98
100
":angular" ,
99
- "@npm/ /jasmine" ,
101
+ "//:root_modules/@types /jasmine" ,
100
102
],
101
103
)
102
104
103
- ts_library (
105
+ ts_project (
104
106
name = "angular_test_lib" ,
105
107
testonly = True ,
106
108
srcs = glob (
@@ -113,28 +115,24 @@ ts_library(
113
115
"node_modules/**" ,
114
116
],
115
117
),
116
- # @external_begin
117
- deps = [
118
- ":angular" ,
119
- "//packages/angular_devkit/core" ,
120
- "//packages/angular_devkit/core/node/testing" ,
118
+ interop_deps = [
121
119
"//packages/angular_devkit/schematics" ,
122
120
"//packages/angular_devkit/schematics/tasks" ,
123
121
"//packages/angular_devkit/schematics/testing" ,
124
- "//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript" ,
125
- "@npm//jsonc-parser" ,
126
122
],
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
+ ],
128
131
)
129
132
130
133
jasmine_node_test (
131
134
name = "angular_test" ,
132
135
srcs = [":angular_test_lib" ],
133
- deps = [
134
- "//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript" ,
135
- "@npm//jasmine" ,
136
- "@npm//source-map" ,
137
- ],
138
136
)
139
137
140
138
genrule (
0 commit comments