Skip to content

Commit a19a72d

Browse files
devversionclydin
authored andcommitted
build: migrate angular-devkit/architect to ts_project
This commit updates the architect devkit package code to use `ts_project`. We specificially don't migrate the jasmine node test yet as we want to experiment further with the incremental migration.
1 parent 620671d commit a19a72d

File tree

3 files changed

+35
-20
lines changed

3 files changed

+35
-20
lines changed

Diff for: packages/angular_devkit/architect/BUILD.bazel

+18-13
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
77
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
8-
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
8+
load("//tools:defaults.bzl", "pkg_npm")
9+
load("//tools:interop.bzl", "ts_project")
910
load("//tools:ts_json_schema.bzl", "ts_json_schema")
1011

1112
licenses(["notice"])
@@ -39,11 +40,11 @@ ts_json_schema(
3940
)
4041
# @external_end
4142

42-
ts_library(
43+
ts_project(
4344
name = "architect",
44-
package_name = "@angular-devkit/architect",
4545
srcs = glob(
4646
include = [
47+
"index.ts",
4748
"src/**/*.ts",
4849
"builders/*.ts",
4950
],
@@ -63,25 +64,29 @@ ts_library(
6364
"node_modules/**",
6465
],
6566
),
66-
module_name = "@angular-devkit/architect",
67-
module_root = "src/index.d.ts",
68-
deps = [
67+
interop_deps = [
6968
"//packages/angular_devkit/core",
7069
"//packages/angular_devkit/core/node",
71-
"@npm//@types/node",
72-
"@npm//rxjs",
70+
],
71+
module_name = "@angular-devkit/architect",
72+
deps = [
73+
"//:node_modules/@types/node",
74+
"//:node_modules/rxjs",
7375
],
7476
)
7577

76-
ts_library(
78+
ts_project(
7779
name = "architect_test_lib",
7880
testonly = True,
7981
srcs = glob(["src/**/*_spec.ts"]),
80-
deps = [
81-
":architect",
82-
"//packages/angular_devkit/architect/testing",
82+
interop_deps = [
8383
"//packages/angular_devkit/core",
84-
"@npm//rxjs",
84+
],
85+
deps = [
86+
":architect_rjs",
87+
"//:node_modules/@types/jasmine",
88+
"//:node_modules/rxjs",
89+
"//packages/angular_devkit/architect/testing:testing_rjs",
8590
],
8691
)
8792

Diff for: packages/angular_devkit/architect/index.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
9+
export * from './src/index';

Diff for: packages/angular_devkit/architect/testing/BUILD.bazel

+8-7
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,26 @@
33
# Use of this source code is governed by an MIT-style license that can be
44
# found in the LICENSE file at https://angular.dev/license
55

6-
load("//tools:defaults.bzl", "ts_library")
6+
load("//tools:interop.bzl", "ts_project")
77

88
licenses(["notice"])
99

1010
package(default_visibility = ["//visibility:public"])
1111

12-
ts_library(
12+
ts_project(
1313
name = "testing",
1414
srcs = glob(
1515
include = ["**/*.ts"],
1616
exclude = ["**/*_spec.ts"],
1717
),
18-
module_name = "@angular-devkit/architect/testing",
19-
module_root = "index.d.ts",
20-
deps = [
18+
interop_deps = [
2119
"//packages/angular_devkit/architect",
2220
"//packages/angular_devkit/core",
2321
"//packages/angular_devkit/core/node",
24-
"@npm//@types/node",
25-
"@npm//rxjs",
22+
],
23+
module_name = "@angular-devkit/architect/testing",
24+
deps = [
25+
"//:node_modules/@types/node",
26+
"//:node_modules/rxjs",
2627
],
2728
)

0 commit comments

Comments
 (0)