Skip to content

Commit 00c6e01

Browse files
Merge pull request #250 from angular/main
Create a new pull request by comparing changes across two branches
2 parents 33a5b84 + c34efcc commit 00c6e01

File tree

3,757 files changed

+197388
-179150
lines changed

Some content is hidden

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

3,757 files changed

+197388
-179150
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# @generated
2+
# Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml").
3+
# This file should be checked into version control along with the pnpm-lock.yaml file.
4+
.npmrc=-1406867100
5+
package.json=-443660789
6+
pnpm-lock.yaml=-1265630020
7+
pnpm-workspace.yaml=1711114604
8+
yarn.lock=-38145536

.bazelignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@ integration/ng_update_migrations/node_modules
2626
integration/ng-add-localize/node_modules
2727
integration/nodenext_resolution/node_modules
2828
integration/platform-server/node_modules
29+
integration/platform-server-zoneless/node_modules
2930
integration/platform-server-hydration/node_modules
3031
integration/service-worker-schema/node_modules
3132
integration/side-effects/node_modules
3233
integration/standalone-bootstrap/node_modules
3334
integration/terser/node_modules
3435
integration/trusted-types/node_modules
3536
integration/typings_test_rxjs7/node_modules
36-
integration/typings_test_ts55/node_modules
37-
integration/typings_test_ts56/node_modules
38-
integration/typings_test_ts57/node_modules
37+
integration/typings_test_ts58/node_modules
3938
modules/ssr-benchmarks/node_modules

.bazelrc

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
55
# On CI we might set this to `3` to run with deflaking.
66
test --flaky_test_attempts=1
77

8+
# Required by `rules_ts`.
9+
common --@aspect_rules_ts//ts:skipLibCheck=always
10+
common --@aspect_rules_ts//ts:default_to_tsc_transpiler
11+
812
###############################
913
# Filesystem interactions #
1014
###############################
@@ -102,8 +106,6 @@ build:remote --cpu=k8
102106
build:remote --host_cpu=k8
103107

104108
# Toolchain and platform related flags
105-
build:remote --crosstool_top=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain_suite
106-
build:remote --extra_toolchains=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain
107109
build:remote --extra_execution_platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform
108110
build:remote --host_platform=@npm//@angular/build-tooling/bazel/remote-execution:platform
109111
build:remote --platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform
@@ -113,13 +115,22 @@ build:remote --remote_instance_name=projects/internal-200822/instances/primary_i
113115
build:remote --bes_instance_name=internal-200822
114116
build:remote --remote_cache=remotebuildexecution.googleapis.com
115117
build:remote --remote_executor=remotebuildexecution.googleapis.com
118+
build:remote --remote_upload_local_results=false
119+
120+
build:remote --remote_grpc_log=/tmp/rbe-grpc.log
121+
122+
# See: https://docs.google.com/document/d/1NgDPsCIwprDdqC1zj0qQrh5KGK2hQTSTux1DAvi4rSc/edit?tab=t.0.
123+
build:remote --experimental_remote_execution_keepalive
116124

117125
# Use HTTP remote cache
118126
build:remote-cache --remote_cache=https://storage.googleapis.com/angular-team-cache
119127
build:remote-cache --remote_accept_cached=true
120-
build:remote-cache --remote_upload_local_results=true
128+
build:remote-cache --remote_upload_local_results=false
121129
build:remote-cache --google_default_credentials
122130

131+
# Additional flags added when running a "trusted build" with additional access
132+
build:trusted-build --remote_upload_local_results=true
133+
123134
# Ensure that tags like "no-remote-exec" get propagated to actions created by rules,
124135
# even if the rule implementation does not explicitly pass them to the execution requirements.
125136
# https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation

.bazelversion

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

.git-blame-ignore-revs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# all commits that change formatting to prettier
2+
fd544159e300340a25a48e3f40c58795991a4c17
3+
31fdf0fbea6b89c8d3d141b2ef8e79c2737287cb
4+
0d78a92431178be73342aeddda4b62d9e49138ba
5+
f307e95459898b9027d5e13357a809d8952e9017
6+
b1dffa4abe8321a47d79b2ea29ee32a81acfe031
7+
ca517d7f2c38775969a65fde1d88f41ad5f27931
8+
8f69c83b848ad0dc3c7ffce2541fc726693dedcf
9+
a5b5b7d5ef84b9852d2115dd7a764f4ab3299379
10+
894c1c5f100a62866cc7ed3e23d025c8e505c60d
11+
ca39926de2ccaceb11de47a35e5bf9899147a877
12+
b857aafcb9bdb5f1400a4cfedd56657e71ebe8cd
13+
c4b880a025823efadb9d76195c6261f2992c7654
14+
4c2b0d94e22f022969b86b95af516b76322840e0
15+
0460a9dfafe3a7ebbff1b87e52048fb7416bba43
16+
ec03e462f3d4ec90d1267474cc344563c949c2cf
17+
bbbe477f479f20722f0fea7ccc46095aad5d4253
18+
cc34e5fb072e7903e01463953a19d18503a39347
19+
f9781f9804f1e7c84df356d9aeb267730a7fc499
20+
dc62446ef7f2898a20d3be1196ecaf2a92a1077d
21+
711cb416260ca11ff158fc39b372efa2cf022d36
22+
# commits that switch to relative imports
23+
3d2263cb1f208e561692e41c5a17196c3c57877f
24+
ae047c59c0041e0a43cec020520d40ccd981b444
25+
6a207ebfb0b915bcb848e8e17425757314116ce3
26+
88ae6517a2490ccbef97126c011a3d5bcaddd637
27+
6d3849ffc85cc52b0eba3836b24f10895621acbe
28+
bc042935d045c46d09c2c316dcbbc39cbae4615c
29+
34393874e6b6f53692f1f30d0f536cd72e5220d2
30+
cfda43b97d3c1aedc4a1eccf123475617640e696
31+
006a14da89c58692d411e403b1b1cc8fd733de25
32+
33c24624be73a4c16abdd5fb2f93810e151f6a58
33+
e5cc624b8736c4e2aa87f86bb268957e656e0994
34+
30a61f12a7d414ad35a1a06eaadff873880d8e8f
35+
f773e08ee59724739093a33811a62661680df1f0
36+
49234007916980526db78503452bba7121dc91ff
37+
5c0335754a2b45b2a27fa7a9bffe5df93aec4eee
38+
be7c8d4fc6cb3a71bd21fbb228e01cfcdce0717f
39+
c702e8af0b2144d97b93171dc2806ed1a0346762
40+
4f458a825d17e776500cc1597efb904e0dfdfe20
41+
6d3f5752f204a5a30f3c09fbf6d4a510a4522bcb
42+
3fa7b2b136696464e0a91b5ec25c6adf272d4d6b
43+
ad65f44877f22caadbc8b977b5b720c3c86fcc45

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## PR Checklist
22
Please check if your PR fulfills the following requirements:
33

4-
- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit
4+
- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md
55
- [ ] Tests for the changes have been added (for bug fixes / features)
66
- [ ] Docs have been added / updated (for bug fixes / features)
77

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,41 @@
1+
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
12
load("//tools:defaults.bzl", "esbuild_checked_in")
3+
load("//tools:defaults2.bzl", "ts_project")
4+
5+
package(default_visibility = ["//.github/actions/deploy-docs-site:__subpackages__"])
26

37
exports_files([
48
"tsconfig.json",
59
])
610

711
esbuild_checked_in(
812
name = "main",
9-
entry_point = "//.github/actions/deploy-docs-site/lib:main.ts",
13+
entry_point = ":lib/main.mts",
1014
external = [
1115
"undici",
1216
],
1317
platform = "node",
14-
target = "node14",
18+
target = "node20",
19+
deps = [
20+
":lib",
21+
],
22+
)
23+
24+
rules_js_tsconfig(
25+
name = "tsconfig",
26+
src = "tsconfig.json",
27+
)
28+
29+
ts_project(
30+
name = "lib",
31+
srcs = glob(["lib/*.mts"]),
32+
tsconfig = ":tsconfig",
1533
deps = [
16-
"//.github/actions/deploy-docs-site/lib",
34+
"//:node_modules/@actions/core",
35+
"//:node_modules/@actions/github",
36+
"//:node_modules/@angular/ng-dev",
37+
"//:node_modules/@types/node",
38+
"//:node_modules/@types/tmp",
39+
"//:node_modules/tmp",
1740
],
1841
)

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

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import {fileSync} from 'tmp';
2+
import {writeSync} from 'node:fs';
3+
import {getInput, setSecret} from '@actions/core';
4+
5+
let credentialFilePath: undefined | string;
6+
7+
export function getCredentialFilePath(): string {
8+
if (credentialFilePath === undefined) {
9+
const tmpFile = fileSync({postfix: '.json'});
10+
writeSync(tmpFile.fd, getInput('serviceKey', {required: true}));
11+
setSecret(tmpFile.name);
12+
credentialFilePath = tmpFile.name;
13+
}
14+
return credentialFilePath;
15+
}
16+
17+
/** Github access token. Used for querying the active release trains. */
18+
export const githubReleaseTrainReadToken: string = getInput('githubReleaseTrainReadToken', {
19+
required: true,
20+
});

.github/actions/deploy-docs-site/lib/credential.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
import {cp, mkdtemp, readFile, rm, writeFile} from 'node:fs/promises';
2+
import {Deployment} from './deployments.mjs';
3+
import {join} from 'node:path';
4+
5+
import {tmpdir} from 'node:os';
6+
import {spawnSync} from 'node:child_process';
7+
import {getCredentialFilePath} from './credential.mjs';
8+
9+
export async function deployToFirebase(
10+
deployment: Deployment,
11+
configPath: string,
12+
distDirPath: string,
13+
) {
14+
if (deployment.destination == undefined) {
15+
console.log(`No deployment necessary for docs created from: ${deployment.branch}`);
16+
return;
17+
}
18+
19+
console.log('Preparing for deployment to firebase...');
20+
21+
const tmpDeployDir = await mkdtemp(join(tmpdir(), 'deploy-directory'));
22+
const deployConfigPath = join(tmpDeployDir, 'firebase.json');
23+
24+
const config = JSON.parse(await readFile(configPath, {encoding: 'utf-8'})) as {
25+
hosting: {public: string};
26+
};
27+
config['hosting']['public'] = './dist';
28+
29+
await writeFile(deployConfigPath, JSON.stringify(config, null, 2));
30+
31+
await cp(distDirPath, join(tmpDeployDir, 'dist'), {recursive: true});
32+
spawnSync(`chmod 777 -R ${tmpDeployDir}`, {encoding: 'utf-8', shell: true});
33+
34+
firebase(
35+
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
36+
tmpDeployDir,
37+
);
38+
firebase(
39+
`target:apply --config ${deployConfigPath} --project angular-dev-site hosting angular-docs ${deployment.destination}`,
40+
tmpDeployDir,
41+
);
42+
firebase(
43+
`deploy --config ${deployConfigPath} --project angular-dev-site --only hosting --non-interactive`,
44+
tmpDeployDir,
45+
);
46+
firebase(
47+
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
48+
tmpDeployDir,
49+
);
50+
51+
await rm(tmpDeployDir, {recursive: true});
52+
}
53+
54+
export async function setupRedirect(deployment: Deployment) {
55+
if (deployment.redirect === undefined) {
56+
console.log(`No redirect necessary for docs created from: ${deployment.branch}`);
57+
return;
58+
}
59+
60+
console.log('Preparing to set up redirect on firebase...');
61+
62+
const redirectConfig = JSON.stringify(
63+
{
64+
hosting: {
65+
target: 'angular-docs',
66+
redirects: [
67+
{
68+
type: 302,
69+
regex: '^(.*)$',
70+
destination: `${deployment.redirect.to}:1`,
71+
},
72+
],
73+
},
74+
},
75+
null,
76+
2,
77+
);
78+
79+
const tmpRedirectDir = await mkdtemp(join(tmpdir(), 'redirect-directory'));
80+
const redirectConfigPath = join(tmpRedirectDir, 'firebase.json');
81+
82+
await writeFile(redirectConfigPath, redirectConfig);
83+
spawnSync(`chmod 777 -R ${tmpRedirectDir}`, {encoding: 'utf-8', shell: true});
84+
85+
firebase(
86+
`target:clear --config ${redirectConfigPath} --project angular-dev-site hosting angular-docs`,
87+
tmpRedirectDir,
88+
);
89+
firebase(
90+
`target:apply --config ${redirectConfigPath} --project angular-dev-site hosting angular-docs ${deployment.redirect.from}`,
91+
tmpRedirectDir,
92+
);
93+
firebase(
94+
`deploy --config ${redirectConfigPath} --project angular-dev-site --only hosting --non-interactive`,
95+
tmpRedirectDir,
96+
);
97+
firebase(
98+
`target:clear --config ${redirectConfigPath} --project angular-dev-site hosting angular-docs`,
99+
tmpRedirectDir,
100+
);
101+
102+
await rm(tmpRedirectDir, {recursive: true});
103+
}
104+
105+
function firebase(cmd: string, cwd?: string) {
106+
spawnSync('npx', `-y [email protected] ${cmd}`.split(' '), {
107+
cwd,
108+
encoding: 'utf-8',
109+
shell: true,
110+
stdio: 'inherit',
111+
env: {
112+
...process.env,
113+
GOOGLE_APPLICATION_CREDENTIALS: getCredentialFilePath(),
114+
},
115+
});
116+
}

0 commit comments

Comments
 (0)