Skip to content

Commit 8a87ff8

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

File tree

1 file changed

+39
-41
lines changed

1 file changed

+39
-41
lines changed

packages/angular/cli/BUILD.bazel

+39-41
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
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:ng_cli_schema_generator.bzl", "cli_json_schema")
910
load("//tools:ts_json_schema.bzl", "ts_json_schema")
1011

1112
licenses(["notice"])
1213

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

15-
ts_library(
16+
ts_project(
1617
name = "angular-cli",
17-
package_name = "@angular/cli",
1818
srcs = glob(
1919
include = [
2020
"lib/**/*.ts",
@@ -24,11 +24,9 @@ ts_library(
2424
"**/*_spec.ts",
2525
],
2626
) + [
27-
# @external_begin
2827
# These files are generated from the JSON schema
2928
"//packages/angular/cli:lib/config/workspace-schema.ts",
3029
"//packages/angular/cli:src/commands/update/schematic/schema.ts",
31-
# @external_end
3230
],
3331
data = glob(
3432
include = [
@@ -40,43 +38,42 @@ ts_library(
4038
"lib/config/workspace-schema.json",
4139
],
4240
) + [
43-
# @external_begin
4441
"//packages/angular/cli:lib/config/schema.json",
45-
# @external_end
4642
],
47-
module_name = "@angular/cli",
48-
deps = [
49-
"//packages/angular_devkit/architect",
50-
"//packages/angular_devkit/architect/node",
51-
"//packages/angular_devkit/core",
52-
"//packages/angular_devkit/core/node",
43+
interop_deps = [
5344
"//packages/angular_devkit/schematics",
5445
"//packages/angular_devkit/schematics/tasks",
5546
"//packages/angular_devkit/schematics/tools",
56-
"@npm//@angular/core",
57-
"@npm//@inquirer/prompts",
58-
"@npm//@listr2/prompt-adapter-inquirer",
59-
"@npm//@types/ini",
60-
"@npm//@types/node",
61-
"@npm//@types/npm-package-arg",
62-
"@npm//@types/pacote",
63-
"@npm//@types/resolve",
64-
"@npm//@types/semver",
65-
"@npm//@types/yargs",
66-
"@npm//@types/yarnpkg__lockfile",
67-
"@npm//@yarnpkg/lockfile",
68-
"@npm//ini",
69-
"@npm//jsonc-parser",
70-
"@npm//listr2",
71-
"@npm//npm-package-arg",
72-
"@npm//npm-pick-manifest",
73-
"@npm//pacote",
74-
"@npm//semver",
75-
"@npm//yargs",
47+
],
48+
module_name = "@angular/cli",
49+
deps = [
50+
"//:root_modules/@angular/core",
51+
"//:root_modules/@inquirer/prompts",
52+
"//:root_modules/@listr2/prompt-adapter-inquirer",
53+
"//:root_modules/@types/ini",
54+
"//:root_modules/@types/node",
55+
"//:root_modules/@types/npm-package-arg",
56+
"//:root_modules/@types/pacote",
57+
"//:root_modules/@types/resolve",
58+
"//:root_modules/@types/semver",
59+
"//:root_modules/@types/yargs",
60+
"//:root_modules/@types/yarnpkg__lockfile",
61+
"//:root_modules/@yarnpkg/lockfile",
62+
"//:root_modules/ini",
63+
"//:root_modules/jsonc-parser",
64+
"//:root_modules/listr2",
65+
"//:root_modules/npm-package-arg",
66+
"//:root_modules/npm-pick-manifest",
67+
"//:root_modules/pacote",
68+
"//:root_modules/semver",
69+
"//:root_modules/yargs",
70+
"//packages/angular_devkit/architect:architect_rjs",
71+
"//packages/angular_devkit/architect/node:node_rjs",
72+
"//packages/angular_devkit/core:core_rjs",
73+
"//packages/angular_devkit/core/node:node_rjs",
7674
],
7775
)
7876

79-
# @external_begin
8077
CLI_SCHEMA_DATA = [
8178
"//packages/angular/build:src/builders/application/schema.json",
8279
"//packages/angular/build:src/builders/dev-server/schema.json",
@@ -131,7 +128,7 @@ ts_json_schema(
131128
src = "src/commands/update/schematic/schema.json",
132129
)
133130

134-
ts_library(
131+
ts_project(
135132
name = "angular-cli_test_lib",
136133
testonly = True,
137134
srcs = glob(
@@ -141,13 +138,15 @@ ts_library(
141138
"node_modules/**",
142139
],
143140
),
144-
deps = [
145-
":angular-cli",
146-
"//packages/angular_devkit/core",
141+
interop_deps = [
147142
"//packages/angular_devkit/schematics",
148143
"//packages/angular_devkit/schematics/testing",
149-
"@npm//@types/semver",
150-
"@npm//@types/yargs",
144+
],
145+
deps = [
146+
":angular-cli_rjs",
147+
"//:root_modules/@types/semver",
148+
"//:root_modules/@types/yargs",
149+
"//packages/angular_devkit/core:core_rjs",
151150
],
152151
)
153152

@@ -182,4 +181,3 @@ pkg_npm(
182181
":src/commands/update/schematic/schema.json",
183182
],
184183
)
185-
# @external_end

0 commit comments

Comments
 (0)