Skip to content

Commit

Permalink
build: migrate angular-devkit/architect to ts_project
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
devversion authored and clydin committed Dec 16, 2024
1 parent 620671d commit a19a72d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 20 deletions.
31 changes: 18 additions & 13 deletions packages/angular_devkit/architect/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down Expand Up @@ -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",
],
Expand All @@ -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",
],
)

Expand Down
9 changes: 9 additions & 0 deletions packages/angular_devkit/architect/index.ts
Original file line number Diff line number Diff line change
@@ -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';
15 changes: 8 additions & 7 deletions packages/angular_devkit/architect/testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)

0 comments on commit a19a72d

Please sign in to comment.