mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 01:54:04 +08:00
build: migrate @angular/build
tests to rules_js
Migrates `@angular/build` tests to native `rules_js`. This involves wiring up the package in the pnpm workspace, as well as adding some missing dependencies that previously weren't needed due to less efficient per-package isolation of transitive deps. In addition, we need to explicitly specify `ssr` as dev dependency as we are not auto-installing peer deps, and the dependency is needed for some server SSR tests.
This commit is contained in:
parent
0c264261fe
commit
96490cdd9b
@ -2,9 +2,9 @@
|
||||
# Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml").
|
||||
# This file should be checked into version control along with the pnpm-lock.yaml file.
|
||||
.npmrc=-1406867100
|
||||
modules/testing/builder/package.json=-1769051440
|
||||
package.json=52016778
|
||||
packages/angular/build/package.json=-235216329
|
||||
modules/testing/builder/package.json=-1196120648
|
||||
package.json=1915794033
|
||||
packages/angular/build/package.json=-1602808389
|
||||
packages/angular/cli/package.json=-1878910022
|
||||
packages/angular/pwa/package.json=1108903917
|
||||
packages/angular/ssr/package.json=1104313629
|
||||
@ -17,6 +17,6 @@ packages/angular_devkit/schematics/package.json=673943597
|
||||
packages/angular_devkit/schematics_cli/package.json=-1663529211
|
||||
packages/ngtools/webpack/package.json=1463215526
|
||||
packages/schematics/angular/package.json=251715148
|
||||
pnpm-lock.yaml=994614890
|
||||
pnpm-workspace.yaml=-1173266031
|
||||
pnpm-lock.yaml=327624853
|
||||
pnpm-workspace.yaml=-1847919625
|
||||
yarn.lock=1005429013
|
||||
|
@ -16,7 +16,11 @@ ts_project(
|
||||
"src/**/*_spec.ts",
|
||||
],
|
||||
),
|
||||
data = glob(["projects/**/*"]),
|
||||
data = [
|
||||
# Needed at runtime by some builder tests relying on SSR being
|
||||
# resolvable in the test project.
|
||||
":node_modules/@angular/ssr",
|
||||
] + glob(["projects/**/*"]),
|
||||
deps = [
|
||||
":node_modules/@angular-devkit/architect",
|
||||
":node_modules/@angular-devkit/core",
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@angular-devkit/core": "workspace:*",
|
||||
"@angular-devkit/architect": "workspace:*"
|
||||
"@angular-devkit/architect": "workspace:*",
|
||||
"@angular/ssr": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
@ -221,7 +221,10 @@
|
||||
}
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": []
|
||||
"onlyBuiltDependencies": [],
|
||||
"overrides": {
|
||||
"@angular/build": "workspace:*"
|
||||
}
|
||||
},
|
||||
"resolutions": {
|
||||
"typescript": "5.7.3"
|
||||
|
@ -1,12 +1,14 @@
|
||||
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:defaults2.bzl", "npm_package", "ts_project")
|
||||
load("@npm2//:defs.bzl", "npm_link_all_packages")
|
||||
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project")
|
||||
load("//tools:ts_json_schema.bzl", "ts_json_schema")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
npm_link_all_packages()
|
||||
|
||||
ts_json_schema(
|
||||
name = "application_schema",
|
||||
src = "src/builders/application/schema.json",
|
||||
@ -61,6 +63,9 @@ ts_project(
|
||||
data = RUNTIME_ASSETS,
|
||||
module_name = "@angular/build",
|
||||
deps = [
|
||||
":node_modules/@angular-devkit/architect",
|
||||
":node_modules/@angular-devkit/core",
|
||||
":node_modules/@angular/ssr",
|
||||
"//:node_modules/@ampproject/remapping",
|
||||
"//:node_modules/@angular/common",
|
||||
"//:node_modules/@angular/compiler",
|
||||
@ -87,7 +92,9 @@ ts_project(
|
||||
"//:node_modules/esbuild-wasm",
|
||||
"//:node_modules/fast-glob",
|
||||
"//:node_modules/https-proxy-agent",
|
||||
"//:node_modules/istanbul-lib-instrument",
|
||||
"//:node_modules/jsonc-parser",
|
||||
"//:node_modules/less",
|
||||
"//:node_modules/listr2",
|
||||
"//:node_modules/lmdb",
|
||||
"//:node_modules/magic-string",
|
||||
@ -104,10 +111,6 @@ ts_project(
|
||||
"//:node_modules/typescript",
|
||||
"//:node_modules/vite",
|
||||
"//:node_modules/watchpack",
|
||||
"//packages/angular/ssr:ssr_rjs",
|
||||
"//packages/angular/ssr/node:node_rjs",
|
||||
"//packages/angular_devkit/architect:architect_rjs",
|
||||
"//packages/angular_devkit/core:core_rjs",
|
||||
],
|
||||
)
|
||||
|
||||
@ -126,14 +129,12 @@ ts_project(
|
||||
"//:node_modules/prettier",
|
||||
"//:node_modules/typescript",
|
||||
"//packages/angular/build/private:private_rjs",
|
||||
"//packages/angular_devkit/core:core_rjs",
|
||||
"//packages/angular_devkit/core/node:node_rjs",
|
||||
],
|
||||
)
|
||||
|
||||
jasmine_node_test(
|
||||
jasmine_test(
|
||||
name = "unit_tests",
|
||||
deps = [":unit_test_lib"],
|
||||
data = [":unit_test_lib_rjs"],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
@ -144,11 +145,7 @@ ts_project(
|
||||
":build_rjs",
|
||||
"//packages/angular/build/private:private_rjs",
|
||||
"//modules/testing/builder:builder_rjs",
|
||||
"//packages/angular_devkit/architect:architect_rjs",
|
||||
"//packages/angular_devkit/architect/node:node_rjs",
|
||||
"//packages/angular_devkit/architect/testing:testing_rjs",
|
||||
"//packages/angular_devkit/core:core_rjs",
|
||||
"//packages/angular_devkit/core/node:node_rjs",
|
||||
":node_modules/@angular-devkit/architect",
|
||||
|
||||
# Base dependencies for the application in hello-world-app.
|
||||
"//:node_modules/@angular/common",
|
||||
@ -174,11 +171,7 @@ ts_project(
|
||||
":build_rjs",
|
||||
"//packages/angular/build/private:private_rjs",
|
||||
"//modules/testing/builder:builder_rjs",
|
||||
"//packages/angular_devkit/architect:architect_rjs",
|
||||
"//packages/angular_devkit/architect/node:node_rjs",
|
||||
"//packages/angular_devkit/architect/testing:testing_rjs",
|
||||
"//packages/angular_devkit/core:core_rjs",
|
||||
"//packages/angular_devkit/core/node:node_rjs",
|
||||
":node_modules/@angular-devkit/architect",
|
||||
|
||||
# dev server only test deps
|
||||
"//:node_modules/@types/http-proxy",
|
||||
@ -202,20 +195,20 @@ ts_project(
|
||||
],
|
||||
)
|
||||
|
||||
jasmine_node_test(
|
||||
jasmine_test(
|
||||
name = "application_integration_tests",
|
||||
size = "large",
|
||||
data = [":application_integration_test_lib_rjs"],
|
||||
flaky = True,
|
||||
shard_count = 10,
|
||||
deps = [":application_integration_test_lib"],
|
||||
)
|
||||
|
||||
jasmine_node_test(
|
||||
jasmine_test(
|
||||
name = "dev-server_integration_tests",
|
||||
size = "large",
|
||||
data = [":dev-server_integration_test_lib_rjs"],
|
||||
flaky = True,
|
||||
shard_count = 10,
|
||||
deps = [":dev-server_integration_test_lib"],
|
||||
)
|
||||
|
||||
genrule(
|
||||
|
@ -19,7 +19,8 @@
|
||||
"builders": "builders.json",
|
||||
"dependencies": {
|
||||
"@ampproject/remapping": "2.3.0",
|
||||
"@angular-devkit/architect": "0.0.0-EXPERIMENTAL-PLACEHOLDER",
|
||||
"@angular-devkit/core": "workspace:0.0.0-PLACEHOLDER",
|
||||
"@angular-devkit/architect": "workspace:0.0.0-EXPERIMENTAL-PLACEHOLDER",
|
||||
"@babel/core": "7.26.0",
|
||||
"@babel/helper-annotate-as-pure": "7.25.9",
|
||||
"@babel/helper-split-export-declaration": "7.24.7",
|
||||
@ -47,6 +48,9 @@
|
||||
"optionalDependencies": {
|
||||
"lmdb": "3.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/ssr": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/compiler": "0.0.0-ANGULAR-FW-PEER-DEP",
|
||||
"@angular/compiler-cli": "0.0.0-ANGULAR-FW-PEER-DEP",
|
||||
|
678
pnpm-lock.yaml
generated
678
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,7 @@ packages:
|
||||
- packages/angular/cli
|
||||
- packages/angular/pwa
|
||||
- packages/angular/ssr
|
||||
- packages/angular/build
|
||||
- packages/schematics/angular
|
||||
- packages/ngtools/webpack
|
||||
- modules/testing/builder
|
||||
|
Loading…
x
Reference in New Issue
Block a user