Skip to content

[PATCH] Post migration cleanups #30147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ packages/angular_devkit/schematics_cli/node_modules
packages/ngtools/webpack/node_modules
packages/schematics/angular/node_modules
modules/testing/builder/node_modules
tools/legacy-rnjs/node_modules
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults2.bzl", "copy_to_bin")
load("//tools:defaults.bzl", "copy_to_bin")

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

Expand Down
18 changes: 1 addition & 17 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,6 @@ rules_js_register_toolchains(
node_version = DEFAULT_NODE_VERSION,
)

load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")

# TODO(devversion): Remove this once `ng_package` is ported over to `rules_js`.
yarn_install(
name = "npm",
data = [
"//tools/legacy-rnjs:.yarn/patches/@angular-bazel-https-67c38b3c32.patch",
"//tools/legacy-rnjs:.yarn/releases/yarn-4.5.0.cjs",
"//tools/legacy-rnjs:.yarnrc.yml",
],
exports_directories_only = False,
package_json = "//tools/legacy-rnjs:package.json",
yarn = "//tools/legacy-rnjs:.yarn/releases/yarn-4.5.0.cjs",
yarn_lock = "//tools/legacy-rnjs:yarn.lock",
)

http_archive(
name = "aspect_bazel_lib",
sha256 = "57a777c5d4d0b79ad675995ee20fc1d6d2514a1ef3000d98f5c70cf0c09458a3",
Expand Down Expand Up @@ -248,7 +232,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
name = "devinfra",
commit = "feae4f916da946bfc789ff5a9203c3536b624277",
commit = "4090da1485c668f645a967bde605368bc4d62c5d",
remote = "https://github.com/angular/dev-infra.git",
)

Expand Down
2 changes: 1 addition & 1 deletion modules/testing/builder/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults2.bzl", "jasmine_test", "ts_project")
load("//tools:defaults.bzl", "jasmine_test", "ts_project")

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

Expand Down
3 changes: 1 addition & 2 deletions packages/angular/build/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults2.bzl", "copy_to_bin", "jasmine_test", "npm_package", "ts_project")
load("//tools:defaults.bzl", "copy_to_bin", "jasmine_test", "npm_package", "ts_project")
load("//tools:ts_json_schema.bzl", "ts_json_schema")

licenses(["notice"])
Expand Down Expand Up @@ -74,7 +74,6 @@ ts_project(
data = RUNTIME_ASSETS,
# TODO: Fix strict_deps failure
ignore_strict_deps = True,
module_name = "@angular/build",
deps = [
":node_modules/@angular-devkit/architect",
":node_modules/@angular-devkit/core",
Expand Down
3 changes: 1 addition & 2 deletions packages/angular/build/private/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
load("//tools:interop.bzl", "ts_project")
load("//tools:defaults.bzl", "ts_project")

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

ts_project(
name = "private",
srcs = ["index.ts"],
module_name = "@angular/build/private",
deps = [
"//packages/angular/build",
],
Expand Down
9 changes: 4 additions & 5 deletions packages/angular/cli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# found in the LICENSE file at https://angular.dev/license

load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project")
load("//tools:defaults.bzl", "jasmine_test", "npm_package", "ts_project")
load("//tools:ng_cli_schema_generator.bzl", "cli_json_schema")
load("//tools:ts_json_schema.bzl", "ts_json_schema")

Expand Down Expand Up @@ -43,7 +43,6 @@ ts_project(
"//packages/angular/cli:src/commands/update/schematic/schema.ts",
],
data = RUNTIME_ASSETS,
module_name = "@angular/cli",
deps = [
":node_modules/@angular-devkit/architect",
":node_modules/@angular-devkit/core",
Expand Down Expand Up @@ -113,9 +112,9 @@ ts_project(
":angular-cli",
"//:node_modules/@types/semver",
"//:node_modules/@types/yargs",
"//packages/angular_devkit/core:core",
"//packages/angular_devkit/schematics:schematics",
"//packages/angular_devkit/schematics/testing:testing",
"//packages/angular_devkit/core",
"//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics/testing",
],
)

Expand Down
3 changes: 1 addition & 2 deletions packages/angular/create/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 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:defaults2.bzl", "npm_package", "ts_project")
load("//tools:defaults.bzl", "npm_package", "ts_project")

licenses(["notice"])

Expand All @@ -22,7 +22,6 @@ ts_project(
"src/*.ts",
]),
data = RUNTIME_ASSETS,
module_name = "@angular/create",
deps = [
"//:node_modules/@types/node",
"//packages/angular/cli:angular-cli",
Expand Down
5 changes: 2 additions & 3 deletions packages/angular/pwa/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# found in the LICENSE file at https://angular.dev/license

load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project")
load("//tools:defaults.bzl", "jasmine_test", "npm_package", "ts_project")
load("//tools:ts_json_schema.bzl", "ts_json_schema")

licenses(["notice"])
Expand Down Expand Up @@ -32,7 +32,6 @@ ts_project(
"//packages/angular/pwa:pwa/schema.ts",
],
data = RUNTIME_ASSETS,
module_name = "@angular/pwa",
deps = [
":node_modules/@angular-devkit/schematics",
":node_modules/@schematics/angular",
Expand All @@ -56,7 +55,7 @@ ts_project(
":pwa",
"//:node_modules/@types/jasmine",
"//:node_modules/@types/node",
"//packages/angular_devkit/schematics/testing:testing",
"//packages/angular_devkit/schematics/testing",
],
)

Expand Down
3 changes: 1 addition & 2 deletions packages/angular/ssr/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("//tools:defaults2.bzl", "ng_package", "ts_project")
load("//tools:defaults.bzl", "ng_package", "ts_project")

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

Expand All @@ -25,7 +25,6 @@ ts_project(
data = [
"//packages/angular/ssr/third_party/beasties:beasties_bundled",
],
module_name = "@angular/ssr",
source_map = True,
tsconfig = "//:build-tsconfig-esm",
deps = [
Expand Down
3 changes: 1 addition & 2 deletions packages/angular/ssr/node/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//tools:interop.bzl", "ts_project")
load("//tools:defaults.bzl", "ts_project")

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

Expand All @@ -16,7 +16,6 @@ ts_project(
],
# TODO: Fix strict_deps failure
ignore_strict_deps = True,
module_name = "@angular/ssr/node",
source_map = True,
tsconfig = "//:build-tsconfig-esm",
deps = [
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/ssr/node/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@devinfra//bazel/spec-bundling:index_rjs.bzl", "spec_bundle")
load("//tools:defaults2.bzl", "jasmine_test", "ts_project")
load("//tools:defaults.bzl", "jasmine_test", "ts_project")

ts_project(
name = "unit_test_lib",
Expand Down
3 changes: 1 addition & 2 deletions packages/angular/ssr/schematics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# found in the LICENSE file at https://angular.dev/license

load("@aspect_rules_js//js:defs.bzl", "js_library")
load("//tools:defaults2.bzl", "jasmine_test", "ts_project")
load("//tools:defaults.bzl", "jasmine_test", "ts_project")
load("//tools:ts_json_schema.bzl", "ts_json_schema")

licenses(["notice"])
Expand Down Expand Up @@ -57,7 +57,6 @@ ts_project(
"//packages/angular/ssr/schematics:" + src.replace(".json", ".ts")
for (src, _) in ALL_SCHEMA_TARGETS
],
module_name = "@angular/ssr/schematics",
deps = [
"//packages/angular/ssr:node_modules/@angular-devkit/schematics",
"//packages/angular/ssr:node_modules/@schematics/angular",
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/ssr/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@devinfra//bazel/spec-bundling:index_rjs.bzl", "spec_bundle")
load("//tools:defaults2.bzl", "jasmine_test", "ts_project")
load("//tools:defaults.bzl", "jasmine_test", "ts_project")

ts_project(
name = "unit_test_lib",
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/ssr/test/npm_package/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("//tools:defaults2.bzl", "jasmine_test", "ts_project")
load("//tools:defaults.bzl", "jasmine_test", "ts_project")

ts_project(
name = "unit_test_lib",
Expand Down
3 changes: 1 addition & 2 deletions packages/angular_devkit/architect/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project")
load("//tools:defaults.bzl", "jasmine_test", "npm_package", "ts_project")
load("//tools:ts_json_schema.bzl", "ts_json_schema")

package(default_visibility = ["//visibility:public"])
Expand Down Expand Up @@ -66,7 +66,6 @@ ts_project(
],
# Ensure tests can execute the output JS, relying on schemas/JSON files.
data = JSON_FILES,
module_name = "@angular-devkit/architect",
deps = [
":node_modules/@angular-devkit/core",
"//:node_modules/@types/node",
Expand Down
3 changes: 1 addition & 2 deletions packages/angular_devkit/architect/node/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 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:defaults2.bzl", "jasmine_test", "ts_project")
load("//tools:defaults.bzl", "jasmine_test", "ts_project")

licenses(["notice"])

Expand All @@ -15,7 +15,6 @@ ts_project(
include = ["**/*.ts"],
exclude = ["**/*_spec.ts"],
),
module_name = "@angular-devkit/architect/node",
deps = [
"//:node_modules/@types/node",
"//:node_modules/rxjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/architect/node/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//tools:interop.bzl", "ts_project")
load("//tools:defaults.bzl", "ts_project")

ts_project(
name = "test_lib",
Expand Down
9 changes: 4 additions & 5 deletions packages/angular_devkit/architect/testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 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:interop.bzl", "ts_project")
load("//tools:defaults.bzl", "ts_project")

licenses(["notice"])

Expand All @@ -17,12 +17,11 @@ ts_project(
),
# TODO: Fix strict_deps failure
ignore_strict_deps = True,
module_name = "@angular-devkit/architect/testing",
deps = [
"//:node_modules/@types/node",
"//:node_modules/rxjs",
"//packages/angular_devkit/architect:architect",
"//packages/angular_devkit/core:core",
"//packages/angular_devkit/core/node:node",
"//packages/angular_devkit/architect",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core/node",
],
)
3 changes: 1 addition & 2 deletions packages/angular_devkit/architect_cli/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults2.bzl", "npm_package", "ts_project")
load("//tools:defaults.bzl", "npm_package", "ts_project")

# Copyright Google Inc. All Rights Reserved.
#
Expand All @@ -16,7 +16,6 @@ ts_project(
srcs = [
"bin/architect.ts",
] + glob(["src/**/*.ts"]),
module_name = "@angular-devkit/architect-cli",
deps = [
":node_modules/@angular-devkit/architect",
":node_modules/@angular-devkit/core",
Expand Down
35 changes: 17 additions & 18 deletions packages/angular_devkit/build_angular/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults2.bzl", "copy_to_bin", "jasmine_test", "npm_package", "ts_project")
load("//tools:defaults.bzl", "copy_to_bin", "jasmine_test", "npm_package", "ts_project")
load("//tools:ts_json_schema.bzl", "ts_json_schema")

licenses(["notice"])
Expand Down Expand Up @@ -129,7 +129,6 @@ ts_project(
data = RUNTIME_ASSETS,
# TODO: Fix strict_deps failure
ignore_strict_deps = True,
module_name = "@angular-devkit/build-angular",
deps = [
":node_modules/@angular-devkit/architect",
":node_modules/@angular-devkit/build-webpack",
Expand Down Expand Up @@ -303,14 +302,14 @@ ts_project(
deps = [
":build_angular",
"//:node_modules/@types/jasmine",
"//modules/testing/builder:builder",
"//packages/angular/build:build",
"//packages/angular/build/private:private",
"//packages/angular_devkit/architect:architect",
"//packages/angular_devkit/architect/node:node",
"//packages/angular_devkit/architect/testing:testing",
"//packages/angular_devkit/core:core",
"//packages/angular_devkit/core/node:node",
"//modules/testing/builder",
"//packages/angular/build",
"//packages/angular/build/private",
"//packages/angular_devkit/architect",
"//packages/angular_devkit/architect/node",
"//packages/angular_devkit/architect/testing",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core/node",
],
)

Expand Down Expand Up @@ -417,15 +416,15 @@ LARGE_SPECS = {
deps = [
# Dependencies needed to compile and run the specs themselves.
":build_angular",
"//packages/angular_devkit/core:core",
"//packages/angular_devkit/core/node:node",
"//modules/testing/builder:builder",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core/node",
"//modules/testing/builder",
":build_angular_test_utils",
"//packages/angular/build:build",
"//packages/angular/build/private:private",
"//packages/angular_devkit/architect:architect",
"//packages/angular_devkit/architect/node:node",
"//packages/angular_devkit/architect/testing:testing",
"//packages/angular/build",
"//packages/angular/build/private",
"//packages/angular_devkit/architect",
"//packages/angular_devkit/architect/node",
"//packages/angular_devkit/architect/testing",

# Base dependencies for the application in hello-world-app.
# Some tests also require extra dependencies.
Expand Down
3 changes: 1 addition & 2 deletions packages/angular_devkit/build_webpack/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project")
load("//tools:defaults.bzl", "jasmine_test", "npm_package", "ts_project")
load("//tools:ts_json_schema.bzl", "ts_json_schema")

licenses(["notice"])
Expand Down Expand Up @@ -45,7 +45,6 @@ ts_project(
"//packages/angular_devkit/build_webpack:src/builders/webpack/schema.ts",
],
data = RUNTIME_ASSETS,
module_name = "@angular-devkit/build-webpack",
deps = [
":node_modules/@angular-devkit/architect",
"//:node_modules/@types/node",
Expand Down
Loading
Loading