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.
This commit is contained in:
Paul Gschwendtner 2024-11-22 16:09:00 +00:00 committed by Charles
parent 620671dc18
commit a19a72d8fc
3 changed files with 35 additions and 20 deletions

View File

@ -5,7 +5,8 @@
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
load("//tools:defaults.bzl", "pkg_npm")
load("//tools:interop.bzl", "ts_project")
load("//tools:ts_json_schema.bzl", "ts_json_schema")
licenses(["notice"])
@ -39,11 +40,11 @@ ts_json_schema(
)
# @external_end
ts_library(
ts_project(
name = "architect",
package_name = "@angular-devkit/architect",
srcs = glob(
include = [
"index.ts",
"src/**/*.ts",
"builders/*.ts",
],
@ -63,25 +64,29 @@ ts_library(
"node_modules/**",
],
),
module_name = "@angular-devkit/architect",
module_root = "src/index.d.ts",
deps = [
interop_deps = [
"//packages/angular_devkit/core",
"//packages/angular_devkit/core/node",
"@npm//@types/node",
"@npm//rxjs",
],
module_name = "@angular-devkit/architect",
deps = [
"//:node_modules/@types/node",
"//:node_modules/rxjs",
],
)
ts_library(
ts_project(
name = "architect_test_lib",
testonly = True,
srcs = glob(["src/**/*_spec.ts"]),
deps = [
":architect",
"//packages/angular_devkit/architect/testing",
interop_deps = [
"//packages/angular_devkit/core",
"@npm//rxjs",
],
deps = [
":architect_rjs",
"//:node_modules/@types/jasmine",
"//:node_modules/rxjs",
"//packages/angular_devkit/architect/testing:testing_rjs",
],
)

View File

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

View File

@ -3,25 +3,26 @@
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.dev/license
load("//tools:defaults.bzl", "ts_library")
load("//tools:interop.bzl", "ts_project")
licenses(["notice"])
package(default_visibility = ["//visibility:public"])
ts_library(
ts_project(
name = "testing",
srcs = glob(
include = ["**/*.ts"],
exclude = ["**/*_spec.ts"],
),
module_name = "@angular-devkit/architect/testing",
module_root = "index.d.ts",
deps = [
interop_deps = [
"//packages/angular_devkit/architect",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core/node",
"@npm//@types/node",
"@npm//rxjs",
],
module_name = "@angular-devkit/architect/testing",
deps = [
"//:node_modules/@types/node",
"//:node_modules/rxjs",
],
)