11load ("@npm//@angular/build-tooling/bazel/api-golden:index.bzl" , "api_golden_test_npm_package" )
22load ("@npm//@bazel/jasmine:index.bzl" , "jasmine_node_test" )
3- load ("//tools:defaults.bzl" , "pkg_npm" , "ts_library" )
3+ load ("//tools:defaults.bzl" , "pkg_npm" )
4+ load ("//tools:interop.bzl" , "ts_project" )
45load ("//tools:ts_json_schema.bzl" , "ts_json_schema" )
56
67licenses (["notice" ])
@@ -22,9 +23,8 @@ ts_json_schema(
2223 src = "src/builders/extract-i18n/schema.json" ,
2324)
2425
25- ts_library (
26+ ts_project (
2627 name = "build" ,
27- package_name = "@angular/build" ,
2828 srcs = glob (
2929 include = [
3030 "src/**/*.ts" ,
@@ -34,9 +34,9 @@ ts_library(
3434 "src/**/*_spec.ts" ,
3535 "src/**/tests/**/*.ts" ,
3636 "src/testing/**/*.ts" ,
37- "src/private.ts" ,
3837 ],
3938 ) + [
39+ "index.ts" ,
4040 "//packages/angular/build:src/builders/application/schema.ts" ,
4141 "//packages/angular/build:src/builders/dev-server/schema.ts" ,
4242 "//packages/angular/build:src/builders/extract-i18n/schema.ts" ,
@@ -52,82 +52,75 @@ ts_library(
5252 "builders.json" ,
5353 "package.json" ,
5454 ],
55- module_name = "@angular/build" ,
56- module_root = "src/index.d.ts" ,
57- deps = [
55+ interop_deps = [
5856 "//packages/angular/ssr" ,
5957 "//packages/angular/ssr/node" ,
6058 "//packages/angular_devkit/architect" ,
61- "@npm//@ampproject/remapping" ,
62- "@npm//@angular/common" ,
63- "@npm//@angular/compiler" ,
64- "@npm//@angular/compiler-cli" ,
65- "@npm//@angular/core" ,
66- "@npm//@angular/localize" ,
67- "@npm//@angular/platform-server" ,
68- "@npm//@angular/service-worker" ,
69- "@npm//@babel/core" ,
70- "@npm//@babel/helper-annotate-as-pure" ,
71- "@npm//@babel/helper-split-export-declaration" ,
72- "@npm//@babel/plugin-syntax-import-attributes" ,
73- "@npm//@inquirer/confirm" ,
74- "@npm//@types/babel__core" ,
75- "@npm//@types/less" ,
76- "@npm//@types/node" ,
77- "@npm//@types/picomatch" ,
78- "@npm//@types/semver" ,
79- "@npm//@types/watchpack" ,
80- "@npm//@vitejs/plugin-basic-ssl" ,
81- "@npm//beasties" ,
82- "@npm//browserslist" ,
83- "@npm//esbuild" ,
84- "@npm//esbuild-wasm" ,
85- "@npm//fast-glob" ,
86- "@npm//https-proxy-agent" ,
87- "@npm//listr2" ,
88- "@npm//lmdb" ,
89- "@npm//magic-string" ,
90- "@npm//mrmime" ,
91- "@npm//parse5-html-rewriting-stream" ,
92- "@npm//picomatch" ,
93- "@npm//piscina" ,
94- "@npm//postcss" ,
95- "@npm//rollup" ,
96- "@npm//sass" ,
97- "@npm//semver" ,
98- "@npm//tslib" ,
99- "@npm//typescript" ,
100- "@npm//vite" ,
101- "@npm//watchpack" ,
10259 ],
103- )
104-
105- ts_library (
106- name = "private" ,
107- srcs = ["src/private.ts" ],
108- module_name = "@angular/build/private" ,
109- module_root = "src/private.d.ts" ,
60+ module_name = "@angular/build" ,
11061 deps = [
111- "//packages/angular/build" ,
62+ "//:root_modules/@ampproject/remapping" ,
63+ "//:root_modules/@angular/common" ,
64+ "//:root_modules/@angular/compiler" ,
65+ "//:root_modules/@angular/compiler-cli" ,
66+ "//:root_modules/@angular/core" ,
67+ "//:root_modules/@angular/localize" ,
68+ "//:root_modules/@angular/platform-server" ,
69+ "//:root_modules/@angular/service-worker" ,
70+ "//:root_modules/@babel/core" ,
71+ "//:root_modules/@babel/helper-annotate-as-pure" ,
72+ "//:root_modules/@babel/helper-split-export-declaration" ,
73+ "//:root_modules/@babel/plugin-syntax-import-attributes" ,
74+ "//:root_modules/@inquirer/confirm" ,
75+ "//:root_modules/@types/babel__core" ,
76+ "//:root_modules/@types/less" ,
77+ "//:root_modules/@types/node" ,
78+ "//:root_modules/@types/picomatch" ,
79+ "//:root_modules/@types/semver" ,
80+ "//:root_modules/@types/watchpack" ,
81+ "//:root_modules/@vitejs/plugin-basic-ssl" ,
82+ "//:root_modules/beasties" ,
83+ "//:root_modules/browserslist" ,
84+ "//:root_modules/esbuild" ,
85+ "//:root_modules/esbuild-wasm" ,
86+ "//:root_modules/fast-glob" ,
87+ "//:root_modules/https-proxy-agent" ,
88+ "//:root_modules/jsonc-parser" ,
89+ "//:root_modules/listr2" ,
90+ "//:root_modules/lmdb" ,
91+ "//:root_modules/magic-string" ,
92+ "//:root_modules/mrmime" ,
93+ "//:root_modules/parse5-html-rewriting-stream" ,
94+ "//:root_modules/picomatch" ,
95+ "//:root_modules/piscina" ,
96+ "//:root_modules/postcss" ,
97+ "//:root_modules/rollup" ,
98+ "//:root_modules/sass" ,
99+ "//:root_modules/semver" ,
100+ "//:root_modules/tslib" ,
101+ "//:root_modules/typescript" ,
102+ "//:root_modules/vite" ,
103+ "//:root_modules/watchpack" ,
112104 ],
113105)
114106
115- ts_library (
107+ ts_project (
116108 name = "unit_test_lib" ,
117109 testonly = True ,
118110 srcs = glob (
119111 include = ["src/**/*_spec.ts" ],
120112 exclude = ["src/builders/**/tests/**" ],
121113 ),
122114 deps = [
123- ":build" ,
124- ":private" ,
125- "//packages/angular_devkit/core" ,
126- "//packages/angular_devkit/core/node" ,
127- "@npm//@angular/compiler-cli" ,
128- "@npm//@babel/core" ,
129- "@npm//prettier" ,
130- "@npm//typescript" ,
115+ ":build_rjs" ,
116+ "//:root_modules/@angular/compiler-cli" ,
117+ "//:root_modules/@babel/core" ,
118+ "//:root_modules/@types/jasmine" ,
119+ "//:root_modules/prettier" ,
120+ "//:root_modules/typescript" ,
121+ "//packages/angular/build/private:private_rjs" ,
122+ "//packages/angular_devkit/core:core_rjs" ,
123+ "//packages/angular_devkit/core/node:node_rjs" ,
131124 ],
132125)
133126
@@ -136,38 +129,38 @@ jasmine_node_test(
136129 deps = [":unit_test_lib" ],
137130)
138131
139- ts_library (
132+ ts_project (
140133 name = "integration_test_lib" ,
141134 testonly = True ,
142135 srcs = glob (include = ["src/builders/**/tests/**/*.ts" ]),
143136 deps = [
144- ":build " ,
145- ": private" ,
146- "//modules/testing/builder" ,
147- "//packages/angular_devkit/architect" ,
148- "//packages/angular_devkit/architect/node" ,
149- "//packages/angular_devkit/architect/testing" ,
150- "//packages/angular_devkit/core" ,
151- "//packages/angular_devkit/core/node" ,
137+ ":build_rjs " ,
138+ "//packages/angular/build/ private:private_rjs " ,
139+ "//modules/testing/builder:builder_rjs " ,
140+ "//packages/angular_devkit/architect:architect_rjs " ,
141+ "//packages/angular_devkit/architect/node:node_rjs " ,
142+ "//packages/angular_devkit/architect/testing:testing_rjs " ,
143+ "//packages/angular_devkit/core:core_rjs " ,
144+ "//packages/angular_devkit/core/node:node_rjs " ,
152145
153146 # dev server only test deps
154- "@npm/ /@types/http-proxy" ,
155- "@npm/ /http-proxy" ,
156- "@npm/ /puppeteer" ,
147+ "//:root_modules /@types/http-proxy" ,
148+ "//:root_modules /http-proxy" ,
149+ "//:root_modules /puppeteer" ,
157150
158151 # Base dependencies for the application in hello-world-app.
159- "@npm/ /@angular/common" ,
160- "@npm/ /@angular/compiler" ,
161- "@npm/ /@angular/compiler-cli" ,
162- "@npm/ /@angular/core" ,
163- "@npm/ /@angular/platform-browser" ,
164- "@npm/ /@angular/platform-browser-dynamic" ,
165- "@npm/ /@angular/router" ,
166- "@npm/ /rxjs" ,
167- "@npm/ /tslib" ,
168- "@npm/ /typescript" ,
169- "@npm/ /zone.js" ,
170- "@npm/ /buffer" ,
152+ "//:root_modules /@angular/common" ,
153+ "//:root_modules /@angular/compiler" ,
154+ "//:root_modules /@angular/compiler-cli" ,
155+ "//:root_modules /@angular/core" ,
156+ "//:root_modules /@angular/platform-browser" ,
157+ "//:root_modules /@angular/platform-browser-dynamic" ,
158+ "//:root_modules /@angular/router" ,
159+ "//:root_modules /rxjs" ,
160+ "//:root_modules /tslib" ,
161+ "//:root_modules /typescript" ,
162+ "//:root_modules /zone.js" ,
163+ "//:root_modules /buffer" ,
171164 ],
172165)
173166
0 commit comments