Skip to content

Commit 4fbe842

Browse files
Merge pull request #251 from angular/main
Create a new pull request by comparing changes across two branches
2 parents 00c6e01 + 8f3fdc3 commit 4fbe842

File tree

5,919 files changed

+453624
-422274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,919 files changed

+453624
-422274
lines changed

.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx

Lines changed: 0 additions & 8 deletions
This file was deleted.

.bazelignore

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# https://github.com/bazelbuild/bazel/issues/8106
55
.git
66
node_modules
7-
dist
7+
dist/
88

99
# All integration test node_modules folders
1010
integration/animations/node_modules
@@ -24,6 +24,7 @@ integration/ng_elements/node_modules
2424
integration/ng_update/node_modules
2525
integration/ng_update_migrations/node_modules
2626
integration/ng-add-localize/node_modules
27+
integration/no_ts_linker/node_modules
2728
integration/nodenext_resolution/node_modules
2829
integration/platform-server/node_modules
2930
integration/platform-server-zoneless/node_modules
@@ -34,5 +35,43 @@ integration/standalone-bootstrap/node_modules
3435
integration/terser/node_modules
3536
integration/trusted-types/node_modules
3637
integration/typings_test_rxjs7/node_modules
37-
integration/typings_test_ts58/node_modules
38+
integration/legacy-animations/node_modules
39+
integration/legacy-animations-async/node_modules
40+
integration/typings_test_ts59/node_modules
3841
modules/ssr-benchmarks/node_modules
42+
vscode-ng-language-service/integration/project/dist/
43+
44+
# For rules_js
45+
adev/node_modules
46+
adev/shared-docs/node_modules
47+
adev/shared-docs/pipeline/api-gen/node_modules
48+
dev-app/node_modules
49+
modules/node_modules
50+
integration/node_modules
51+
packages/animations/node_modules
52+
packages/common/node_modules
53+
packages/localize/node_modules
54+
packages/compiler-cli/node_modules
55+
packages/compiler-cli/linker/babel/test/node_modules
56+
packages/compiler/node_modules
57+
packages/core/node_modules
58+
packages/core/test/bundling/node_modules
59+
packages/elements/node_modules
60+
packages/forms/node_modules
61+
packages/language-service/node_modules
62+
packages/platform-browser/node_modules
63+
packages/platform-server/node_modules
64+
packages/platform-browser-dynamic/node_modules
65+
packages/router/node_modules
66+
packages/zone.js/node_modules
67+
packages/zone.js/test/typings/node_modules
68+
packages/upgrade/node_modules
69+
packages/benchpress/node_modules
70+
packages/service-worker/node_modules
71+
packages/zone.js/test/typings/node_modules
72+
packages/zone.js/node_modules
73+
tools/bazel/rules_angular_store/node_modules
74+
vscode-ng-language-service/node_modules
75+
vscode-ng-language-service/server/node_modules
76+
vscode-ng-language-service/integration/pre_standalone_project/node_modules
77+
vscode-ng-language-service/integration/project/node_modules

.bazelrc

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Enable debugging tests with --config=debug
2-
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results --spawn_strategy=local
2+
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results --strategy=TestRunner=standalone
33

44
# Do not attempt to de-flake locally.
55
# On CI we might set this to `3` to run with deflaking.
@@ -9,6 +9,12 @@ test --flaky_test_attempts=1
99
common --@aspect_rules_ts//ts:skipLibCheck=always
1010
common --@aspect_rules_ts//ts:default_to_tsc_transpiler
1111

12+
# Needed as otherwise `env` of TS actions would be ignored.
13+
common --incompatible_merge_fixed_and_default_shell_env
14+
15+
# Frozen lockfile
16+
common --lockfile_mode=error
17+
1218
###############################
1319
# Filesystem interactions #
1420
###############################
@@ -35,7 +41,7 @@ test --nolegacy_external_runfiles
3541
# in Bazel 0.21.0 but turned off again in 0.22.0. Follow
3642
# https://github.com/bazelbuild/bazel/issues/7026 for more details.
3743
# This flag is needed to so that the bazel cache is not invalidated
38-
# when running bazel via `yarn bazel`.
44+
# when running bazel via `pnpm bazel`.
3945
# See https://github.com/angular/angular/issues/27514.
4046
build --incompatible_strict_action_env
4147
run --incompatible_strict_action_env
@@ -57,12 +63,15 @@ build --enable_runfiles
5763
# Releases should always be stamped with version control info
5864
# This command assumes node on the path and is a workaround for
5965
# https://github.com/bazelbuild/bazel/issues/4802
60-
build:release --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=release"
66+
build:release --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=release"
6167
build:release --stamp
6268

6369
# Snapshots should also be stamped with version control information.
64-
build:snapshot-build --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=snapshot"
70+
build:snapshot-build --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=snapshot"
6571
build:snapshot-build --stamp
72+
# @angular/language-server package depends directly on other Angular framework packages.
73+
# This flag ensures that the language server uses the snapshot-built framework packages from the repository.
74+
build:snapshot-build --//:enable_language_server_snapshot_repo_deps
6675

6776
# Angular DevTools for Firefox releases *cannot* be stamped and `--config snapshot-build-firefox` is a no-op.
6877
# This is because Mozilla requires add-on source code to be uploaded and then they manually reproduce the build.
@@ -106,9 +115,9 @@ build:remote --cpu=k8
106115
build:remote --host_cpu=k8
107116

108117
# Toolchain and platform related flags
109-
build:remote --extra_execution_platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform
110-
build:remote --host_platform=@npm//@angular/build-tooling/bazel/remote-execution:platform
111-
build:remote --platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform
118+
build:remote --extra_execution_platforms=@devinfra//bazel/remote-execution:platform_with_network
119+
build:remote --host_platform=@devinfra//bazel/remote-execution:platform_with_network
120+
build:remote --platforms=@devinfra//bazel/remote-execution:platform_with_network
112121

113122
# Remote instance and caching
114123
build:remote --remote_instance_name=projects/internal-200822/instances/primary_instance
@@ -139,7 +148,7 @@ common --experimental_allow_tags_propagation
139148
# Disable network access in the sandbox by default. To enable network access
140149
# for a particular target, use:
141150
#
142-
# load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK")
151+
# load("@devinfra//bazel/remote-execution:index.bzl", "ENABLE_NETWORK")
143152
# my_target(
144153
# ...,
145154
# exec_properties = ENABLE_NETWORK, # Enables network in remote exec
@@ -163,8 +172,6 @@ test:saucelabs --flaky_test_attempts=1
163172

164173
# --ng_perf will ask the Ivy compiler to produce performance results for each build.
165174
build --flag_alias=ng_perf=//packages/compiler-cli:ng_perf
166-
# --full_build_adev will run adev build/serve in a full mode, performing prerendering and DCE.
167-
build --flag_alias=full_build_adev=//adev:full_build_adev
168175

169176
####################################################
170177
# User bazel configuration

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.7.1

.devcontainer/recommended-devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "Angular dev container",
44
"dockerFile": "Dockerfile",
55
"appPort": [4000, 4200, 4433, 5000, 8080, 9876],
6-
"postCreateCommand": "yarn install",
6+
"postCreateCommand": "pnpm install",
77
"extensions": [
88
"devondcarew.bazel-code",
99
"ms-vscode.vscode-typescript-tslint-plugin"

.gemini/config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
have_fun: false
2+
code_review:
3+
disable: false
4+
comment_severity_threshold: MEDIUM
5+
max_review_comments: -1
6+
pull_request_opened:
7+
help: false
8+
summary: false
9+
code_review: false
10+
ignore_patterns: []

.github/actions/deploy-docs-site/BUILD.bazel

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
2-
load("//tools:defaults.bzl", "esbuild_checked_in")
3-
load("//tools:defaults2.bzl", "ts_project")
1+
load("//tools:defaults.bzl", "esbuild_checked_in", "ts_config", "ts_project")
42

53
package(default_visibility = ["//.github/actions/deploy-docs-site:__subpackages__"])
64

@@ -10,18 +8,21 @@ exports_files([
108

119
esbuild_checked_in(
1210
name = "main",
11+
config = "esbuild.conf.js",
1312
entry_point = ":lib/main.mts",
1413
external = [
1514
"undici",
15+
"pnpapi",
1616
],
17+
metafile = False,
1718
platform = "node",
1819
target = "node20",
1920
deps = [
2021
":lib",
2122
],
2223
)
2324

24-
rules_js_tsconfig(
25+
ts_config(
2526
name = "tsconfig",
2627
src = "tsconfig.json",
2728
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
module.exports = {
10+
resolveExtensions: ['.mjs', '.js'],
11+
format: 'esm',
12+
banner: {
13+
// Workaround for: https://github.com/evanw/esbuild/issues/946
14+
js: `import {createRequire as __cjsCompatRequire} from 'module';
15+
const require = __cjsCompatRequire(import.meta.url);`,
16+
},
17+
};

.github/actions/deploy-docs-site/lib/deploy.mts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {cp, mkdtemp, readFile, rm, writeFile} from 'node:fs/promises';
1+
import {mkdtemp, readFile, rm, writeFile} from 'node:fs/promises';
22
import {Deployment} from './deployments.mjs';
33
import {join} from 'node:path';
44

@@ -9,7 +9,7 @@ import {getCredentialFilePath} from './credential.mjs';
99
export async function deployToFirebase(
1010
deployment: Deployment,
1111
configPath: string,
12-
distDirPath: string,
12+
stagingDir: string,
1313
) {
1414
if (deployment.destination == undefined) {
1515
console.log(`No deployment necessary for docs created from: ${deployment.branch}`);
@@ -18,37 +18,33 @@ export async function deployToFirebase(
1818

1919
console.log('Preparing for deployment to firebase...');
2020

21-
const tmpDeployDir = await mkdtemp(join(tmpdir(), 'deploy-directory'));
22-
const deployConfigPath = join(tmpDeployDir, 'firebase.json');
21+
const deployConfigPath = join(stagingDir, 'firebase.json');
2322

2423
const config = JSON.parse(await readFile(configPath, {encoding: 'utf-8'})) as {
2524
hosting: {public: string};
2625
};
27-
config['hosting']['public'] = './dist';
26+
config['hosting']['public'] = './browser';
2827

2928
await writeFile(deployConfigPath, JSON.stringify(config, null, 2));
3029

31-
await cp(distDirPath, join(tmpDeployDir, 'dist'), {recursive: true});
32-
spawnSync(`chmod 777 -R ${tmpDeployDir}`, {encoding: 'utf-8', shell: true});
33-
3430
firebase(
3531
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
36-
tmpDeployDir,
32+
stagingDir,
3733
);
3834
firebase(
3935
`target:apply --config ${deployConfigPath} --project angular-dev-site hosting angular-docs ${deployment.destination}`,
40-
tmpDeployDir,
36+
stagingDir,
4137
);
4238
firebase(
4339
`deploy --config ${deployConfigPath} --project angular-dev-site --only hosting --non-interactive`,
44-
tmpDeployDir,
40+
stagingDir,
4541
);
4642
firebase(
4743
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
48-
tmpDeployDir,
44+
stagingDir,
4945
);
5046

51-
await rm(tmpDeployDir, {recursive: true});
47+
await rm(stagingDir, {recursive: true});
5248
}
5349

5450
export async function setupRedirect(deployment: Deployment) {
@@ -103,7 +99,7 @@ export async function setupRedirect(deployment: Deployment) {
10399
}
104100

105101
function firebase(cmd: string, cwd?: string) {
106-
spawnSync('npx', `-y [email protected] ${cmd}`.split(' '), {
102+
const {status} = spawnSync('npx', `-y [email protected] ${cmd}`.split(' '), {
107103
cwd,
108104
encoding: 'utf-8',
109105
shell: true,
@@ -113,4 +109,8 @@ function firebase(cmd: string, cwd?: string) {
113109
GOOGLE_APPLICATION_CREDENTIALS: getCredentialFilePath(),
114110
},
115111
});
112+
if (status !== 0) {
113+
console.error('Firebase command failed, see log above for details.');
114+
process.exit(status);
115+
}
116116
}

.github/actions/deploy-docs-site/lib/deployments.mts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface Deployment {
99
to: string;
1010
};
1111
destination?: string;
12+
servingUrl: string;
1213
}
1314

1415
export type Deployments = Map<string, Deployment>;
@@ -31,6 +32,7 @@ export async function getDeployments(): Promise<Deployments> {
3132
docSites.set(branch.name, {
3233
branch: branch.name,
3334
destination: `v${branch.version.major}-angular-dev`,
35+
servingUrl: `https://v${branch.version.major}.angular.dev/`,
3436
});
3537
});
3638

@@ -40,12 +42,14 @@ export async function getDeployments(): Promise<Deployments> {
4042
from: `v${releaseTrains.latest.version.major}-angular-dev`,
4143
to: 'https://angular.dev',
4244
},
45+
servingUrl: 'https://angular.dev/',
4346
destination: 'angular-dev-site',
4447
});
4548

4649
if (releaseTrains.releaseCandidate) {
4750
docSites.set(releaseTrains.next.branchName, {
4851
branch: releaseTrains.next.branchName,
52+
servingUrl: 'https://next.angular.dev/',
4953
});
5054

5155
docSites.set(releaseTrains.releaseCandidate.branchName, {
@@ -55,11 +59,13 @@ export async function getDeployments(): Promise<Deployments> {
5559
from: `v${releaseTrains.releaseCandidate.version.major}-angular-dev`,
5660
to: 'https://next.angular.dev',
5761
},
62+
servingUrl: 'https://next.angular.dev/',
5863
});
5964
} else {
6065
docSites.set(releaseTrains.next.branchName, {
6166
branch: releaseTrains.next.branchName,
6267
destination: 'next-angular-dev',
68+
servingUrl: 'https://next.angular.dev/',
6369
});
6470
}
6571

0 commit comments

Comments
 (0)