mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
Compare commits
386 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 31f2030320 | |||
| c525a5a890 | |||
| f04a78a4fc | |||
| ea6c51f355 | |||
| ce6c7d94da | |||
| 1fd8d5d446 | |||
| 3ebaeccb46 | |||
| 3c14d0523c | |||
| 9f0c6bcf24 | |||
| 301155b96f | |||
| 522587d236 | |||
| be55f8d5de | |||
| 71955dcf7e | |||
| bc2b819e1d | |||
| 8d1891a532 | |||
| 0ebf1afb16 | |||
| 5d75219102 | |||
| 9515a70933 | |||
| 388d25e57a | |||
| 0f85742fe7 | |||
| 6fa4ac7681 | |||
| 2d0761062c | |||
| a67d82254f | |||
| 1d4f81c8ee | |||
| 2d215246c8 | |||
| ca104b32e9 | |||
| 64a36757e5 | |||
| 80962f69fa | |||
| 12daa0b52f | |||
| 12b95774bd | |||
| 78b4ddcfff | |||
| 2cd4fb10c0 | |||
| d09ef683b7 | |||
| 923c81c4a8 | |||
| dbb8dbc50b | |||
| e78451cf8a | |||
| b04e6b1869 | |||
| de18875a4b | |||
| 8858e3c908 | |||
| 720f0dbd13 | |||
| 172e44bdc2 | |||
| 150ed2b569 | |||
| d0c7ea8491 | |||
| 16d0d43ad4 | |||
| 5d9de59194 | |||
| e987d94276 | |||
| fe50e3647d | |||
| fcec9a2233 | |||
| 3c66209e0a | |||
| ba40153ac0 | |||
| a3094f2cb5 | |||
| ba00432068 | |||
| d40867c8d9 | |||
| 96a070e9e0 | |||
| ccdb340d0d | |||
| 205d5276b0 | |||
| efd76c13e7 | |||
| ef57d616af | |||
| 2a15d7856d | |||
| 669c7c0249 | |||
| 79a818bd50 | |||
| 8843707919 | |||
| bd2caa4eba | |||
| dcdca98f5d | |||
| 423cc17a76 | |||
| 5cc6c42acc | |||
| 97969b1c54 | |||
| 1c7106a79c | |||
| 8cd2d8bd4c | |||
| e3627d38e9 | |||
| b3434302d5 | |||
| 4aef17def4 | |||
| 4cd56c26a2 | |||
| dd6e1c3494 | |||
| f612437075 | |||
| 4bd20697fa | |||
| 83dbf0edfa | |||
| 049b67246f | |||
| 6e54bdfdcb | |||
| 0afd9c5632 | |||
| 444fd01acc | |||
| 9f64d1a1de | |||
| 27b2a4af3a | |||
| c80d9baf81 | |||
| 89e6636d18 | |||
| 7eb5f9a999 | |||
| 881fe73209 | |||
| 4a23f6e79d | |||
| 19462fc807 | |||
| 636cd0d3ae | |||
| 5fd0082ccf | |||
| 7fb5a8087e | |||
| a2ea2ec615 | |||
| cd36189ba7 | |||
| 38c9921ff3 | |||
| e0b9ecbad4 | |||
| 233094e425 | |||
| f4a1572861 | |||
| b05552fc7a | |||
| 653089d213 | |||
| 134c31bd1b | |||
| 03bf4df6e0 | |||
| 13e4255f9e | |||
| 6178d36a7d | |||
| c536035cbc | |||
| 6a616f81f3 | |||
| d1919262f3 | |||
| c8cde0f153 | |||
| 2ebdd57eae | |||
| c8d3439814 | |||
| 9def49211a | |||
| 15b6e1a8ab | |||
| 8449001f8c | |||
| f2051e7f72 | |||
| fc850a5db5 | |||
| 9de50b1e7d | |||
| 895f0fb814 | |||
| 3ec8a5c753 | |||
| 4ee399388e | |||
| 8e84429203 | |||
| 185ac24ab6 | |||
| e5de4109e6 | |||
| 00b87a7c26 | |||
| 50b3e9f4c4 | |||
| b62cadbe5d | |||
| a686e34da1 | |||
| 4c3fda7dc3 | |||
| b7bc11098d | |||
| 58ddd8bff6 | |||
| 219462fe0f | |||
| c36cd73b78 | |||
| 32ff9eb566 | |||
| e539e44c85 | |||
| 1c0cc27e6a | |||
| c7fd7f9a02 | |||
| 5f5828f60d | |||
| e00c5c5b3f | |||
| 10827a41ea | |||
| e4594ef2d8 | |||
| aaacb15bf1 | |||
| 1b7f53021f | |||
| ff6038d72d | |||
| 0495254143 | |||
| 7dde1951d0 | |||
| 8dc34965e3 | |||
| e027406026 | |||
| 7157099669 | |||
| 69b61cbc24 | |||
| 8266790fb8 | |||
| 802dbcc2a0 | |||
| 9096d45377 | |||
| 34c5a039d1 | |||
| 7a7725ee4c | |||
| 650cd6b903 | |||
| d0f0c0824f | |||
| b1aa2d016a | |||
| 68e69670be | |||
| 749a71c7e5 | |||
| 3fb7a12078 | |||
| 6117ccee2e | |||
| 90e798b675 | |||
| c7b84f5a22 | |||
| a857f72c81 | |||
| 067a3a5a76 | |||
| ad1f106f6d | |||
| 9943230f91 | |||
| 35a1d5d7bf | |||
| b3d102b475 | |||
| a6ed784508 | |||
| cf690982de | |||
| f21c7565d7 | |||
| a52f4a1987 | |||
| d124fba6ff | |||
| a6640e3cc5 | |||
| f2ec6fbfa7 | |||
| f18980c18d | |||
| c3303a5f75 | |||
| f697995c26 | |||
| e1dd3b10dd | |||
| a3f808d7c8 | |||
| 951701dabb | |||
| 08d363e2cc | |||
| 320f1d6537 | |||
| 991785fc18 | |||
| fc80684fa3 | |||
| 452abfc33c | |||
| 869312ef71 | |||
| 0c2255bde8 | |||
| d1d32db972 | |||
| f4a2d0abc5 | |||
| 7bbcb54241 | |||
| 1e47a87fc6 | |||
| dc64f3e478 | |||
| 957b36798f | |||
| bf74c56fe1 | |||
| c664af8dec | |||
| d6f7f68012 | |||
| 043017871c | |||
| 3b42314bb5 | |||
| 15fa2ce1c4 | |||
| f204b54f9a | |||
| 3bd3c902ad | |||
| dddce8311f | |||
| e9096b9aab | |||
| 6e5647f028 | |||
| 5bb4b75488 | |||
| 8dbeac1341 | |||
| ed50120d4c | |||
| 1abf6d5abd | |||
| c357a03bc6 | |||
| 6a5d12a186 | |||
| 7f5c1310f3 | |||
| 22214593ab | |||
| 5a989f26f3 | |||
| ae2a1faaad | |||
| 64ddde21af | |||
| 479a919f42 | |||
| 98468c0d7a | |||
| b549cd28ae | |||
| cef1449ac7 | |||
| 05a9322c75 | |||
| df89611bf2 | |||
| 35dea23580 | |||
| 596b545130 | |||
| 1e3999ec36 | |||
| 114906d2d6 | |||
| 2e05deaffb | |||
| 2fb029de04 | |||
| 690405b253 | |||
| fe533cd244 | |||
| 421edfe04b | |||
| 87bfe164e3 | |||
| a6a46e9839 | |||
| 9de2f078d5 | |||
| 40844876ea | |||
| ca61366218 | |||
| cd748aad47 | |||
| fce5602b53 | |||
| f87fad3fff | |||
| 06c53679ba | |||
| e8d9bc5119 | |||
| 26072bba9c | |||
| 00bfff52c2 | |||
| 0bc7f154c8 | |||
| 705b94bd21 | |||
| ed6a347109 | |||
| 6d6b0278a8 | |||
| 6e0b66d702 | |||
| 47caed9ada | |||
| 23d1ace339 | |||
| e220a615d1 | |||
| d7b6045d61 | |||
| c9b0f45690 | |||
| 15395a576f | |||
| 9a27c5befb | |||
| a26d94d979 | |||
| 328e588bcd | |||
| 454a269254 | |||
| f881082e80 | |||
| c8f07daf8f | |||
| 3f247f1256 | |||
| aabe146c30 | |||
| 650ad1f7fb | |||
| 269f344d45 | |||
| a649d85de1 | |||
| 020e0f0424 | |||
| 10b0927e15 | |||
| 28c28a0aa4 | |||
| eef93f5a7b | |||
| e1481d89dc | |||
| e8aa7d3ce3 | |||
| b02042301a | |||
| 551c99fd5f | |||
| 6c421ed65d | |||
| 9093e0e132 | |||
| 040cba0b09 | |||
| 6213c7d998 | |||
| 49e00b306a | |||
| 1c27fa982c | |||
| a28672fb70 | |||
| 65c5a734e2 | |||
| 9bdb4fe8cc | |||
| 11c638557b | |||
| a6130e076a | |||
| 906bce0877 | |||
| a827f02746 | |||
| eb0183009b | |||
| 9e172e0280 | |||
| 878b99a1c6 | |||
| 9655ea7f5c | |||
| d76a911669 | |||
| 591c7e2ec8 | |||
| 81dc006772 | |||
| c0eb0cb7a5 | |||
| 416878bb7c | |||
| fceb19128d | |||
| f9d73cc687 | |||
| 5ceb1167fb | |||
| 6b475eb86c | |||
| 9eac011bd0 | |||
| 0ba671d4a0 | |||
| 38b9b79c29 | |||
| 1edb83c019 | |||
| be0e8457b7 | |||
| aff482913b | |||
| 9374d57330 | |||
| 52106fb71b | |||
| 58765137ab | |||
| 8164b2298e | |||
| 966d95df20 | |||
| fe27810a24 | |||
| 4dfd38e127 | |||
| a8c5bafd18 | |||
| d8254d95e9 | |||
| 0c61fc6d43 | |||
| 0da66e6d43 | |||
| 7b51728813 | |||
| 5be80d33a3 | |||
| 1e3748b893 | |||
| 87523e90bc | |||
| bdc31675b7 | |||
| 726d6026b1 | |||
| 0eb550e297 | |||
| 67cfe686b1 | |||
| c7440dddef | |||
| c714426963 | |||
| a1fe7091f9 | |||
| af63b800ec | |||
| 9e828d5e54 | |||
| 7a4bc79720 | |||
| 1d5ea07bca | |||
| 2031359069 | |||
| 0838df97bf | |||
| dbd403031a | |||
| 287d6c8fdd | |||
| 732aadf082 | |||
| 2d8ac7d9ef | |||
| 28b8782266 | |||
| d8ac27f94a | |||
| 81751465b4 | |||
| de6b6413e4 | |||
| d4a380d7bd | |||
| 124d44f130 | |||
| 19ed12c81e | |||
| 557e6fe6eb | |||
| b7cefe0370 | |||
| 8b02aa0333 | |||
| c68a099ded | |||
| dc36fa5200 | |||
| e607d4db2b | |||
| e159ab1ee3 | |||
| 24e7238c54 | |||
| f863792923 | |||
| 65cca30361 | |||
| 8747f9ad55 | |||
| 3ecf8c7114 | |||
| a6a2e38e5c | |||
| 2faed63fed | |||
| 1cf4d34c37 | |||
| ced0357bf8 | |||
| d9f0e6b27c | |||
| 767a280562 | |||
| 254b560138 | |||
| b0900ccee5 | |||
| 0065ebb115 | |||
| 0211668d20 | |||
| ada3c37338 | |||
| 4635095c01 | |||
| b13c3fc2eb | |||
| c81e345e72 | |||
| 31df4d2fd1 | |||
| 0e3465dfd9 | |||
| 6fb2b71489 | |||
| 5105477490 | |||
| 856dd50e64 | |||
| 1a16fb7aa2 | |||
| 0e1bd1b404 | |||
| 4ab709460a | |||
| b38c43bacc | |||
| 88d48de46e | |||
| af247cacb6 | |||
| 499fa8fa88 | |||
| 79b91593c9 | |||
| 51801612c3 | |||
| a92dea5b99 | |||
| 1156d7d786 |
@@ -0,0 +1,71 @@
|
||||
# Bazel does not yet support wildcards or other .gitignore semantics for
|
||||
# .bazelignore. Two issues for this feature request are outstanding:
|
||||
# https://github.com/bazelbuild/bazel/issues/7093
|
||||
# https://github.com/bazelbuild/bazel/issues/8106
|
||||
.git
|
||||
node_modules
|
||||
dist
|
||||
|
||||
# All integration test node_modules folders
|
||||
integration/animations/node_modules
|
||||
integration/animations-async/node_modules
|
||||
integration/cli-elements-universal/node_modules
|
||||
integration/cli-hello-world/node_modules
|
||||
integration/cli-hello-world-ivy-i18n/node_modules
|
||||
integration/cli-hello-world-lazy/node_modules
|
||||
integration/cli-hello-world-mocha/node_modules
|
||||
integration/cli-signal-inputs/node_modules
|
||||
integration/defer/node_modules
|
||||
integration/dynamic-compiler/node_modules
|
||||
integration/forms/node_modules
|
||||
integration/injectable-def/node_modules
|
||||
integration/ivy-i18n/node_modules
|
||||
integration/ng_elements/node_modules
|
||||
integration/ng_update/node_modules
|
||||
integration/ng_update_migrations/node_modules
|
||||
integration/ng-add-localize/node_modules
|
||||
integration/no_ts_linker/node_modules
|
||||
integration/nodenext_resolution/node_modules
|
||||
integration/platform-server/node_modules
|
||||
integration/platform-server-zoneless/node_modules
|
||||
integration/platform-server-hydration/node_modules
|
||||
integration/service-worker-schema/node_modules
|
||||
integration/side-effects/node_modules
|
||||
integration/standalone-bootstrap/node_modules
|
||||
integration/terser/node_modules
|
||||
integration/trusted-types/node_modules
|
||||
integration/typings_test_rxjs7/node_modules
|
||||
integration/legacy-animations/node_modules
|
||||
integration/legacy-animations-async/node_modules
|
||||
integration/typings_test_ts59/node_modules
|
||||
modules/ssr-benchmarks/node_modules
|
||||
|
||||
# For rules_js
|
||||
adev/node_modules
|
||||
adev/shared-docs/node_modules
|
||||
adev/shared-docs/pipeline/api-gen/node_modules
|
||||
modules/node_modules
|
||||
integration/node_modules
|
||||
packages/animations/node_modules
|
||||
packages/common/node_modules
|
||||
packages/localize/node_modules
|
||||
packages/compiler-cli/node_modules
|
||||
packages/compiler-cli/linker/babel/test/node_modules
|
||||
packages/compiler/node_modules
|
||||
packages/core/node_modules
|
||||
packages/core/test/bundling/node_modules
|
||||
packages/elements/node_modules
|
||||
packages/forms/node_modules
|
||||
packages/language-service/node_modules
|
||||
packages/platform-browser/node_modules
|
||||
packages/platform-server/node_modules
|
||||
packages/platform-browser-dynamic/node_modules
|
||||
packages/router/node_modules
|
||||
packages/zone.js/node_modules
|
||||
packages/zone.js/test/typings/node_modules
|
||||
packages/upgrade/node_modules
|
||||
packages/benchpress/node_modules
|
||||
packages/service-worker/node_modules
|
||||
packages/zone.js/test/typings/node_modules
|
||||
packages/zone.js/node_modules
|
||||
tools/bazel/rules_angular_store/node_modules
|
||||
@@ -1,6 +1,3 @@
|
||||
# Disable NG CLI TTY mode
|
||||
build --action_env=NG_FORCE_TTY=false
|
||||
|
||||
# Enable debugging tests with --config=debug
|
||||
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results --strategy=TestRunner=standalone
|
||||
|
||||
@@ -72,9 +69,6 @@ build:release --stamp
|
||||
# Snapshots should also be stamped with version control information.
|
||||
build:snapshot-build --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=snapshot"
|
||||
build:snapshot-build --stamp
|
||||
# @angular/language-server package depends directly on other Angular framework packages.
|
||||
# This flag ensures that the language server uses the snapshot-built framework packages from the repository.
|
||||
build:snapshot-build --//:enable_language_server_snapshot_repo_deps
|
||||
|
||||
# Angular DevTools for Firefox releases *cannot* be stamped and `--config snapshot-build-firefox` is a no-op.
|
||||
# This is because Mozilla requires add-on source code to be uploaded and then they manually reproduce the build.
|
||||
@@ -146,7 +140,7 @@ build:trusted-build --remote_upload_local_results=true
|
||||
# Ensure that tags like "no-remote-exec" get propagated to actions created by rules,
|
||||
# even if the rule implementation does not explicitly pass them to the execution requirements.
|
||||
# https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation
|
||||
common --incompatible_allow_tags_propagation
|
||||
common --experimental_allow_tags_propagation
|
||||
|
||||
# Disable network access in the sandbox by default. To enable network access
|
||||
# for a particular target, use:
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
8.5.1
|
||||
7.6.1
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
This folder contains configuration files that can be used to opt into working on this repository in a [Docker container](https://www.docker.com/resources/what-container) via [VSCode](https://code.visualstudio.com/)'s Remote Development feature (see below).
|
||||
|
||||
Info on remote development and developing inside a container with VSCode:
|
||||
|
||||
- [VSCode: Remote Development](https://code.visualstudio.com/docs/remote/remote-overview)
|
||||
- [VSCode: Developing inside a Container](https://code.visualstudio.com/docs/remote/containers)
|
||||
- [VSCode: Remote Development FAQ](https://code.visualstudio.com/docs/remote/faq)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
_Prerequisite: [Install Docker](https://docs.docker.com/install) on your local environment._
|
||||
@@ -15,7 +15,6 @@ _Prerequisite: [Install Docker](https://docs.docker.com/install) on your local e
|
||||
To get started, read and follow the instructions in [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers). The [.devcontainer/](.) directory contains pre-configured `devcontainer.json` and `Dockerfile` files, which you can use to set up remote development with a docker container.
|
||||
|
||||
In a nutshell, you need to:
|
||||
|
||||
- Install the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension.
|
||||
- Copy [recommended-Dockerfile](./recommended-Dockerfile) to `Dockerfile` (and optionally tweak to suit your needs).
|
||||
- Copy [recommended-devcontainer.json](./recommended-devcontainer.json) to `devcontainer.json` (and optionally tweak to suit your needs).
|
||||
@@ -24,6 +23,7 @@ In a nutshell, you need to:
|
||||
|
||||
The `.devcontainer/devcontainer.json` and `.devcontainer/Dockerfile` files are ignored by git, so you can have your own local versions. We may occasionally update the template files ([recommended-devcontainer.json](./recommended-devcontainer.json), [recommended-Dockerfile](./recommended-Dockerfile)), in which case you will need to manually update your local copies (if desired).
|
||||
|
||||
|
||||
## Updating `recommended-devcontainer.json` and `recommended-Dockerfile`
|
||||
|
||||
You can update and commit the recommended config files (which people use as basis for their local configs), if you find that something is broken, out-of-date or can be improved.
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
# Image metadata and config.
|
||||
# Ideally, the Node.js version should match what we use on CI.
|
||||
FROM cimg/node:22.21.1-browsers@sha256:eee8ed828d5a54196456a86ac6872c43325acad54e59632261e23b486c458992
|
||||
FROM cimg/node:18.13.0@sha256:45d0ee279f522c4562a464df71108104cc9b2187205333ffd0707d4f05589731
|
||||
|
||||
|
||||
LABEL name="Angular dev environment" \
|
||||
description="This image can be used to create a dev environment for building Angular." \
|
||||
vendor="angular" \
|
||||
version="1.0"
|
||||
description="This image can be used to create a dev environment for building Angular." \
|
||||
vendor="angular" \
|
||||
version="1.0"
|
||||
|
||||
EXPOSE 4000 4200 4433 5000 8080 9876
|
||||
|
||||
EXPOSE 4200 4201 4205 4206 9876
|
||||
|
||||
# Switch to `root`.
|
||||
USER root
|
||||
|
||||
|
||||
# Configure `Node.js`/`npm`.
|
||||
RUN npm config --global set user root
|
||||
|
||||
|
||||
# Go! (And keep going.)
|
||||
CMD ["tail", "--follow", "/dev/null"]
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
{
|
||||
"name": "Angular dev container",
|
||||
"dockerFile": "Dockerfile",
|
||||
"forwardPorts": [4200, 4201, 4205, 4206, 9876],
|
||||
"appPort": [4000, 4200, 4433, 5000, 8080, 9876],
|
||||
"postCreateCommand": "pnpm install",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": ["BazelBuild.vscode-bazel", "ms-vscode.vscode-typescript-tslint-plugin"]
|
||||
}
|
||||
}
|
||||
"extensions": [
|
||||
"devondcarew.bazel-code",
|
||||
"ms-vscode.vscode-typescript-tslint-plugin"
|
||||
],
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ cc34e5fb072e7903e01463953a19d18503a39347
|
||||
f9781f9804f1e7c84df356d9aeb267730a7fc499
|
||||
dc62446ef7f2898a20d3be1196ecaf2a92a1077d
|
||||
711cb416260ca11ff158fc39b372efa2cf022d36
|
||||
af77b89e2abb67bba201a53d500874ad572b8384
|
||||
6270bba056cfaadb3fe0b2bf3b17036bdc28b90e
|
||||
# commits that switch to relative imports
|
||||
3d2263cb1f208e561692e41c5a17196c3c57877f
|
||||
ae047c59c0041e0a43cec020520d40ccd981b444
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
name: 'VSCode Angular Language Service extension'
|
||||
description: Report an issue or suggest a feature for the VSCode Angular Language Service extension
|
||||
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: bug-report-or-feature-request
|
||||
attributes:
|
||||
label: Is this a bug report or a feature request?
|
||||
description: Select one.
|
||||
options:
|
||||
- label: Bug Report
|
||||
- label: Feature Request
|
||||
|
||||
- type: textarea
|
||||
id: reproduction-steps
|
||||
attributes:
|
||||
label: Please provide the steps to reproduce the issue [Bug Report only]
|
||||
|
||||
- type: textarea
|
||||
id: expected-vs-actual-behavior
|
||||
attributes:
|
||||
label: Please provide the expected behavior vs the actual behavior you encountered [Bug Report only]
|
||||
|
||||
- type: textarea
|
||||
id: screenshot
|
||||
attributes:
|
||||
label: Please provide a screenshot if possible [Bug Report only]
|
||||
|
||||
- type: textarea
|
||||
id: exception-or-error
|
||||
attributes:
|
||||
label: Please provide the exception or error you saw [Bug Report only]
|
||||
render: true
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description [Feature Request only]
|
||||
|
||||
- type: textarea
|
||||
id: proposed-solution
|
||||
attributes:
|
||||
label: Proposed solution [Feature Request only]
|
||||
|
||||
- type: textarea
|
||||
id: alternatives-considered
|
||||
attributes:
|
||||
label: Alternatives considered [Feature Request only]
|
||||
@@ -1,13 +1,12 @@
|
||||
## PR Checklist
|
||||
|
||||
Please check if your PR fulfills the following requirements:
|
||||
|
||||
- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md
|
||||
- [ ] Tests for the changes have been added (for bug fixes / features)
|
||||
- [ ] Docs have been added / updated (for bug fixes / features)
|
||||
|
||||
## PR Type
|
||||
|
||||
## PR Type
|
||||
What kind of change does this PR introduce?
|
||||
|
||||
<!-- Please check the one that applies to this PR using "x". -->
|
||||
@@ -22,19 +21,23 @@ What kind of change does this PR introduce?
|
||||
- [ ] angular.dev application / infrastructure changes
|
||||
- [ ] Other... Please describe:
|
||||
|
||||
## What is the current behavior?
|
||||
|
||||
## What is the current behavior?
|
||||
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
|
||||
|
||||
Issue Number: N/A
|
||||
|
||||
|
||||
## What is the new behavior?
|
||||
|
||||
|
||||
## Does this PR introduce a breaking change?
|
||||
|
||||
- [ ] Yes
|
||||
- [ ] No
|
||||
|
||||
|
||||
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
|
||||
|
||||
|
||||
## Other information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {mkdtemp, readFile, rm, writeFile} from 'node:fs/promises';
|
||||
import {cp, mkdtemp, readFile, rm, writeFile} from 'node:fs/promises';
|
||||
import {Deployment} from './deployments.mjs';
|
||||
import {join} from 'node:path';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {getCredentialFilePath} from './credential.mjs';
|
||||
export async function deployToFirebase(
|
||||
deployment: Deployment,
|
||||
configPath: string,
|
||||
stagingDir: string,
|
||||
distDirPath: string,
|
||||
) {
|
||||
if (deployment.destination == undefined) {
|
||||
console.log(`No deployment necessary for docs created from: ${deployment.branch}`);
|
||||
@@ -18,33 +18,37 @@ export async function deployToFirebase(
|
||||
|
||||
console.log('Preparing for deployment to firebase...');
|
||||
|
||||
const deployConfigPath = join(stagingDir, 'firebase.json');
|
||||
const tmpDeployDir = await mkdtemp(join(tmpdir(), 'deploy-directory'));
|
||||
const deployConfigPath = join(tmpDeployDir, 'firebase.json');
|
||||
|
||||
const config = JSON.parse(await readFile(configPath, {encoding: 'utf-8'})) as {
|
||||
hosting: {public: string};
|
||||
};
|
||||
config['hosting']['public'] = './browser';
|
||||
config['hosting']['public'] = './dist';
|
||||
|
||||
await writeFile(deployConfigPath, JSON.stringify(config, null, 2));
|
||||
|
||||
await cp(distDirPath, join(tmpDeployDir, 'dist'), {recursive: true});
|
||||
spawnSync(`chmod 777 -R ${tmpDeployDir}`, {encoding: 'utf-8', shell: true});
|
||||
|
||||
firebase(
|
||||
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
|
||||
stagingDir,
|
||||
tmpDeployDir,
|
||||
);
|
||||
firebase(
|
||||
`target:apply --config ${deployConfigPath} --project angular-dev-site hosting angular-docs ${deployment.destination}`,
|
||||
stagingDir,
|
||||
tmpDeployDir,
|
||||
);
|
||||
firebase(
|
||||
`deploy --config ${deployConfigPath} --project angular-dev-site --only hosting --non-interactive`,
|
||||
stagingDir,
|
||||
tmpDeployDir,
|
||||
);
|
||||
firebase(
|
||||
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
|
||||
stagingDir,
|
||||
tmpDeployDir,
|
||||
);
|
||||
|
||||
await rm(stagingDir, {recursive: true});
|
||||
await rm(tmpDeployDir, {recursive: true});
|
||||
}
|
||||
|
||||
export async function setupRedirect(deployment: Deployment) {
|
||||
@@ -99,7 +103,7 @@ export async function setupRedirect(deployment: Deployment) {
|
||||
}
|
||||
|
||||
function firebase(cmd: string, cwd?: string) {
|
||||
const {status} = spawnSync('npx', `-y firebase-tools@13.15.1 ${cmd}`.split(' '), {
|
||||
spawnSync('npx', `-y firebase-tools@13.15.1 ${cmd}`.split(' '), {
|
||||
cwd,
|
||||
encoding: 'utf-8',
|
||||
shell: true,
|
||||
@@ -109,8 +113,4 @@ function firebase(cmd: string, cwd?: string) {
|
||||
GOOGLE_APPLICATION_CREDENTIALS: getCredentialFilePath(),
|
||||
},
|
||||
});
|
||||
if (status !== 0) {
|
||||
console.error('Firebase command failed, see log above for details.');
|
||||
process.exit(status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ export interface Deployment {
|
||||
to: string;
|
||||
};
|
||||
destination?: string;
|
||||
servingUrl: string;
|
||||
}
|
||||
|
||||
export type Deployments = Map<string, Deployment>;
|
||||
@@ -32,7 +31,6 @@ export async function getDeployments(): Promise<Deployments> {
|
||||
docSites.set(branch.name, {
|
||||
branch: branch.name,
|
||||
destination: `v${branch.version.major}-angular-dev`,
|
||||
servingUrl: `https://v${branch.version.major}.angular.dev/`,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -42,14 +40,12 @@ export async function getDeployments(): Promise<Deployments> {
|
||||
from: `v${releaseTrains.latest.version.major}-angular-dev`,
|
||||
to: 'https://angular.dev',
|
||||
},
|
||||
servingUrl: 'https://angular.dev/',
|
||||
destination: 'angular-dev-site',
|
||||
});
|
||||
|
||||
if (releaseTrains.releaseCandidate) {
|
||||
docSites.set(releaseTrains.next.branchName, {
|
||||
branch: releaseTrains.next.branchName,
|
||||
servingUrl: 'https://next.angular.dev/',
|
||||
});
|
||||
|
||||
docSites.set(releaseTrains.releaseCandidate.branchName, {
|
||||
@@ -59,13 +55,11 @@ export async function getDeployments(): Promise<Deployments> {
|
||||
from: `v${releaseTrains.releaseCandidate.version.major}-angular-dev`,
|
||||
to: 'https://next.angular.dev',
|
||||
},
|
||||
servingUrl: 'https://next.angular.dev/',
|
||||
});
|
||||
} else {
|
||||
docSites.set(releaseTrains.next.branchName, {
|
||||
branch: releaseTrains.next.branchName,
|
||||
destination: 'next-angular-dev',
|
||||
servingUrl: 'https://next.angular.dev/',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,18 +2,19 @@ import {getInput, setFailed} from '@actions/core';
|
||||
import {context} from '@actions/github';
|
||||
import {deployToFirebase, setupRedirect} from './deploy.mjs';
|
||||
import {getDeployments} from './deployments.mjs';
|
||||
import {generateSitemap} from './sitemap.mjs';
|
||||
import {assertValidGithubConfig, AuthenticatedGitClient, getConfig} from '@angular/ng-dev';
|
||||
import {AuthenticatedGitClient, GithubConfig, setConfig} from '@angular/ng-dev';
|
||||
import {githubReleaseTrainReadToken} from './credential.mjs';
|
||||
import {spawnSync} from 'child_process';
|
||||
import {cp, mkdtemp} from 'fs/promises';
|
||||
import {tmpdir} from 'os';
|
||||
import {join} from 'path';
|
||||
|
||||
const refMatcher = /refs\/heads\/(.*)/;
|
||||
|
||||
async function deployDocs() {
|
||||
getConfig([assertValidGithubConfig]);
|
||||
setConfig({
|
||||
github: {
|
||||
mainBranchName: 'main',
|
||||
name: 'angular',
|
||||
owner: 'angular',
|
||||
} as GithubConfig,
|
||||
});
|
||||
|
||||
AuthenticatedGitClient.configure(githubReleaseTrainReadToken);
|
||||
|
||||
@@ -27,11 +28,7 @@ async function deployDocs() {
|
||||
|
||||
const currentBranch = matchedRef[1];
|
||||
const configPath = getInput('configPath');
|
||||
const stagingDir = await mkdtemp(join(tmpdir(), 'deploy-directory'));
|
||||
|
||||
// Copy all files from the distDir into stagingDir and modify the permissions for editing
|
||||
await cp(getInput('distDir'), stagingDir, {recursive: true});
|
||||
spawnSync(`chmod 777 -R ${stagingDir}`, {encoding: 'utf-8', shell: true});
|
||||
const distDir = getInput('distDir');
|
||||
|
||||
const deployment = (await getDeployments()).get(currentBranch);
|
||||
if (deployment === undefined) {
|
||||
@@ -60,8 +57,7 @@ async function deployDocs() {
|
||||
console.log(` To: ${deployment.redirect.to}`);
|
||||
}
|
||||
|
||||
await generateSitemap(deployment, stagingDir);
|
||||
await deployToFirebase(deployment, configPath, stagingDir);
|
||||
await deployToFirebase(deployment, configPath, distDir);
|
||||
await setupRedirect(deployment);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
import {Deployment} from './deployments.mjs';
|
||||
import {join} from 'node:path';
|
||||
import {readFile, writeFile} from 'node:fs/promises';
|
||||
|
||||
export async function generateSitemap(deployment: Deployment, distDir: string): Promise<void> {
|
||||
/** Timestamp string used to of the last file update. */
|
||||
const lastModifiedTimestamp = new Date().toISOString();
|
||||
/** An object containing all of the routes available within the application. */
|
||||
const {routes} = JSON.parse(await readFile(join(distDir, 'prerendered-routes.json'), 'utf-8'));
|
||||
const routePaths = Object.keys(routes);
|
||||
|
||||
/** The generated sitemap string. */
|
||||
const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
${routePaths
|
||||
.map(
|
||||
(route) => `<url>
|
||||
<loc>${joinUrlParts(deployment.servingUrl, route)}</loc>
|
||||
<lastmod>${lastModifiedTimestamp}</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>`,
|
||||
)
|
||||
.join('')}
|
||||
</urlset>`;
|
||||
|
||||
await writeFile(join(distDir, 'browser', 'sitemap.xml'), sitemap, 'utf-8');
|
||||
|
||||
console.log(`Generated sitemap with ${routePaths.length} entries.`);
|
||||
}
|
||||
|
||||
function joinUrlParts(...parts: string[]): string {
|
||||
const normalizeParts: string[] = [];
|
||||
for (const part of parts) {
|
||||
if (part === '') {
|
||||
// Skip any empty parts
|
||||
continue;
|
||||
}
|
||||
|
||||
let normalizedPart = part;
|
||||
if (part[0] === '/') {
|
||||
normalizedPart = normalizedPart.slice(1);
|
||||
}
|
||||
if (part.at(-1) === '/') {
|
||||
normalizedPart = normalizedPart.slice(0, -1);
|
||||
}
|
||||
if (normalizedPart !== '') {
|
||||
normalizeParts.push(normalizedPart);
|
||||
}
|
||||
}
|
||||
|
||||
return normalizeParts.join('/');
|
||||
}
|
||||
+27051
-20414
File diff suppressed because one or more lines are too long
@@ -2,7 +2,6 @@
|
||||
"compilerOptions": {
|
||||
"module": "NodeNext",
|
||||
"target": "ES2021",
|
||||
"types": ["node"],
|
||||
"lib": ["es2021"],
|
||||
"experimentalDecorators": true,
|
||||
"strict": true,
|
||||
@@ -12,5 +11,6 @@
|
||||
"noImplicitReturns": true,
|
||||
"declaration": true,
|
||||
"sourceMap": true
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,9 @@ runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Saucelabs Variables
|
||||
uses: angular/dev-infra/github-actions/saucelabs@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/saucelabs@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Starting Saucelabs tunnel service
|
||||
shell: bash
|
||||
run: ./tools/saucelabs/sauce-service.sh run &
|
||||
|
||||
@@ -21,17 +21,16 @@ jobs:
|
||||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'adev: preview'))
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Build adev
|
||||
# `snapshot-build` config is used to stamp the exact version with sha in the footer.
|
||||
run: pnpm bazel build //adev:build.production --config=snapshot-build
|
||||
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
run: pnpm bazel build //adev:build.production
|
||||
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
workflow-artifact-name: 'adev-preview'
|
||||
pull-number: '${{github.event.pull_request.number}}'
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||
with:
|
||||
token: '${{secrets.GITHUB_TOKEN}}'
|
||||
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
npx -y firebase-tools@latest target:clear --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs
|
||||
npx -y firebase-tools@latest target:apply --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs ${{env.PREVIEW_SITE}}
|
||||
|
||||
- uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
github-token: '${{secrets.GITHUB_TOKEN}}'
|
||||
workflow-artifact-name: 'adev-preview'
|
||||
|
||||
@@ -12,11 +12,10 @@ permissions:
|
||||
jobs:
|
||||
assistant_to_the_branch_manager:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.fork == false
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: angular/dev-infra/github-actions/branch-manager@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- uses: angular/dev-infra/github-actions/branch-manager@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/benchmark-compare ')}}
|
||||
steps:
|
||||
- uses: TheModdingInquisition/actions-team-membership@057d91bb80f2976a1bc6dfab5b4ae1da9aebbd89 # v1.0
|
||||
- uses: TheModdingInquisition/actions-team-membership@a69636a92bc927f32c3910baac06bacc949c984c # v1.0
|
||||
with:
|
||||
team: 'team'
|
||||
organization: angular
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
exit: true
|
||||
|
||||
# Indicate that the benchmark command was received.
|
||||
- uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5
|
||||
- uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
|
||||
with:
|
||||
comment-id: ${{github.event.comment.id}}
|
||||
token: '${{secrets.BENCHMARK_POST_RESULTS_GITHUB_TOKEN}}'
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
- uses: alessbell/pull-request-comment-branch@aad01d65d6982b8eacabed5e9a684cd8ceb98da6 # v1.1
|
||||
id: comment-branch
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
# Specify repository as the PR branch might be from a fork.
|
||||
repository: ${{steps.comment-branch.outputs.head_owner}}/${{steps.comment-branch.outputs.head_repo}}
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
|
||||
- run: pnpm install --frozen-lockfile
|
||||
|
||||
- uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
bazelrc: ./.bazelrc.user
|
||||
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
id: benchmark
|
||||
name: Running benchmark
|
||||
|
||||
- uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5
|
||||
- uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
|
||||
with:
|
||||
issue-number: ${{github.event.issue.number}}
|
||||
token: '${{secrets.BENCHMARK_POST_RESULTS_GITHUB_TOKEN}}'
|
||||
|
||||
+33
-48
@@ -21,7 +21,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Check code lint
|
||||
@@ -39,15 +39,20 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
disable-package-manager-cache: true
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
|
||||
- name: Cache downloaded Cypress binary
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: '~/.cache/Cypress'
|
||||
key: cypress-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run unit tests
|
||||
@@ -55,7 +60,7 @@ jobs:
|
||||
- name: Test build
|
||||
run: pnpm devtools:build:chrome
|
||||
- name: Cypress run
|
||||
uses: cypress-io/github-action@f790eee7a50d9505912f50c2095510be7de06aa7 # v6.10.9
|
||||
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
|
||||
with:
|
||||
command: pnpm devtools:test:e2e
|
||||
start: pnpm bazel run //devtools/src:devserver
|
||||
@@ -67,11 +72,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel Remote Caching
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
|
||||
- name: Install node modules
|
||||
@@ -83,11 +88,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel Remote Caching
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
|
||||
- name: Install node modules
|
||||
@@ -100,11 +105,11 @@ jobs:
|
||||
labels: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
|
||||
- name: Install node modules
|
||||
@@ -114,49 +119,34 @@ jobs:
|
||||
- name: Build adev in fast mode to ensure it continues to work
|
||||
run: pnpm bazel build //adev:build
|
||||
|
||||
vscode-ng-language-service:
|
||||
runs-on:
|
||||
labels: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
with:
|
||||
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run tests
|
||||
run: pnpm bazel test //vscode-ng-language-service/...
|
||||
|
||||
publish-snapshots:
|
||||
runs-on:
|
||||
labels: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
cache-node-modules: true
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials
|
||||
- run: pnpm build
|
||||
- run: ./scripts/ci/publish-snapshot-build-artifacts.sh
|
||||
- run: ./scripts/ci/publish-build-artifacts.sh
|
||||
|
||||
zone-js:
|
||||
runs-on:
|
||||
labels: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
|
||||
- name: Install node modules
|
||||
@@ -206,24 +196,19 @@ jobs:
|
||||
runs-on: ubuntu-latest-8core
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Build adev
|
||||
# `snapshot-build` config is used to stamp the exact version with sha in the footer.
|
||||
run: pnpm bazel build //adev:build.production --config=snapshot-build
|
||||
run: pnpm bazel build //adev:build.production --config=release
|
||||
- name: Deploy to firebase
|
||||
uses: ./.github/actions/deploy-docs-site
|
||||
with:
|
||||
serviceKey: ${{ secrets.ANGULAR_DEV_SITE_DEPLOY }}
|
||||
githubReleaseTrainReadToken: ${{ secrets.DOCS_DEPLOY_GITHUB_RELEASE_TRAIN_TOKEN }}
|
||||
configPath: 'adev/firebase.json'
|
||||
distDir: 'dist/bin/adev/dist'
|
||||
- name: Update Algolia synonym record
|
||||
run: node adev/scripts/synonyms/update-synonyms.mts
|
||||
env:
|
||||
ALGOLIA_KEY: ${{ secrets.ALGOLIA_SYNONYM_MANAGER }}
|
||||
distDir: 'dist/bin/adev/dist/browser'
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
name: Update ADEV Cross Repo Docs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs: {}
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- '[0-9]+.[0-9]+.x'
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update_adev_cross_repo_docs:
|
||||
name: Update Cross Repo ADEV Docs
|
||||
if: github.repository == 'angular/angular'
|
||||
runs-on: ubuntu-latest
|
||||
# Prevents multiple concurrent runs of this workflow for the same branch
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
# Setting `persist-credentials: false` prevents the github-action account from being the
|
||||
# account that is attempted to be used for authentication, instead the remote is set to
|
||||
# an authenticated URL.
|
||||
persist-credentials: false
|
||||
|
||||
- name: Generate Docs
|
||||
run: node adev/scripts/update-cross-repo-docs/index.mjs
|
||||
env:
|
||||
ANGULAR_READONLY_GITHUB_TOKEN: ${{ secrets.READONLY_GITHUB_TOKEN }}
|
||||
|
||||
- name: Create a PR (if necessary)
|
||||
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
|
||||
with:
|
||||
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
|
||||
push-to-fork: 'angular-robot/angular'
|
||||
delete-branch: true
|
||||
maintainer-can-modify: false
|
||||
branch: docs-cross-repo-update-${{github.ref_name}}
|
||||
committer: Angular Robot <angular-robot@google.com>
|
||||
author: Angular Robot <angular-robot@google.com>
|
||||
title: 'docs: update cross-repo adev docs [${{github.ref_name}}]'
|
||||
body: |
|
||||
Updated Angular adev cross repo docs files.
|
||||
labels: |
|
||||
action: merge
|
||||
area: docs
|
||||
target: automation
|
||||
commit-message: |
|
||||
docs: update cross-repo adev docs
|
||||
|
||||
Updated Angular adev cross repo docs files.
|
||||
@@ -12,14 +12,14 @@ jobs:
|
||||
labels:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: angular/dev-infra/github-actions/pull-request-labeling@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- uses: angular/dev-infra/github-actions/pull-request-labeling@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
post_approval_changes:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: angular/dev-infra/github-actions/post-approval-changes@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- uses: angular/dev-infra/github-actions/post-approval-changes@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
|
||||
@@ -13,8 +13,8 @@ jobs:
|
||||
statuses: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: angular/dev-infra/github-actions/google-internal-tests@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- uses: angular/dev-infra/github-actions/google-internal-tests@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
run-tests-guide-url: http://go/angular-g3sync-start
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -13,15 +13,17 @@ jobs:
|
||||
JOBS: 2
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
cache-node-modules: true
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel Remote Caching
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Saucelabs Variables
|
||||
uses: angular/dev-infra/github-actions/saucelabs@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/saucelabs@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Set up Sauce Tunnel Daemon
|
||||
run: pnpm bazel run //tools/saucelabs-daemon/background-service -- $JOBS &
|
||||
env:
|
||||
|
||||
@@ -9,6 +9,6 @@ jobs:
|
||||
status:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: angular/dev-infra/github-actions/unified-status-check@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- uses: angular/dev-infra/github-actions/unified-status-check@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
workflows: ${{ steps.workflows.outputs.workflows }}
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- id: workflows
|
||||
@@ -36,16 +36,16 @@ jobs:
|
||||
workflow: ${{ fromJSON(needs.list.outputs.workflows) }}
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
# We utilize the google-github-actions/auth action to allow us to get an active credential using workflow
|
||||
# identity federation. This allows us to request short lived credentials on demand, rather than storing
|
||||
# credentials in secrets long term. More information can be found at:
|
||||
# https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform
|
||||
- uses: 'google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093' # v3
|
||||
- uses: 'google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed' # v2
|
||||
with:
|
||||
project_id: 'internal-200822'
|
||||
workload_identity_provider: 'projects/823469418460/locations/global/workloadIdentityPools/measurables-tracking/providers/angular'
|
||||
|
||||
+24
-34
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Check code lint
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
- name: Check code format
|
||||
run: pnpm ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
|
||||
- name: Check Package Licenses
|
||||
uses: angular/dev-infra/github-actions/linting/licenses@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/linting/licenses@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
allow-dependencies-licenses: 'pkg:npm/google-protobuf@'
|
||||
|
||||
@@ -45,13 +45,18 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
with:
|
||||
disable-package-manager-cache: true
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Cache downloaded Cypress binary
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: '~/.cache/Cypress'
|
||||
key: cypress-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run unit tests
|
||||
@@ -59,7 +64,7 @@ jobs:
|
||||
- name: Test build
|
||||
run: pnpm devtools:build:chrome
|
||||
- name: Cypress run
|
||||
uses: cypress-io/github-action@f790eee7a50d9505912f50c2095510be7de06aa7 # v6.10.9
|
||||
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
|
||||
with:
|
||||
command: pnpm devtools:test:e2e
|
||||
start: pnpm bazel run //devtools/src:devserver
|
||||
@@ -71,11 +76,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel Remote Caching
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run CI tests for framework
|
||||
@@ -86,7 +91,7 @@ jobs:
|
||||
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
|
||||
- name: Upload GRPC logs (for debugging of RBE issues)
|
||||
if: always()
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
path: /tmp/rbe-grpc.log
|
||||
retention-days: 1
|
||||
@@ -95,11 +100,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel Remote Caching
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run integration CI tests for framework
|
||||
@@ -110,11 +115,11 @@ jobs:
|
||||
labels: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run tests
|
||||
@@ -122,31 +127,16 @@ jobs:
|
||||
- name: Build adev in fast mode to ensure it continues to work
|
||||
run: pnpm bazel build //adev:build
|
||||
|
||||
vscode-ng-language-service:
|
||||
runs-on:
|
||||
labels: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run tests
|
||||
run: pnpm bazel test //vscode-ng-language-service/...
|
||||
|
||||
zone-js:
|
||||
runs-on:
|
||||
labels: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@1d545550f0a93b2ffee3672587314d6f6b3dc7fd
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@08d451f9b4e900928b65cd31234693ef9a994492
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
- run: |
|
||||
|
||||
@@ -25,12 +25,12 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'Run analysis'
|
||||
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
||||
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
|
||||
# Upload the results as artifacts.
|
||||
- name: 'Upload artifact'
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
@@ -47,6 +47,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: 'Upload to code-scanning'
|
||||
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
|
||||
uses: github/codeql-action/upload-sarif@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
name: Update ADEV Angular CDK APIs and CLI Help
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs: {}
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- '[0-9]+.[0-9]+.x'
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update_adev_docs:
|
||||
name: Update Angular CDK APIs and CLI Help (if necessary)
|
||||
if: github.repository == 'angular/angular'
|
||||
runs-on: ubuntu-latest
|
||||
# Prevents multiple concurrent runs of this workflow for the same branch
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
# Setting `persist-credentials: false` prevents the github-action account from being the
|
||||
# account that is attempted to be used for authentication, instead the remote is set to
|
||||
# an authenticated URL.
|
||||
persist-credentials: false
|
||||
|
||||
# Angular CDK
|
||||
- name: Generate CDK apis
|
||||
run: node adev/scripts/update-cdk-apis/index.mjs
|
||||
env:
|
||||
ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN }}
|
||||
- name: Create a PR CDK apis (if necessary)
|
||||
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||
with:
|
||||
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
|
||||
push-to-fork: 'angular-robot/angular'
|
||||
delete-branch: true
|
||||
maintainer-can-modify: false
|
||||
branch: docs-update-cdk-apis-${{github.ref_name}}
|
||||
committer: Angular Robot <angular-robot@google.com>
|
||||
author: Angular Robot <angular-robot@google.com>
|
||||
title: 'docs: update Angular CDK apis [${{github.ref_name}}]'
|
||||
body: |
|
||||
Updated Angular CDK api files.
|
||||
labels: |
|
||||
action: merge
|
||||
area: docs
|
||||
target: automation
|
||||
commit-message: |
|
||||
docs: update Angular CDK apis
|
||||
|
||||
Updated Angular CDK api files.
|
||||
|
||||
# Angular CLI
|
||||
- name: Reset to current GitHub ref
|
||||
run: |
|
||||
git reset --hard ${{ github.ref }}
|
||||
- name: Generate CLI help
|
||||
run: node adev/scripts/update-cli-help/index.mjs
|
||||
env:
|
||||
ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN }}
|
||||
- name: Create a PR CLI help (if necessary)
|
||||
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||
with:
|
||||
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
|
||||
push-to-fork: 'angular-robot/angular'
|
||||
delete-branch: true
|
||||
maintainer-can-modify: false
|
||||
branch: docs-update-cli-help-${{github.ref_name}}
|
||||
committer: Angular Robot <angular-robot@google.com>
|
||||
author: Angular Robot <angular-robot@google.com>
|
||||
title: 'docs: update Angular CLI help [${{github.ref_name}}]'
|
||||
body: |
|
||||
Updated Angular CLI help contents.
|
||||
labels: |
|
||||
action: merge
|
||||
area: docs
|
||||
target: automation
|
||||
commit-message: |
|
||||
docs: update Angular CLI help
|
||||
|
||||
Updated Angular CLI help contents.
|
||||
+2
-3
@@ -16,7 +16,9 @@ pubspec.lock
|
||||
!.devcontainer/recommended-devcontainer.json
|
||||
!.devcontainer/recommended-Dockerfile
|
||||
.settings/
|
||||
.vscode/launch.json
|
||||
.vscode/settings.json
|
||||
.vscode/tasks.json
|
||||
*.swo
|
||||
*.swp
|
||||
modules/.settings
|
||||
@@ -54,6 +56,3 @@ baseline.json
|
||||
|
||||
# Ignore cache created with the Angular CLI.
|
||||
.angular/
|
||||
|
||||
# pnpm store
|
||||
.pnpm-store
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* The configuration for `ng-dev caretaker` commands.
|
||||
*
|
||||
* @type { import("@angular/ng-dev").CaretakerConfig }
|
||||
*/
|
||||
export const caretaker = {
|
||||
g3SyncConfigPath: './.ng-dev/google-sync-config.json',
|
||||
githubQueries: [
|
||||
{
|
||||
name: 'Merge Queue',
|
||||
query: `is:pr is:open label:"action: merge"`,
|
||||
},
|
||||
{
|
||||
name: 'Merge Assistance Queue',
|
||||
query: `is:pr is:open label:"merge: caretaker note" label:"action: merge"`,
|
||||
},
|
||||
{
|
||||
name: 'Initial Triage Queue',
|
||||
query: `is:open no:milestone -draft:true`,
|
||||
},
|
||||
],
|
||||
hasEmeaCaretaker: true,
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
import {CaretakerConfig} from '@angular/ng-dev';
|
||||
|
||||
/** The configuration for `ng-dev caretaker` commands. */
|
||||
export const caretaker: CaretakerConfig = {
|
||||
g3SyncConfigPath: './.ng-dev/google-sync-config.json',
|
||||
githubQueries: [
|
||||
{
|
||||
name: 'Merge Queue',
|
||||
query: `is:pr is:open label:"action: merge"`,
|
||||
},
|
||||
{
|
||||
name: 'Merge Assistance Queue',
|
||||
query: `is:pr is:open label:"merge: caretaker note" label:"action: merge"`,
|
||||
},
|
||||
{
|
||||
name: 'Initial Triage Queue',
|
||||
query: `is:open no:milestone -draft:true`,
|
||||
},
|
||||
],
|
||||
caretakerGroup: 'angular-caretaker',
|
||||
};
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* The configuration for `ng-dev commit-message` commands.
|
||||
*
|
||||
* @type { import("@angular/ng-dev").CommitMessageConfig }
|
||||
*/
|
||||
export const commitMessage = {
|
||||
maxLineLength: Infinity,
|
||||
minBodyLength: 20,
|
||||
minBodyLengthTypeExcludes: ['docs'],
|
||||
// If you update this, also update the docs.
|
||||
// https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md#scope
|
||||
scopes: [
|
||||
'animations',
|
||||
'benchpress',
|
||||
'common',
|
||||
'compiler',
|
||||
'compiler-cli',
|
||||
'core',
|
||||
'dev-infra',
|
||||
'devtools',
|
||||
'docs-infra',
|
||||
'elements',
|
||||
'forms',
|
||||
'http',
|
||||
'language-service',
|
||||
'language-server',
|
||||
'localize',
|
||||
'migrations',
|
||||
'platform-browser',
|
||||
'platform-browser-dynamic',
|
||||
'platform-server',
|
||||
'router',
|
||||
'service-worker',
|
||||
'upgrade',
|
||||
'vscode-extension',
|
||||
'zone.js',
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
import {CommitMessageConfig} from '@angular/ng-dev';
|
||||
|
||||
/**
|
||||
* The configuration for `ng-dev commit-message` commands.
|
||||
*/
|
||||
export const commitMessage: CommitMessageConfig = {
|
||||
maxLineLength: Infinity,
|
||||
minBodyLength: 20,
|
||||
minBodyLengthTypeExcludes: ['docs'],
|
||||
// If you update this, also update the docs.
|
||||
// https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md#scope
|
||||
scopes: [
|
||||
'animations',
|
||||
'bazel',
|
||||
'benchpress',
|
||||
'changelog',
|
||||
'common',
|
||||
'compiler',
|
||||
'compiler-cli',
|
||||
'core',
|
||||
'dev-infra',
|
||||
'devtools',
|
||||
'docs-infra',
|
||||
'elements',
|
||||
'forms',
|
||||
'http',
|
||||
'language-service',
|
||||
'localize',
|
||||
'migrations',
|
||||
'packaging',
|
||||
'platform-browser',
|
||||
'platform-browser-dynamic',
|
||||
'platform-server',
|
||||
'router',
|
||||
'service-worker',
|
||||
'upgrade',
|
||||
'zone.js',
|
||||
],
|
||||
};
|
||||
@@ -1,8 +0,0 @@
|
||||
import {caretaker} from './caretaker.mjs';
|
||||
import {commitMessage} from './commit-message.mjs';
|
||||
import {format} from './format.mjs';
|
||||
import {github} from './github.mjs';
|
||||
import {pullRequest} from './pull-request.mjs';
|
||||
import {release} from './release.mjs';
|
||||
|
||||
export {commitMessage, format, github, pullRequest, caretaker, release};
|
||||
@@ -0,0 +1,15 @@
|
||||
import {caretaker} from './caretaker.mjs';
|
||||
import {commitMessage} from './commit-message.mjs';
|
||||
import {format} from './format.mjs';
|
||||
import {github} from './github.mjs';
|
||||
import {pullRequest} from './pull-request.mjs';
|
||||
import {release} from './release.mjs';
|
||||
|
||||
export {
|
||||
commitMessage,
|
||||
format,
|
||||
github,
|
||||
pullRequest,
|
||||
caretaker,
|
||||
release,
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Configuration for the `ng-dev format` command.
|
||||
*
|
||||
* @type { import("@angular/ng-dev").FormatConfig }
|
||||
*/
|
||||
export const format = {
|
||||
'prettier': true,
|
||||
'buildifier': true,
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
import {FormatConfig} from '@angular/ng-dev';
|
||||
|
||||
/**
|
||||
* Configuration for the `ng-dev format` command.
|
||||
*/
|
||||
export const format: FormatConfig = {
|
||||
'prettier': {
|
||||
'matchers': [
|
||||
'**/*.{yaml,yml}',
|
||||
'**/*.{js,ts,mjs,mts,cjs,cts,tsx}',
|
||||
'devtools/**/*.{js,ts,mjs,mts,cjs,cts,html,scss}',
|
||||
'integration/**/size.json',
|
||||
// Do not format d.ts files as they are generated
|
||||
'!**/*.d.ts',
|
||||
// Both third_party and .yarn are directories containing copied code which should
|
||||
// not be modified.
|
||||
'!third_party/**',
|
||||
// Do not format the locale files which are checked-in for Google3, but generated using
|
||||
// the `generate-locales-tool` from `packages/common/locales`.
|
||||
'!packages/core/src/i18n/locale_en.ts',
|
||||
'!packages/common/locales/closure-locale.ts',
|
||||
'!packages/common/src/i18n/currencies.ts',
|
||||
// Test cases contain non valid code.
|
||||
'!packages/compiler-cli/test/compliance/test_cases/**/*.{js,ts,mjs,mts,cjs,cts}',
|
||||
|
||||
// Ignore generated javascript file(s)
|
||||
'!.github/actions/deploy-docs-site/main.js',
|
||||
],
|
||||
},
|
||||
'buildifier': true,
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Github configuration for the `ng-dev` command. This repository is used as
|
||||
* remote for the merge script and other utilities like `ng-dev pr rebase`.
|
||||
*
|
||||
* @type { import("@angular/ng-dev").GithubConfig }
|
||||
*/
|
||||
export const github = {
|
||||
owner: 'angular',
|
||||
name: 'angular',
|
||||
mainBranchName: 'main',
|
||||
mergeMode: 'caretaker-only',
|
||||
requireReleaseModeForRelease: true,
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
import {GithubConfig} from '@angular/ng-dev';
|
||||
|
||||
/**
|
||||
* Github configuration for the `ng-dev` command. This repository is used as
|
||||
* remote for the merge script and other utilities like `ng-dev pr rebase`.
|
||||
*/
|
||||
export const github: GithubConfig = {
|
||||
owner: 'angular',
|
||||
name: 'angular',
|
||||
mainBranchName: 'main',
|
||||
useNgDevAuthService: true,
|
||||
};
|
||||
@@ -32,7 +32,6 @@
|
||||
"**/rollup.config.js",
|
||||
"**/BUILD.bazel",
|
||||
"**/*.md",
|
||||
"**/package.json",
|
||||
"packages/**/integrationtest/**",
|
||||
"packages/**/test/**",
|
||||
"packages/zone.js/*",
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/**
|
||||
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
|
||||
* are respected by the merge script (e.g. the target labels).
|
||||
*
|
||||
* @type { import("@angular/ng-dev").PullRequestConfig }
|
||||
*/
|
||||
export const pullRequest = {
|
||||
githubApiMerge: {
|
||||
default: 'auto',
|
||||
labels: [{pattern: 'merge: squash commits', method: 'squash'}],
|
||||
},
|
||||
requiredBaseCommits: {
|
||||
// PRs that target either `main` or the patch branch, need to be rebased
|
||||
// on top of the latest commit message validation fix.
|
||||
// These SHAs are the commits that update the required license text in the header.
|
||||
'main': '5aeb9a4124922d8ac08eb73b8f322905a32b0b3a',
|
||||
'10.0.x': '27b95ba64a5d99757f4042073fd1860e20e3ed24',
|
||||
},
|
||||
// `docs-infra` are not affecting the public NPM packages.
|
||||
targetLabelExemptScopes: ['docs-infra'],
|
||||
// enables specific validations during the pull request merge process
|
||||
validators: {
|
||||
assertEnforceTested: true,
|
||||
assertIsolatedSeparateFiles: true,
|
||||
},
|
||||
|
||||
requiredStatuses: [
|
||||
{type: 'check', name: 'test'},
|
||||
{type: 'check', name: 'lint'},
|
||||
{type: 'check', name: 'adev'},
|
||||
{type: 'check', name: 'zone-js'},
|
||||
{type: 'status', name: 'google-internal-tests'},
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
import {PullRequestConfig} from '@angular/ng-dev';
|
||||
|
||||
/**
|
||||
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
|
||||
* are respected by the merge script (e.g. the target labels).
|
||||
*/
|
||||
export const pullRequest: PullRequestConfig = {
|
||||
githubApiMerge: false,
|
||||
requiredBaseCommits: {
|
||||
// PRs that target either `main` or the patch branch, need to be rebased
|
||||
// on top of the latest commit message validation fix.
|
||||
// These SHAs are the commits that update the required license text in the header.
|
||||
'main': '5aeb9a4124922d8ac08eb73b8f322905a32b0b3a',
|
||||
'10.0.x': '27b95ba64a5d99757f4042073fd1860e20e3ed24',
|
||||
},
|
||||
// `dev-infra` and `docs-infra` are not affecting the public NPM packages. Similarly,
|
||||
// the `bazel` package is not considered part of the public API so that features
|
||||
// can land in patch branches.
|
||||
targetLabelExemptScopes: ['dev-infra', 'docs-infra', 'bazel'],
|
||||
// enables specific validations during the pull request merge process
|
||||
validators: {
|
||||
assertEnforceTested: true,
|
||||
assertIsolatedSeparateFiles: true,
|
||||
},
|
||||
|
||||
requiredStatuses: [
|
||||
{type: 'check', name: 'test'},
|
||||
{type: 'check', name: 'lint'},
|
||||
{type: 'check', name: 'adev'},
|
||||
{type: 'check', name: 'zone-js'},
|
||||
{type: 'status', name: 'google-internal-tests'},
|
||||
],
|
||||
};
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* Configuration for the `ng-dev release` command.
|
||||
*
|
||||
* @type { import("@angular/ng-dev").ReleaseConfig }
|
||||
*/
|
||||
export const release = {
|
||||
publishRegistry: 'https://wombat-dressing-room.appspot.com',
|
||||
representativeNpmPackage: '@angular/core',
|
||||
npmPackages: [
|
||||
{name: '@angular/animations'},
|
||||
{name: '@angular/common'},
|
||||
{name: '@angular/compiler-cli'},
|
||||
{name: '@angular/compiler'},
|
||||
{name: '@angular/core'},
|
||||
{name: '@angular/elements'},
|
||||
{name: '@angular/forms'},
|
||||
{name: '@angular/language-server'},
|
||||
{name: '@angular/language-service'},
|
||||
{name: '@angular/localize'},
|
||||
{name: '@angular/platform-browser-dynamic'},
|
||||
{name: '@angular/platform-browser'},
|
||||
{name: '@angular/platform-server'},
|
||||
{name: '@angular/router'},
|
||||
{name: '@angular/service-worker'},
|
||||
{name: '@angular/upgrade'},
|
||||
],
|
||||
buildPackages: async () => {
|
||||
// The buildTargetPackages function is loaded at runtime as the loading the script
|
||||
// causes an invocation of Bazel.
|
||||
const {performNpmReleaseBuild} = await import('../scripts/build/package-builder.mts');
|
||||
return performNpmReleaseBuild();
|
||||
},
|
||||
releaseNotes: {
|
||||
hiddenScopes: [
|
||||
'dev-infra',
|
||||
'docs-infra',
|
||||
'zone.js',
|
||||
'devtools',
|
||||
'vscode-extension',
|
||||
'benchpress',
|
||||
],
|
||||
},
|
||||
releasePrLabels: ['area: build & ci', 'action: merge', 'PullApprove: disable'],
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
import {ReleaseConfig} from '@angular/ng-dev';
|
||||
|
||||
/** Configuration for the `ng-dev release` command. */
|
||||
export const release: ReleaseConfig = {
|
||||
publishRegistry: 'https://wombat-dressing-room.appspot.com',
|
||||
representativeNpmPackage: '@angular/core',
|
||||
npmPackages: [
|
||||
{name: '@angular/animations'},
|
||||
{name: '@angular/common'},
|
||||
{name: '@angular/compiler'},
|
||||
{name: '@angular/compiler-cli'},
|
||||
{name: '@angular/core'},
|
||||
{name: '@angular/elements'},
|
||||
{name: '@angular/forms'},
|
||||
{name: '@angular/language-service'},
|
||||
{name: '@angular/localize'},
|
||||
{name: '@angular/platform-browser'},
|
||||
{name: '@angular/platform-browser-dynamic'},
|
||||
{name: '@angular/platform-server'},
|
||||
{name: '@angular/router'},
|
||||
{name: '@angular/service-worker'},
|
||||
{name: '@angular/upgrade'},
|
||||
],
|
||||
buildPackages: async () => {
|
||||
// The buildTargetPackages function is loaded at runtime as the loading the script
|
||||
// causes an invocation of Bazel.
|
||||
const {performNpmReleaseBuild} = await import('../scripts/build/package-builder.mjs');
|
||||
return performNpmReleaseBuild();
|
||||
},
|
||||
releaseNotes: {
|
||||
hiddenScopes: ['bazel', 'dev-infra', 'docs-infra', 'zone.js', 'devtools'],
|
||||
},
|
||||
releasePrLabels: ['area: build & ci', 'action: merge', 'PullApprove: disable'],
|
||||
};
|
||||
@@ -5,6 +5,6 @@
|
||||
"module": "Node16",
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
"types": ["node"]
|
||||
"types": []
|
||||
}
|
||||
}
|
||||
|
||||
+8
-17
@@ -1,5 +1,5 @@
|
||||
// TODO: Define these packages in a single common location.
|
||||
const localAngularPackages = new Set([
|
||||
const localAngularPackages = [
|
||||
'@angular/animations',
|
||||
'@angular/common',
|
||||
'@angular/compiler',
|
||||
@@ -15,9 +15,7 @@ const localAngularPackages = new Set([
|
||||
'@angular/router',
|
||||
'@angular/service-worker',
|
||||
'@angular/upgrade',
|
||||
]);
|
||||
|
||||
const peerDepsToChange = new Set(['zone.js', 'rxjs']);
|
||||
];
|
||||
|
||||
function readPackage(pkg, context) {
|
||||
// TODO(devversion): This allows us to make compiler/TS a production dependency of compiler-cli
|
||||
@@ -27,38 +25,31 @@ function readPackage(pkg, context) {
|
||||
pkg.dependencies = {
|
||||
...pkg.dependencies,
|
||||
'@angular/compiler': 'workspace:*',
|
||||
'typescript': pkg.devDependencies['typescript'],
|
||||
'typescript': '5.9.0-beta',
|
||||
};
|
||||
|
||||
delete pkg.devDependencies['typescript'];
|
||||
}
|
||||
|
||||
for (const [key, version] of Object.entries(pkg.peerDependencies)) {
|
||||
Object.entries(pkg.peerDependencies).forEach(([key, version]) => {
|
||||
// Any package that has a peerDependency on rxjs or zone.js, should instead treat the peerDependency as a
|
||||
// regular dependency.
|
||||
if (peerDepsToChange.has(key)) {
|
||||
if (['rxjs', 'zone.js'].includes(key)) {
|
||||
pkg.dependencies = {
|
||||
...pkg.dependencies,
|
||||
[key]: pkg.devDependencies[key] ?? version,
|
||||
[key]: version,
|
||||
};
|
||||
|
||||
delete pkg.devDependencies[key];
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Change all locally generated packages to directly depend on the other local packages, instead
|
||||
// of expecting them as peerDependencies automatically as we do not auto install peer deps. The
|
||||
// package is also removed from peerDependencies as it was moved over and will just cause errors.
|
||||
if (pkg.version === '0.0.0-PLACEHOLDER' && localAngularPackages.has(key)) {
|
||||
if (localAngularPackages.includes(key)) {
|
||||
pkg.dependencies = {
|
||||
...pkg.dependencies,
|
||||
[key]: 'workspace: *',
|
||||
};
|
||||
|
||||
delete pkg.peerDependencies[key];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return pkg;
|
||||
}
|
||||
|
||||
+2
-38
@@ -1,39 +1,3 @@
|
||||
pnpm-lock.yaml
|
||||
.prettierrc
|
||||
|
||||
# Do not format d.ts files as they are generated
|
||||
**/*.d.ts
|
||||
|
||||
# Both third_party and .yarn are directories containing copied code which should
|
||||
# not be modified.
|
||||
third_party/**/*.js
|
||||
third_party/**/*.css
|
||||
third_party/**/*.md
|
||||
third_party/**/*.json
|
||||
|
||||
# Do not format the locale files which are checked-in for Google3, but generated using
|
||||
# the `generate-locales-tool` from `packages/common/locales`.
|
||||
packages/core/src/i18n/locale_en.ts
|
||||
packages/common/locales/closure-locale.ts
|
||||
packages/common/src/i18n/currencies.ts
|
||||
|
||||
# Test cases contain non valid code.
|
||||
packages/compiler-cli/test/compliance/test_cases/**/*.js
|
||||
packages/compiler-cli/test/compliance/test_cases/**/*.ts
|
||||
|
||||
# Ignore generated javascript file(s)
|
||||
.github/actions/deploy-docs-site/main.js
|
||||
|
||||
# Ignore testing data files for language service
|
||||
vscode-ng-language-service/syntaxes/test/data/*.ts
|
||||
vscode-ng-language-service/syntaxes/test/data/*.html
|
||||
|
||||
# Ignore goldens MD files
|
||||
goldens/**/*.api.md
|
||||
|
||||
# adev generated files
|
||||
adev/src/content/aria/**/*.json
|
||||
adev/src/content/cli/**/*.json
|
||||
adev/src/content/cdk/**/*.json
|
||||
|
||||
CHANGELOG.md
|
||||
CHANGELOG_ARCHIVE.md
|
||||
pnpm-lock.yaml
|
||||
+2
-16
@@ -2,24 +2,10 @@
|
||||
"printWidth": 100,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"embeddedLanguageFormatting": "off",
|
||||
"singleQuote": true,
|
||||
"semi": true,
|
||||
"quoteProps": "preserve",
|
||||
"bracketSpacing": false,
|
||||
"trailingComma": "all",
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["./.prettierrc"],
|
||||
"options": {
|
||||
"parser": "json"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"excludeFiles": ["**/test/**"],
|
||||
"options": {
|
||||
"parser": "angular"
|
||||
}
|
||||
}
|
||||
]
|
||||
"trailingComma": "all"
|
||||
}
|
||||
|
||||
+69
-12
@@ -15,6 +15,9 @@
|
||||
# - We trust that people do the right thing and won't approve changes they don't feel confident reviewing
|
||||
# - We enforce that only approved PRs are merged ensuring that unreviewed code isn't accidentally merged
|
||||
# - We distribute approval rights as much as possible to help us scale better
|
||||
# - Groups have one or two global approvers groups as fallbacks:
|
||||
# - @angular/fw-global-approvers: for approving minor changes, large-scale refactorings, and emergency situations.
|
||||
# - @angular/fw-global-approvers-for-docs-only-changes: for approving minor documentation-only changes that don't require engineering review
|
||||
# - A small number of file groups have very limited number of reviewers because incorrect changes to the files they guard would have serious consequences (e.g. security, public api)
|
||||
#
|
||||
# Configuration nuances:
|
||||
@@ -34,6 +37,23 @@
|
||||
# See reviewer list under `required-minimum-review` group. Team member names and
|
||||
# usernames are managed there.
|
||||
|
||||
####################################################################################
|
||||
# Approval Groups
|
||||
####################################################################################
|
||||
# =========================================================
|
||||
# @angular/framework-global-approvers
|
||||
# =========================================================
|
||||
# Used for approving minor changes, large-scale refactorings, and in emergency situations.
|
||||
#
|
||||
# alxhub
|
||||
# jelbourn
|
||||
# josephperrott
|
||||
#
|
||||
# =========================================================
|
||||
# @angular/framework-global-approvers-for-docs-only-changes
|
||||
# =========================================================
|
||||
# Used for approving minor documentation-only changes that don't require engineering review.
|
||||
|
||||
version: 3
|
||||
|
||||
#availability:
|
||||
@@ -77,6 +97,14 @@ overrides:
|
||||
- if: len(groups.active.exclude("required-minimum-review").exclude("global-*")) == 0 and len(groups.approved.include("global-*")) == 0
|
||||
status: failure
|
||||
explanation: 'At least one group must match this PR. Please update an existing review group, or create a new group.'
|
||||
# If any global dev-infra approval is given the status should be passing.
|
||||
- if: len(groups.approved.include("global-dev-infra-approvers")) == 1
|
||||
status: success
|
||||
explanation: 'Passing as globally approved by dev-infra'
|
||||
# If any global docs approval is given the status should be passing.
|
||||
- if: len(groups.approved.include("global-docs-approvers")) == 1
|
||||
status: success
|
||||
explanation: 'Passing as globally approved by docs'
|
||||
# If any global approval is given the status should be passing.
|
||||
- if: len(groups.approved.include("global-approvers")) == 1
|
||||
status: success
|
||||
@@ -110,7 +138,6 @@ groups:
|
||||
- ~amishne
|
||||
- ~leonsenft
|
||||
- ~mattrbeck
|
||||
- ~JeanMeche
|
||||
|
||||
# =========================================================
|
||||
# Framework: General (most code in our packages)
|
||||
@@ -121,7 +148,6 @@ groups:
|
||||
- >
|
||||
contains_any_globs(files.exclude('packages/core/primitives/*'), [
|
||||
'contributing-docs/public-api-surface.md',
|
||||
'dev-app/**/{*,.*}',
|
||||
'integration/**/{*,.*}',
|
||||
'modules/**/{*,.*}',
|
||||
'packages/animations/**/{*,.*}',
|
||||
@@ -141,7 +167,6 @@ groups:
|
||||
'packages/router/**/{*,.*}',
|
||||
'packages/service-worker/**/{*,.*}',
|
||||
'packages/upgrade/**/{*,.*}',
|
||||
'vscode-ng-language-service/**/{*,.*}',
|
||||
])
|
||||
reviewers:
|
||||
users:
|
||||
@@ -264,15 +289,13 @@ groups:
|
||||
- devversion
|
||||
- josephperrott
|
||||
- ~pkozlowski-opensource
|
||||
- ~mgechev
|
||||
- mgechev
|
||||
- MarkTechson
|
||||
- mmalerba
|
||||
- ~hawkgs
|
||||
- ~amishne
|
||||
- ~leonsenft
|
||||
- ~mattrbeck
|
||||
- ~clydin
|
||||
- ~dgp1130
|
||||
|
||||
# =========================================================
|
||||
# Angular DevTools
|
||||
@@ -290,7 +313,7 @@ groups:
|
||||
- ~devversion
|
||||
- dgp1130
|
||||
- hawkgs
|
||||
- hybrist
|
||||
- jkrems
|
||||
- ~josephperrott
|
||||
- JeanMeche
|
||||
- milomg
|
||||
@@ -382,7 +405,7 @@ groups:
|
||||
- crisbeto
|
||||
- devversion
|
||||
- JeanMeche
|
||||
- ~hybrist
|
||||
- ~jkrems
|
||||
- ~iteriani
|
||||
- ~tbondwilkinson
|
||||
- ~rahatarmanahmed
|
||||
@@ -512,10 +535,44 @@ groups:
|
||||
global-approvers:
|
||||
type: optional
|
||||
reviewers:
|
||||
users:
|
||||
- alxhub
|
||||
- jelbourn
|
||||
- josephperrott
|
||||
teams:
|
||||
- framework-global-approvers
|
||||
reviews:
|
||||
request: 0
|
||||
required: 1
|
||||
reviewed_for: required
|
||||
|
||||
# =========================================================
|
||||
# Global Approvers For Docs
|
||||
#
|
||||
# All reviews performed for global docs approvals require
|
||||
# using the `Reviewed-for:` specifier to set the approval
|
||||
# specificity as documented at:
|
||||
# https://docs.pullapprove.com/reviewed-for/
|
||||
# =========================================================
|
||||
global-docs-approvers:
|
||||
type: optional
|
||||
reviewers:
|
||||
teams:
|
||||
- framework-global-approvers-for-docs-only-changes
|
||||
reviews:
|
||||
request: 0
|
||||
required: 1
|
||||
reviewed_for: required
|
||||
|
||||
# =========================================================
|
||||
# Global Approvers For Dev-Infra changes
|
||||
#
|
||||
# All reviews performed for global dev-infra approvals
|
||||
# require using the `Reviewed-for:` specifier to set the
|
||||
# approval specificity as documented at:
|
||||
# https://docs.pullapprove.com/reviewed-for/
|
||||
# =========================================================
|
||||
global-dev-infra-approvers:
|
||||
type: optional
|
||||
reviewers:
|
||||
teams:
|
||||
- dev-infra-framework
|
||||
reviews:
|
||||
request: 0
|
||||
required: 1
|
||||
|
||||
Vendored
+2
@@ -8,6 +8,8 @@ To use the recommended configurations follow the steps below:
|
||||
|
||||
- install the recommended extensions in `.vscode/extensions.json`
|
||||
- copy (or link) `.vscode/recommended-settings.json` to `.vscode/settings.json`
|
||||
- copy (or link) `.vscode/recommended-launch.json` to `.vscode/launch.json`
|
||||
- copy (or link) `.vscode/recommended-tasks.json` to `.vscode/tasks.json`
|
||||
- restart the editor
|
||||
|
||||
If you already have your custom workspace settings, you should instead manually merge the file contents.
|
||||
|
||||
Vendored
-84
@@ -1,84 +0,0 @@
|
||||
// A launch configuration that compiles the extension and then opens it inside a new window
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"name": "VSCE: Launch Dev Client",
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": [
|
||||
"--disable-extensions",
|
||||
"--extensionDevelopmentPath=${workspaceFolder}/vscode-ng-language-service"
|
||||
],
|
||||
"preLaunchTask": "VSCE: watch bundles"
|
||||
},
|
||||
{
|
||||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"name": "VSCE: Launch Prod Client",
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": [
|
||||
"--disable-extensions",
|
||||
"--extensionDevelopmentPath=${workspaceFolder}/dist/bin/vscode-ng-language-service/development_package"
|
||||
],
|
||||
"preLaunchTask": "VSCE: package"
|
||||
},
|
||||
{
|
||||
"name": "VSCE: Attach to Server",
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"port": 6009,
|
||||
"restart": true,
|
||||
"sourceMaps": true,
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"sourceMapPathOverrides": {
|
||||
"?:*/bin/*": "${workspaceFolder}/*"
|
||||
},
|
||||
"resolveSourceMapLocations": ["!**/node_modules/**"]
|
||||
},
|
||||
{
|
||||
"name": "DEBUG: Attach to bazel test",
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"port": 9229,
|
||||
"restart": true,
|
||||
"timeout": 600000,
|
||||
"sourceMaps": true,
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"sourceMapPathOverrides": {
|
||||
"?:*/bin/*": "${workspaceFolder}/*"
|
||||
},
|
||||
"resolveSourceMapLocations": ["!**/node_modules/**"]
|
||||
},
|
||||
{
|
||||
"name": "DEBUG: Run bazel test (Custom Target)",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"restart": true,
|
||||
"timeout": 600000,
|
||||
"runtimeExecutable": "pnpm",
|
||||
"runtimeArgs": ["bazel", "test", "${input:bazelTarget}", "--config=debug"],
|
||||
"console": "integratedTerminal",
|
||||
"cwd": "${workspaceFolder}"
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "VSCE: Dev Client + Attach to Server",
|
||||
"configurations": ["VSCE: Launch Dev Client", "VSCE: Attach to Server"]
|
||||
},
|
||||
{
|
||||
"name": "DEBUG: Run bazel test (Custom Target) + Attach",
|
||||
"configurations": ["DEBUG: Attach to bazel test", "DEBUG: Run bazel test (Custom Target)"]
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "bazelTarget",
|
||||
"type": "promptString",
|
||||
"description": "Enter the Bazel test target (e.g., //path/to/my:unit_test)",
|
||||
"default": "//packages/..."
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+75
@@ -0,0 +1,75 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Attach to bazel test ... --config=debug",
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"port": 9229,
|
||||
"address": "localhost",
|
||||
"restart": false,
|
||||
"sourceMaps": true,
|
||||
"localRoot": "${workspaceRoot}",
|
||||
"remoteRoot": "${workspaceRoot}",
|
||||
"stopOnEntry": false,
|
||||
"timeout": 600000,
|
||||
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
|
||||
},
|
||||
{
|
||||
"name": "Attach to bazel test ... --config=debug (no source maps)",
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"port": 9229,
|
||||
"address": "localhost",
|
||||
"restart": false,
|
||||
"sourceMaps": false,
|
||||
"localRoot": "${workspaceRoot}",
|
||||
"remoteRoot": "${workspaceRoot}",
|
||||
"stopOnEntry": false,
|
||||
"timeout": 600000,
|
||||
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
|
||||
},
|
||||
{
|
||||
"name": "IVY:packages/core/test/acceptance",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": ["test", "packages/core/test/acceptance", "--config=debug"],
|
||||
"port": 9229,
|
||||
"address": "localhost",
|
||||
"restart": true,
|
||||
"sourceMaps": true,
|
||||
"timeout": 600000,
|
||||
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
|
||||
},
|
||||
{
|
||||
"name": "IVY:packages/core/test/render3",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": ["test", "packages/core/test/render3", "--config=debug"],
|
||||
"port": 9229,
|
||||
"address": "localhost",
|
||||
"restart": true,
|
||||
"sourceMaps": true,
|
||||
"timeout": 600000,
|
||||
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
|
||||
},
|
||||
{
|
||||
"name": "IVY:packages/core/test",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": ["test", "packages/core/test", "--config=debug"],
|
||||
"port": 9229,
|
||||
"address": "localhost",
|
||||
"restart": true,
|
||||
"sourceMaps": true,
|
||||
"timeout": 600000,
|
||||
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+3
-1
@@ -21,5 +21,7 @@
|
||||
".history": true
|
||||
},
|
||||
"git.ignoreLimitWarning": true,
|
||||
"gitlens.advanced.blame.customArguments": ["--ignore-revs-file .git-blame-ignore-revs"]
|
||||
"gitlens.advanced.blame.customArguments": [
|
||||
"--ignore-revs-file .git-blame-ignore-revs"
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+109
@@ -0,0 +1,109 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "IVY:packages/core/test/...",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": [
|
||||
"test",
|
||||
"packages/core/test",
|
||||
"packages/core/test/acceptance",
|
||||
"packages/core/test/render3",
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated",
|
||||
},
|
||||
},
|
||||
{
|
||||
"label": "VE:packages/core/test/...",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": [
|
||||
"test",
|
||||
"packages/core/test",
|
||||
"packages/core/test/acceptance",
|
||||
"packages/core/test/render3",
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated",
|
||||
},
|
||||
},
|
||||
{
|
||||
"label": "IVY:packages/core/test/acceptance",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": [
|
||||
"test",
|
||||
"packages/core/test/acceptance",
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated",
|
||||
},
|
||||
},
|
||||
{
|
||||
"label": "VE:packages/core/test/acceptance",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": [
|
||||
"test",
|
||||
"packages/core/test/acceptance",
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated",
|
||||
},
|
||||
},
|
||||
{
|
||||
"label": "IVY:packages/core/test",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": [
|
||||
"test",
|
||||
"packages/core/test",
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated",
|
||||
},
|
||||
},
|
||||
{
|
||||
"label": "VE:packages/core/test",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": [
|
||||
"test",
|
||||
"packages/core/test",
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated",
|
||||
},
|
||||
},
|
||||
{
|
||||
"label": "IVY:packages/core/test/render3",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": [
|
||||
"test",
|
||||
"packages/core/test/render3",
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated",
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
Vendored
-32
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "VSCE: watch bundles",
|
||||
"command": "pnpm --filter=ng-template run watch",
|
||||
"isBackground": true,
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"panel": "dedicated",
|
||||
"reveal": "never"
|
||||
},
|
||||
"problemMatcher": {
|
||||
"base": "$tsc-watch",
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "^iBazel \\[\\d{1,2}:\\d{1,2}(?:AM|PM)\\]: Querying for files to watch.*",
|
||||
"endsPattern": "^INFO: Build completed successfully, \\d+ total action(s)?"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "VSCE: package",
|
||||
"command": "pnpm --filter=ng-template run package"
|
||||
}
|
||||
]
|
||||
}
|
||||
-16
@@ -1,5 +1,4 @@
|
||||
load("@aspect_rules_js//js:defs.bzl", "js_library")
|
||||
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
|
||||
load("@devinfra//bazel/validation:defs.bzl", "validate_ts_version_matching")
|
||||
load("@npm//:defs.bzl", "npm_link_all_packages")
|
||||
load("//tools:defaults.bzl", "copy_to_bin")
|
||||
@@ -72,18 +71,3 @@ alias(
|
||||
"@devinfra//bazel/constraints:macos_arm64": "@sauce_connect_mac//:bin/sc",
|
||||
}),
|
||||
)
|
||||
|
||||
# When enabled, this flag substitutes dependency versions with snapshot repositories
|
||||
# for all packages in this repository. Note that this does not apply to peer
|
||||
# dependencies, as they must be installed directly.
|
||||
bool_flag(
|
||||
name = "enable_language_server_snapshot_repo_deps",
|
||||
build_setting_default = False,
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "language_server_package_json_use_snapshot_repo_deps",
|
||||
flag_values = {
|
||||
":enable_language_server_snapshot_repo_deps": "true",
|
||||
},
|
||||
)
|
||||
|
||||
+3041
-5729
File diff suppressed because it is too large
Load Diff
+5035
-5519
File diff suppressed because it is too large
Load Diff
+13
-13
@@ -14,20 +14,20 @@ appearance, race, religion, or sexual identity and orientation.
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
- Use welcoming and inclusive language
|
||||
- Respect each other
|
||||
- Provide and gracefully accept constructive criticism
|
||||
- Show empathy towards other community members
|
||||
* Use welcoming and inclusive language
|
||||
* Respect each other
|
||||
* Provide and gracefully accept constructive criticism
|
||||
* Show empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
- The use of sexualized language or imagery
|
||||
- Unwelcome sexual attention or advances
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
* The use of sexualized language or imagery
|
||||
* Unwelcome sexual attention or advances
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
@@ -69,9 +69,9 @@ members of the project's leadership.
|
||||
|
||||
If you are banned you may contest the decision. To do so email conduct@angular.io with the subject line "Repeal Ban for {{your name here}}" and body with the responses to the following:
|
||||
|
||||
- Why do you believe you did not violate the Code of Conduct?
|
||||
- Were other factors involved in this situation the leadership team may have been unaware of?
|
||||
- Why do you wish to be a part of the Angular community?
|
||||
* Why do you believe you did not violate the Code of Conduct?
|
||||
* Were other factors involved in this situation the leadership team may have been unaware of?
|
||||
* Why do you wish to be a part of the Angular community?
|
||||
|
||||
## Attribution
|
||||
|
||||
|
||||
+90
-97
@@ -3,20 +3,22 @@
|
||||
We would love for you to contribute to Angular and help make it even better than it is today!
|
||||
As a contributor, here are the guidelines we would like you to follow:
|
||||
|
||||
- [Code of Conduct](#coc)
|
||||
- [Question or Problem?](#question)
|
||||
- [Issues and Bugs](#issue)
|
||||
- [Feature Requests](#feature)
|
||||
- [Submission Guidelines](#submit)
|
||||
- [Coding Rules](#rules)
|
||||
- [Commit Message Guidelines](#commit)
|
||||
- [Signing the CLA](#cla)
|
||||
- [Code of Conduct](#coc)
|
||||
- [Question or Problem?](#question)
|
||||
- [Issues and Bugs](#issue)
|
||||
- [Feature Requests](#feature)
|
||||
- [Submission Guidelines](#submit)
|
||||
- [Coding Rules](#rules)
|
||||
- [Commit Message Guidelines](#commit)
|
||||
- [Signing the CLA](#cla)
|
||||
|
||||
|
||||
## <a name="coc"></a> Code of Conduct
|
||||
|
||||
Help us keep Angular open and inclusive.
|
||||
Please read and follow our [Code of Conduct][coc].
|
||||
|
||||
|
||||
## <a name="question"></a> Got a Question or Problem?
|
||||
|
||||
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests.
|
||||
@@ -32,25 +34,28 @@ To save your and our time, we will systematically close all issues that are requ
|
||||
|
||||
If you would like to chat about the question in real-time, you can reach out via [the Angular community Discord server][discord].
|
||||
|
||||
|
||||
## <a name="issue"></a> Found a Bug?
|
||||
|
||||
If you find a bug in the source code, you can help us by [submitting an issue](#submit-issue) to our [GitHub Repository][github].
|
||||
Even better, you can [submit a Pull Request](#submit-pr) with a fix.
|
||||
|
||||
|
||||
## <a name="feature"></a> Missing a Feature?
|
||||
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub Repository.
|
||||
If you would like to *implement* a new feature, please consider the size of the change in order to determine the right steps to proceed:
|
||||
|
||||
You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub Repository.
|
||||
If you would like to _implement_ a new feature, please consider the size of the change in order to determine the right steps to proceed:
|
||||
|
||||
- For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed.
|
||||
* For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed.
|
||||
This process allows us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
|
||||
|
||||
**Note**: Adding a new topic to the documentation, or significantly re-writing a topic, counts as a major feature.
|
||||
|
||||
- **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
|
||||
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
|
||||
|
||||
|
||||
## <a name="submit"></a> Submission Guidelines
|
||||
|
||||
|
||||
### <a name="submit-issue"></a> Submitting an Issue
|
||||
|
||||
Before you submit an issue, please search the issue tracker. An issue for your problem might already exist and the discussion might inform you of workarounds readily available.
|
||||
@@ -69,67 +74,50 @@ Unfortunately, we are not able to investigate / fix bugs without a minimal repro
|
||||
|
||||
You can file new issues by selecting from our [new issue templates](https://github.com/angular/angular/issues/new/choose) and filling out the issue template.
|
||||
|
||||
### <a name="pr-quality"></a> Contribution Quality
|
||||
|
||||
We strongly value open source contribution and pull requests from community contributors. Please note that every pull request is reviewed and merged by an actual person on the team, which does take time and effort. That is time and effort that does take away from other valuable work. With that in mind we have an minimum set of expectations that are required of any community contribution pull request that is opened.
|
||||
|
||||
1. Search [GitHub](https://github.com/angular/angular/pulls) for an open or closed PR that relates to your submission.
|
||||
- You don't want to duplicate existing efforts.
|
||||
2. Be sure that an issue or pull request clearly describes the problem you're fixing, or documents the design for the feature you'd like to add. Issues require a _minimal_ reproduction.
|
||||
|
||||
3. Discussing the design in an issue upfront helps to ensure that we're ready to accept your work. Pull requests are not the right place to do design work.
|
||||
- When in doubt, open an issue first before doing any sort of speculative implementation work
|
||||
|
||||
4. Ideally the PR should be tied to an issue, but this is not required
|
||||
|
||||
5. The change should improve code quality (i.e. addressing a TODO) or should impact / improve a feature
|
||||
|
||||
6. Micro optimizations will only be accepted if they are validated by an actual benchmark
|
||||
|
||||
7. Do not open pull requests that are addressing feature requests that are not labeled as "help wanted" as they usually need additional design work before we could accept pull requests
|
||||
|
||||
8. The change should be well tested
|
||||
|
||||
If your pull request does not meet these minimum expectations, we may close your PR. Also, if your PR introduces a breaking change, it's possible the level of churn this breaking change causes may block our ability to move forward with it. We may close your PR in that situation, as well. Otherwise, we're excited to see your contributions and enthusiasm for Angular!
|
||||
|
||||
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
|
||||
|
||||
Before you submit your Pull Request (PR) consider the following guidelines:
|
||||
|
||||
1. Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs.
|
||||
1. Search [GitHub](https://github.com/angular/angular/pulls) for an open or closed PR that relates to your submission.
|
||||
You don't want to duplicate existing efforts.
|
||||
|
||||
2. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add.
|
||||
Discussing the design upfront helps to ensure that we're ready to accept your work.
|
||||
|
||||
3. Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs.
|
||||
We cannot accept code without a signed CLA.
|
||||
Make sure you author all contributed Git commits with email address associated with your CLA signature.
|
||||
|
||||
2. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [angular/angular](https://github.com/angular/angular/fork) repo.
|
||||
4. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [angular/angular](https://github.com/angular/angular/fork) repo.
|
||||
|
||||
3. In your forked repository, make your changes in a new git branch:
|
||||
5. In your forked repository, make your changes in a new git branch:
|
||||
|
||||
```shell
|
||||
git checkout -b my-fix-branch main
|
||||
```
|
||||
```shell
|
||||
git checkout -b my-fix-branch main
|
||||
```
|
||||
|
||||
4. Create your patch, **including appropriate test cases**.
|
||||
6. Create your patch, **including appropriate test cases**.
|
||||
|
||||
5. Follow our [Coding Rules](#rules).
|
||||
7. Follow our [Coding Rules](#rules).
|
||||
|
||||
6. Run the full Angular test suite, as described in the [developer documentation][dev-doc], and ensure that all tests pass.
|
||||
8. Run the full Angular test suite, as described in the [developer documentation][dev-doc], and ensure that all tests pass.
|
||||
|
||||
7. Commit your changes using a descriptive commit message that follows our [commit message conventions][commit-message-guidelines].
|
||||
9. Commit your changes using a descriptive commit message that follows our [commit message conventions][commit-message-guidelines].
|
||||
Adherence to these conventions is necessary because release notes are automatically generated from these messages.
|
||||
|
||||
```shell
|
||||
git commit --all
|
||||
```
|
||||
```shell
|
||||
git commit --all
|
||||
```
|
||||
Note: the optional commit `--all` command line option will automatically "add" and "rm" edited files.
|
||||
|
||||
Note: the optional commit `--all` command line option will automatically "add" and "rm" edited files.
|
||||
10. Push your branch to GitHub:
|
||||
|
||||
8. Push your branch to GitHub:
|
||||
```shell
|
||||
git push origin my-fix-branch
|
||||
```
|
||||
|
||||
```shell
|
||||
git push origin my-fix-branch
|
||||
```
|
||||
|
||||
9. In GitHub, send a pull request to `angular:main`.
|
||||
11. In GitHub, send a pull request to `angular:main`.
|
||||
|
||||
### Reviewing a Pull Request
|
||||
|
||||
@@ -145,15 +133,16 @@ If we ask for changes via code reviews then:
|
||||
|
||||
3. Create a fixup commit and push to your GitHub repository (this will update your Pull Request):
|
||||
|
||||
```shell
|
||||
git commit --all --fixup HEAD
|
||||
git push
|
||||
```
|
||||
```shell
|
||||
git commit --all --fixup HEAD
|
||||
git push
|
||||
```
|
||||
|
||||
For more info on working with fixup commits see [here](./contributing-docs/using-fixup-commits.md).
|
||||
For more info on working with fixup commits see [here](./contributing-docs/using-fixup-commits.md).
|
||||
|
||||
That's it! Thank you for your contribution!
|
||||
|
||||
|
||||
##### Updating the commit message
|
||||
|
||||
A reviewer might often suggest changes to a commit message (for example, to add more context for a change or adhere to our [commit message guidelines][commit-message-guidelines]).
|
||||
@@ -161,68 +150,69 @@ In order to update the commit message of the last commit on your branch:
|
||||
|
||||
1. Check out your branch:
|
||||
|
||||
```shell
|
||||
git checkout my-fix-branch
|
||||
```
|
||||
```shell
|
||||
git checkout my-fix-branch
|
||||
```
|
||||
|
||||
2. Amend the last commit and modify the commit message:
|
||||
|
||||
```shell
|
||||
git commit --amend
|
||||
```
|
||||
```shell
|
||||
git commit --amend
|
||||
```
|
||||
|
||||
3. Push to your GitHub repository:
|
||||
|
||||
```shell
|
||||
git push --force-with-lease
|
||||
```
|
||||
```shell
|
||||
git push --force-with-lease
|
||||
```
|
||||
|
||||
> NOTE:<br />
|
||||
> If you need to update the commit message of an earlier commit, you can use `git rebase` in interactive mode.
|
||||
> See the [git docs](https://git-scm.com/docs/git-rebase#_interactive_mode) for more details.
|
||||
|
||||
|
||||
#### After your pull request is merged
|
||||
|
||||
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
|
||||
|
||||
- Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
|
||||
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
|
||||
|
||||
```shell
|
||||
git push origin --delete my-fix-branch
|
||||
```
|
||||
```shell
|
||||
git push origin --delete my-fix-branch
|
||||
```
|
||||
|
||||
- Check out the main branch:
|
||||
* Check out the main branch:
|
||||
|
||||
```shell
|
||||
git checkout main -f
|
||||
```
|
||||
```shell
|
||||
git checkout main -f
|
||||
```
|
||||
|
||||
- Delete the local branch:
|
||||
* Delete the local branch:
|
||||
|
||||
```shell
|
||||
git branch -D my-fix-branch
|
||||
```
|
||||
```shell
|
||||
git branch -D my-fix-branch
|
||||
```
|
||||
|
||||
- Update your local `main` with the latest upstream version:
|
||||
* Update your local `main` with the latest upstream version:
|
||||
|
||||
```shell
|
||||
git pull --ff upstream main
|
||||
```
|
||||
|
||||
```shell
|
||||
git pull --ff upstream main
|
||||
```
|
||||
|
||||
## <a name="rules"></a> Coding Rules
|
||||
|
||||
To ensure consistency throughout the source code, keep these rules in mind as you are working:
|
||||
|
||||
- All features or bug fixes **must be tested** by one or more specs (unit-tests).
|
||||
- All public API methods **must be documented**.
|
||||
- We follow [Google's TypeScript Style Guide][ts-style-guide], but wrap all code at **100 characters**.
|
||||
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
|
||||
* All public API methods **must be documented**.
|
||||
* We follow [Google's TypeScript Style Guide][ts-style-guide], but wrap all code at **100 characters**.
|
||||
|
||||
An automated formatter is available, see [building-and-testing-angular.md](./contributing-docs/building-and-testing-angular.md#formatting-your-source-code).
|
||||
|
||||
An automated formatter is available, see [building-and-testing-angular.md](./contributing-docs/building-and-testing-angular.md#formatting-your-source-code).
|
||||
|
||||
## <a name="commit"></a> Commit Message Guidelines
|
||||
|
||||
We have very precise rules over how our Git commit messages must be formatted:
|
||||
|
||||
```
|
||||
<type>(<scope>): <short summary>
|
||||
```
|
||||
@@ -234,18 +224,21 @@ See [Commit Message Guidelines][commit-message-guidelines] for details.
|
||||
Please sign our Contributor License Agreement (CLA) before sending pull requests. For any code
|
||||
changes to be accepted, the CLA must be signed. It's a quick process, we promise!
|
||||
|
||||
- For individuals, we have a [simple click-through form][individual-cla].
|
||||
- For corporations, we'll need you to
|
||||
* For individuals, we have a [simple click-through form][individual-cla].
|
||||
* For corporations, we'll need you to
|
||||
[print, sign and one of scan+email, fax or mail the form][corporate-cla].
|
||||
|
||||
If you have more than one GitHub accounts, or multiple email addresses associated with a single GitHub account, you must sign the CLA using the primary email address of the GitHub account used to author Git commits and send pull requests.
|
||||
|
||||
The following documents can help you sort out issues with GitHub accounts and multiple email addresses:
|
||||
|
||||
- https://help.github.com/articles/setting-your-commit-email-address-in-git/
|
||||
- https://stackoverflow.com/questions/37245303/what-does-usera-committed-with-userb-13-days-ago-on-github-mean
|
||||
- https://help.github.com/articles/about-commit-email-addresses/
|
||||
- https://help.github.com/articles/blocking-command-line-pushes-that-expose-your-personal-email-address/
|
||||
* https://help.github.com/articles/setting-your-commit-email-address-in-git/
|
||||
* https://stackoverflow.com/questions/37245303/what-does-usera-committed-with-userb-13-days-ago-on-github-mean
|
||||
* https://help.github.com/articles/about-commit-email-addresses/
|
||||
* https://help.github.com/articles/blocking-command-line-pushes-that-expose-your-personal-email-address/
|
||||
|
||||
|
||||
|
||||
|
||||
[coc]: https://github.com/angular/code-of-conduct/blob/main/CODE_OF_CONDUCT.md
|
||||
[corporate-cla]: https://cla.developers.google.com/about/google-corporate
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2026 Google LLC. https://angular.dev/license
|
||||
Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+23
-35
@@ -4,42 +4,42 @@ module(
|
||||
name = "angular",
|
||||
)
|
||||
|
||||
bazel_dep(name = "rules_pkg", version = "1.2.0")
|
||||
bazel_dep(name = "rules_nodejs", version = "6.7.3")
|
||||
bazel_dep(name = "aspect_rules_ts", version = "3.8.3")
|
||||
bazel_dep(name = "aspect_rules_js", version = "2.9.2")
|
||||
bazel_dep(name = "aspect_rules_esbuild", version = "0.25.0")
|
||||
bazel_dep(name = "aspect_rules_jasmine", version = "2.0.2")
|
||||
bazel_dep(name = "rules_pkg", version = "1.1.0")
|
||||
bazel_dep(name = "rules_nodejs", version = "6.5.0")
|
||||
bazel_dep(name = "aspect_rules_ts", version = "3.7.0")
|
||||
bazel_dep(name = "aspect_rules_js", version = "2.6.0")
|
||||
bazel_dep(name = "aspect_rules_esbuild", version = "0.22.1")
|
||||
bazel_dep(name = "aspect_rules_jasmine", version = "2.0.0")
|
||||
bazel_dep(name = "aspect_rules_rollup", version = "2.0.1")
|
||||
bazel_dep(name = "bazel_skylib", version = "1.9.0")
|
||||
bazel_dep(name = "aspect_bazel_lib", version = "2.22.5")
|
||||
bazel_dep(name = "tar.bzl", version = "0.7.0")
|
||||
bazel_dep(name = "yq.bzl", version = "0.3.4")
|
||||
bazel_dep(name = "bazel_skylib", version = "1.8.1")
|
||||
bazel_dep(name = "aspect_bazel_lib", version = "2.21.2")
|
||||
bazel_dep(name = "tar.bzl", version = "0.5.5")
|
||||
bazel_dep(name = "yq.bzl", version = "0.2.0")
|
||||
bazel_dep(name = "rules_angular")
|
||||
git_override(
|
||||
module_name = "rules_angular",
|
||||
commit = "e975faa54a52caa45ff932ec806292ce0988d8d4",
|
||||
commit = "4010ef96de0c46db7764adc2f262258c9de3d718",
|
||||
remote = "https://github.com/devversion/rules_angular.git",
|
||||
)
|
||||
|
||||
bazel_dep(name = "devinfra")
|
||||
git_override(
|
||||
module_name = "devinfra",
|
||||
commit = "1d545550f0a93b2ffee3672587314d6f6b3dc7fd",
|
||||
commit = "ad9c933cb115f77a73c0d78a82328448a66ad89c",
|
||||
remote = "https://github.com/angular/dev-infra.git",
|
||||
)
|
||||
|
||||
bazel_dep(name = "rules_sass")
|
||||
git_override(
|
||||
module_name = "rules_sass",
|
||||
commit = "1184a80751a21af8348f308abc5b38a41f26850e",
|
||||
commit = "4a54e0e4e75fc6456ff874e53fb4a78bdfeb44b9",
|
||||
remote = "https://github.com/devversion/rules_sass.git",
|
||||
)
|
||||
|
||||
bazel_dep(name = "rules_browsers")
|
||||
git_override(
|
||||
module_name = "rules_browsers",
|
||||
commit = "5f0e50d17d15c70e6ab5546f1659338ae94c4072",
|
||||
commit = "6749ba4c0dc5e04536369fa91fdb2d827b6705ff",
|
||||
remote = "https://github.com/devversion/rules_browsers.git",
|
||||
)
|
||||
|
||||
@@ -47,18 +47,7 @@ yq = use_extension("@yq.bzl//yq:extensions.bzl", "yq")
|
||||
use_repo(yq, "yq_toolchains")
|
||||
|
||||
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
|
||||
node.toolchain(
|
||||
node_repositories = {
|
||||
"22.22.0-darwin_arm64": ("node-v22.22.0-darwin-arm64.tar.gz", "node-v22.22.0-darwin-arm64", "5ed4db0fcf1eaf84d91ad12462631d73bf4576c1377e192d222e48026a902640"),
|
||||
"22.22.0-darwin_amd64": ("node-v22.22.0-darwin-x64.tar.gz", "node-v22.22.0-darwin-x64", "5ea50c9d6dea3dfa3abb66b2656f7a4e1c8cef23432b558d45fb538c7b5dedce"),
|
||||
"22.22.0-linux_arm64": ("node-v22.22.0-linux-arm64.tar.xz", "node-v22.22.0-linux-arm64", "1bf1eb9ee63ffc4e5d324c0b9b62cf4a289f44332dfef9607cea1a0d9596ba6f"),
|
||||
"22.22.0-linux_ppc64le": ("node-v22.22.0-linux-ppc64le.tar.xz", "node-v22.22.0-linux-ppc64le", "d83b9957431cc18e1fc143a4b99f89cde7b8a18f53ef392231b4336afd058865"),
|
||||
"22.22.0-linux_s390x": ("node-v22.22.0-linux-s390x.tar.xz", "node-v22.22.0-linux-s390x", "5aa0e520689448c4233e8d73f284e8e0634fdcd32b479735698494be5641f3e4"),
|
||||
"22.22.0-linux_amd64": ("node-v22.22.0-linux-x64.tar.xz", "node-v22.22.0-linux-x64", "9aa8e9d2298ab68c600bd6fb86a6c13bce11a4eca1ba9b39d79fa021755d7c37"),
|
||||
"22.22.0-windows_amd64": ("node-v22.22.0-win-x64.zip", "node-v22.22.0-win-x64", "c97fa376d2becdc8863fcd3ca2dd9a83a9f3468ee7ccf7a6d076ec66a645c77a"),
|
||||
},
|
||||
node_version = "22.22.0",
|
||||
)
|
||||
node.toolchain(node_version = "20.19.0")
|
||||
use_repo(node, "nodejs_toolchains")
|
||||
use_repo(node, "nodejs_darwin_amd64")
|
||||
use_repo(node, "nodejs_darwin_arm64")
|
||||
@@ -71,8 +60,7 @@ use_repo(node, "nodejs_windows_amd64")
|
||||
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
|
||||
pnpm.pnpm(
|
||||
name = "pnpm",
|
||||
pnpm_version = "10.28.2",
|
||||
pnpm_version_integrity = "sha512-QYcvA3rSL3NI47Heu69+hnz9RI8nJtnPdMCPGVB8MdLI56EVJbmD/rwt9kC1Q43uYCPrsfhO1DzC1lTSvDJiZA==",
|
||||
pnpm_version = "10.16.1",
|
||||
)
|
||||
use_repo(pnpm, "pnpm")
|
||||
|
||||
@@ -108,19 +96,19 @@ npm.npm_translate_lock(
|
||||
"//packages/service-worker:package.json",
|
||||
"//packages/upgrade:package.json",
|
||||
"//tools/bazel/rules_angular_store:package.json",
|
||||
"//vscode-ng-language-service/integration/project:package.json",
|
||||
],
|
||||
npmrc = "//:.npmrc",
|
||||
pnpm_lock = "//:pnpm-lock.yaml",
|
||||
verify_node_modules_ignored = "//:.bazelignore",
|
||||
)
|
||||
use_repo(npm, "npm")
|
||||
|
||||
rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext")
|
||||
rules_ts_ext.deps(
|
||||
name = "angular_npm_typescript",
|
||||
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.3 | jq -r '.dist.integrity'
|
||||
ts_integrity = "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
ts_version = "5.9.3",
|
||||
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.2 | jq -r '.dist.integrity'
|
||||
ts_integrity = "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
|
||||
ts_version = "5.9.2",
|
||||
)
|
||||
use_repo(rules_ts_ext, **{"npm_typescript": "angular_npm_typescript"})
|
||||
|
||||
@@ -142,14 +130,14 @@ register_toolchains(
|
||||
"@devinfra//bazel/git-toolchain:git_windows_toolchain",
|
||||
)
|
||||
|
||||
CLDR_VERSION = "47"
|
||||
CLDR_VERSION = "41"
|
||||
|
||||
cldr_json_data = use_repo_rule("//packages/common/locales/generate-locales-tool:cldr-data.bzl", "cldr_json_data_repository")
|
||||
|
||||
cldr_json_data(
|
||||
name = "cldr_json_data",
|
||||
urls = {
|
||||
"https://github.com/unicode-org/cldr-json/releases/download/%s.0.0/cldr-%s.0.0-json-full.zip" % (CLDR_VERSION, CLDR_VERSION): "bbb9a9aac2dfc534bd18288678a5984023d11d22f712f3c33425f3214bd1def6",
|
||||
"https://github.com/unicode-org/cldr-json/releases/download/%s.0.0/cldr-%s.0.0-json-full.zip" % (CLDR_VERSION, CLDR_VERSION): "649b76647269e32b1b0a5f7b6eed52e9e63a1581f1afdcf4f6771e49c9713614",
|
||||
},
|
||||
)
|
||||
|
||||
@@ -158,7 +146,7 @@ cldr_xml_data = use_repo_rule("//packages/common/locales/generate-locales-tool:c
|
||||
cldr_xml_data(
|
||||
name = "cldr_xml_data",
|
||||
urls = {
|
||||
"https://github.com/unicode-org/cldr/releases/download/release-%s/core.zip" % CLDR_VERSION: "d5ee2abac64158c04884a722f8ef4830ea22b6c74aac20185be2838db8eda788",
|
||||
"https://github.com/unicode-org/cldr/releases/download/release-%s/cldr-common-%s.0.zip" % (CLDR_VERSION, CLDR_VERSION): "823c6170c41e2de2c229574e8a436332d25f1c9723409867fe721e00bc92d853",
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Generated
+866
-922
File diff suppressed because it is too large
Load Diff
@@ -146,11 +146,11 @@ Join the conversation and help the community.
|
||||
[angularelements]: https://angular.dev/guide/elements
|
||||
[ssr]: https://angular.dev/guide/ssr
|
||||
[schematics]: https://angular.dev/tools/cli/schematics
|
||||
[lazyloading]: https://angular.dev/guide/routing/define-routes#lazily-loaded-components
|
||||
[lazyloading]: https://angular.dev/guide/ngmodules/lazy-loading
|
||||
[node.js]: https://nodejs.org/
|
||||
[npm]: https://www.npmjs.com/get-npm
|
||||
[codeofconduct]: CODE_OF_CONDUCT.md
|
||||
[X (formerly Twitter)]: https://www.x.com/angular
|
||||
[X (formerly Twitter)]: https://www.twitter.com/angular
|
||||
[bluesky]: https://bsky.app/profile/angular.dev
|
||||
[discord]: https://discord.gg/angular
|
||||
[stackoverflow]: https://stackoverflow.com/questions/tagged/angular
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
ignore_directories([
|
||||
".git",
|
||||
"dist",
|
||||
"**/node_modules/**",
|
||||
])
|
||||
+58
-67
@@ -14,8 +14,8 @@ exports_files([
|
||||
])
|
||||
|
||||
APPLICATION_FILES = [
|
||||
"//adev/src/context:llms_full",
|
||||
"//adev/src/assets/images",
|
||||
"//adev/src/assets/images/v21-event:v21-event-images",
|
||||
"//adev/src/assets/others",
|
||||
"//adev/src/assets/previews",
|
||||
"//adev/src/assets:tutorials",
|
||||
@@ -24,55 +24,43 @@ APPLICATION_FILES = [
|
||||
"//adev/src/assets:content",
|
||||
"//adev/src/assets:context",
|
||||
"//adev/src/content/examples:embeddable",
|
||||
"tailwind.config.js",
|
||||
|
||||
# For the routes that are generated at build time
|
||||
"//adev/src/assets:docs_api_manifest",
|
||||
"//adev/scripts/routes:generate_route",
|
||||
"//adev/src/app/routing/navigation-entries",
|
||||
"//adev/src/app/routing/navigation-entries:navigation_types",
|
||||
"//adev/src/content/reference/errors:route-nav-items",
|
||||
"//adev/src/content/reference/extended-diagnostics:route-nav-items",
|
||||
"//adev/src/content/tutorials/deferrable-views",
|
||||
"//adev/src/content/tutorials/first-app",
|
||||
"//adev/src/content/tutorials/learn-angular",
|
||||
"//adev/src/content/tutorials/signal-forms",
|
||||
"//adev/src/content/tutorials/signals",
|
||||
] + glob(
|
||||
["src/**/*"],
|
||||
exclude = ["src/**/*.spec.ts"],
|
||||
)
|
||||
|
||||
APPLICATION_DEPS = [
|
||||
":node_modules/@codemirror/autocomplete",
|
||||
":node_modules/@codemirror/commands",
|
||||
":node_modules/@codemirror/lang-angular",
|
||||
":node_modules/@codemirror/lang-css",
|
||||
":node_modules/@codemirror/lang-html",
|
||||
":node_modules/@codemirror/lang-javascript",
|
||||
":node_modules/@codemirror/lang-sass",
|
||||
":node_modules/@codemirror/language",
|
||||
":node_modules/@codemirror/lint",
|
||||
":node_modules/@codemirror/search",
|
||||
":node_modules/@codemirror/state",
|
||||
":node_modules/@codemirror/view",
|
||||
":node_modules/@lezer/common",
|
||||
":node_modules/@lezer/highlight",
|
||||
":node_modules/@lezer/javascript",
|
||||
":node_modules/@stackblitz/sdk",
|
||||
":node_modules/@typescript/vfs",
|
||||
":node_modules/@webcontainer/api",
|
||||
":node_modules/@xterm/addon-fit",
|
||||
":node_modules/@xterm/xterm",
|
||||
":node_modules/algoliasearch",
|
||||
":node_modules/angular-split",
|
||||
":node_modules/fflate",
|
||||
":node_modules/marked",
|
||||
":node_modules/ngx-progressbar",
|
||||
":node_modules/open-in-idx",
|
||||
":node_modules/tailwindcss",
|
||||
":node_modules/typescript",
|
||||
":node_modules/@types/dom-navigation",
|
||||
"//adev:node_modules/@angular-devkit/build-angular",
|
||||
"//adev:node_modules/@codemirror/autocomplete",
|
||||
"//adev:node_modules/@codemirror/commands",
|
||||
"//adev:node_modules/@codemirror/lang-angular",
|
||||
"//adev:node_modules/@codemirror/lang-css",
|
||||
"//adev:node_modules/@codemirror/lang-html",
|
||||
"//adev:node_modules/@codemirror/lang-javascript",
|
||||
"//adev:node_modules/@codemirror/lang-sass",
|
||||
"//adev:node_modules/@codemirror/language",
|
||||
"//adev:node_modules/@codemirror/lint",
|
||||
"//adev:node_modules/@codemirror/search",
|
||||
"//adev:node_modules/@codemirror/state",
|
||||
"//adev:node_modules/@codemirror/view",
|
||||
"//adev:node_modules/@lezer/common",
|
||||
"//adev:node_modules/@lezer/highlight",
|
||||
"//adev:node_modules/@lezer/javascript",
|
||||
"//adev:node_modules/@stackblitz/sdk",
|
||||
"//adev:node_modules/@typescript/vfs",
|
||||
"//adev:node_modules/@webcontainer/api",
|
||||
"//adev:node_modules/@xterm/addon-fit",
|
||||
"//adev:node_modules/@xterm/xterm",
|
||||
"//adev:node_modules/algoliasearch",
|
||||
"//adev:node_modules/angular-split",
|
||||
"//adev:node_modules/fflate",
|
||||
"//adev:node_modules/marked",
|
||||
"//adev:node_modules/ngx-progressbar",
|
||||
"//adev:node_modules/open-in-idx",
|
||||
"//adev:node_modules/typescript",
|
||||
"//adev:node_modules/xhr2",
|
||||
"//adev:node_modules/@types/node",
|
||||
"//adev:node_modules/@types/dom-navigation",
|
||||
|
||||
# The imports below are packages that our code does not directly import, but our upstream deps import from
|
||||
# these locations directly. By design, rather than hoisting these packages into the "root" node_modules the
|
||||
@@ -80,30 +68,32 @@ APPLICATION_DEPS = [
|
||||
# a "hoisted" location within the `.aspect_rules_js/` directories in the node_modules directory. This prevents
|
||||
# the bundler from being able to find it as expected. We instead specifically provide it as a dep within bazel
|
||||
# as a mechanism of "hoisting" the package for our usage by this target.
|
||||
":node_modules/@algolia/client-common",
|
||||
":node_modules/@algolia/requester-browser-xhr",
|
||||
":node_modules/@algolia/requester-node-http",
|
||||
":node_modules/@lezer/css",
|
||||
":node_modules/@lezer/html",
|
||||
":node_modules/@lezer/lr",
|
||||
":node_modules/@lezer/sass",
|
||||
":node_modules/@marijn/find-cluster-break",
|
||||
":node_modules/crelt",
|
||||
":node_modules/style-mod",
|
||||
":node_modules/w3c-keyname",
|
||||
"//adev:node_modules/@algolia/client-common",
|
||||
"//adev:node_modules/@algolia/requester-browser-xhr",
|
||||
"//adev:node_modules/@algolia/requester-node-http",
|
||||
"//adev:node_modules/@lezer/css",
|
||||
"//adev:node_modules/@lezer/html",
|
||||
"//adev:node_modules/@lezer/lr",
|
||||
"//adev:node_modules/@lezer/sass",
|
||||
"//adev:node_modules/@marijn/find-cluster-break",
|
||||
"//adev:node_modules/crelt",
|
||||
"//adev:node_modules/style-mod",
|
||||
"//adev:node_modules/w3c-keyname",
|
||||
]
|
||||
|
||||
TEST_FILES = APPLICATION_FILES + glob(["src/app/**/*.spec.ts"])
|
||||
TEST_FILES = APPLICATION_FILES + [
|
||||
"karma.conf.js",
|
||||
"test-main.ts",
|
||||
] + glob(["src/**/*.spec.ts"])
|
||||
|
||||
TEST_DEPS = APPLICATION_DEPS + [
|
||||
":node_modules/@types/jasmine",
|
||||
":node_modules/karma",
|
||||
":node_modules/karma-chrome-launcher",
|
||||
":node_modules/karma-jasmine",
|
||||
":node_modules/karma-coverage",
|
||||
":node_modules/karma-jasmine-html-reporter",
|
||||
":node_modules/jasmine-core",
|
||||
TEST_DEPS = [
|
||||
dep
|
||||
for dep in APPLICATION_DEPS
|
||||
if dep != "//adev:node_modules/@types/node"
|
||||
] + [
|
||||
"@rules_browsers//browsers/chromium",
|
||||
"@rules_browsers//browsers/firefox",
|
||||
"//adev/tools:windows-chromium-path",
|
||||
]
|
||||
|
||||
ng_config(name = "ng_config")
|
||||
@@ -119,7 +109,7 @@ ng_application(
|
||||
"NG_BUILD_PARTIAL_SSR": "1",
|
||||
},
|
||||
ng_config = ":ng_config",
|
||||
node_modules = ":node_modules",
|
||||
node_modules = "//adev:node_modules",
|
||||
project_name = "angular-dev",
|
||||
serve_args = [
|
||||
"--port",
|
||||
@@ -145,7 +135,7 @@ ng_application(
|
||||
"NG_BUILD_OPTIMIZE_CHUNKS": "1",
|
||||
},
|
||||
ng_config = ":ng_config",
|
||||
node_modules = ":node_modules",
|
||||
node_modules = "//adev:node_modules",
|
||||
project_name = "angular-dev",
|
||||
serve_args = [
|
||||
"--port",
|
||||
@@ -169,9 +159,10 @@ ng_test(
|
||||
"CHROMEDRIVER_BIN": "../" + "$(CHROMEDRIVER)",
|
||||
},
|
||||
ng_config = ":ng_config",
|
||||
node_modules = ":node_modules",
|
||||
node_modules = "//adev:node_modules",
|
||||
project_name = "angular-dev",
|
||||
toolchains = [
|
||||
"@rules_browsers//browsers/chromium:toolchain_alias",
|
||||
"@rules_browsers//browsers/firefox:toolchain_alias",
|
||||
],
|
||||
)
|
||||
|
||||
+4
-3
@@ -17,7 +17,7 @@ git clone https://github.com/angular/angular.git
|
||||
cd angular
|
||||
|
||||
# Install dependencies
|
||||
pnpm install
|
||||
pnpm
|
||||
|
||||
# Build and run local dev server
|
||||
# NOTE: Initial build will take some time
|
||||
@@ -52,7 +52,8 @@ pnpm bazel clean
|
||||
pnpm bazel clean --expunge
|
||||
```
|
||||
|
||||
## High level architecture
|
||||
|
||||
## High level architecture
|
||||
|
||||
The angular.dev website is a modern Angular application that utilizes Static Site Generation (SSG) to deliver pre-rendered, high-performance content to users.
|
||||
|
||||
@@ -60,4 +61,4 @@ The architecture is designed for efficiency and maintainability:
|
||||
|
||||
Content Sources: The documentation is sourced from two main places within the monorepo. The guides and tutorials are written in Markdown files, while the API reference pages are automatically generated by extracting documentation directly from the TypeScript source code of the Angular framework packages.
|
||||
|
||||
Build Process: During the build process, the Markdown files are converted into HTML. Simultaneously, the API documentation is extracted from the code comments. This content is then integrated into the Angular application.
|
||||
Build Process: During the build process, the Markdown files are converted into HTML. Simultaneously, the API documentation is extracted from the code comments. This content is then integrated into the Angular application.
|
||||
+21
-11
@@ -19,7 +19,7 @@
|
||||
"build": {
|
||||
"builder": "@angular/build:application",
|
||||
"options": {
|
||||
"externalDependencies": ["path", "xhr2"],
|
||||
"externalDependencies": ["path"],
|
||||
"outputMode": "static",
|
||||
"outputPath": "dist",
|
||||
"index": "src/index.html",
|
||||
@@ -31,9 +31,9 @@
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/robots.txt",
|
||||
"src/llms.txt",
|
||||
"src/assets",
|
||||
"src/assets/images/v21-event"
|
||||
"src/context",
|
||||
"src/llms.txt"
|
||||
],
|
||||
"styles": ["@angular/docs/styles/global-styles.scss", "./src/local-styles.scss"],
|
||||
"scripts": [],
|
||||
@@ -57,7 +57,7 @@
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular/build:dev-server",
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"buildTarget": "angular-dev:build:production"
|
||||
@@ -75,14 +75,24 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"buildTarget": "angular-dev:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular/build:unit-test",
|
||||
"options": {
|
||||
"runner": "karma",
|
||||
"browsers": ["ChromeHeadlessNoSandbox"],
|
||||
"include": [
|
||||
"src/app/**/*.spec.ts"
|
||||
]
|
||||
"builder": "@angular/build:karma",
|
||||
"options": {
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"include": ["src/app"],
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"main": "test-main.ts",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": ["src/favicon.ico", "src/assets"],
|
||||
"styles": ["@angular/docs/styles/global-styles.scss"],
|
||||
"scripts": [],
|
||||
"webWorkerTsConfig": "tsconfig.worker.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-14
@@ -19,20 +19,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "assets/others/versions.json",
|
||||
"headers": [
|
||||
{
|
||||
"key": "Cross-Origin-Resource-Policy",
|
||||
"value": "cross-origin"
|
||||
},
|
||||
{
|
||||
"key": "Access-Control-Allow-Origin",
|
||||
"value": "*"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "/**/*-[0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_].*",
|
||||
"source": "/**/*-[0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z].*",
|
||||
"headers": [
|
||||
{
|
||||
"key": "Cache-Control",
|
||||
@@ -69,6 +56,7 @@
|
||||
"key": "Cross-Origin-Opener-Policy",
|
||||
"value": "same-origin"
|
||||
},
|
||||
|
||||
{
|
||||
"key": "Cross-Origin-Embedder-Policy",
|
||||
"value": "require-corp"
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
const {getAdjustedChromeBinPathForWindows} = require('./tools/windows-chromium-path');
|
||||
|
||||
process.env.CHROME_BIN = getAdjustedChromeBinPathForWindows();
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
{'reporter:jasmine-seed': ['type', JasmineSeedReporter]},
|
||||
],
|
||||
proxies: {
|
||||
'/dummy/image': 'src/assets/images/logos/angular/angular.png',
|
||||
},
|
||||
client: {
|
||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
||||
jasmine: {
|
||||
// you can add configuration options for Jasmine here
|
||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
||||
// for example, you can disable the random execution with `random: false`
|
||||
// or set a specific seed with `seed: 4321`
|
||||
random: true,
|
||||
seed: '',
|
||||
},
|
||||
},
|
||||
jasmineHtmlReporter: {
|
||||
suppressAll: true, // removes the duplicated traces
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/site'),
|
||||
subdir: '.',
|
||||
reporters: [{type: 'html'}, {type: 'text-summary'}],
|
||||
},
|
||||
reporters: ['progress', 'kjhtml', 'jasmine-seed'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
customLaunchers: {
|
||||
ChromeHeadlessNoSandbox: {
|
||||
base: 'ChromeHeadless',
|
||||
// See /integration/README.md#browser-tests for more info on these args
|
||||
flags: [
|
||||
'--no-sandbox',
|
||||
'--headless',
|
||||
'--disable-gpu',
|
||||
'--disable-dev-shm-usage',
|
||||
'--hide-scrollbars',
|
||||
'--mute-audio',
|
||||
],
|
||||
},
|
||||
},
|
||||
browsers: ['ChromeHeadlessNoSandbox'],
|
||||
browserNoActivityTimeout: 60000,
|
||||
singleRun: false,
|
||||
restartOnFileChange: true,
|
||||
});
|
||||
};
|
||||
|
||||
// Helpers
|
||||
function JasmineSeedReporter(baseReporterDecorator) {
|
||||
baseReporterDecorator(this);
|
||||
|
||||
this.onBrowserComplete = (browser, result) => {
|
||||
const seed = result.order && result.order.random && result.order.seed;
|
||||
if (seed) this.write(`${browser}: Randomized with seed ${seed}.\n`);
|
||||
};
|
||||
|
||||
this.onRunComplete = () => undefined;
|
||||
}
|
||||
+50
-54
@@ -1,86 +1,82 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "5.46.2",
|
||||
"@algolia/client-search": "5.46.2",
|
||||
"@algolia/requester-browser-xhr": "5.46.2",
|
||||
"@algolia/requester-node-http": "5.46.2",
|
||||
"@angular-devkit/build-angular": "20.3.2",
|
||||
"@angular/animations": "workspace:*",
|
||||
"@angular/aria": "21.1.1",
|
||||
"@angular/build": "21.1.2",
|
||||
"@angular/cdk": "21.1.1",
|
||||
"@angular/cli": "21.1.2",
|
||||
"@angular/build": "20.3.2",
|
||||
"@angular/cdk": "20.2.4",
|
||||
"@angular/cli": "20.3.2",
|
||||
"@angular/common": "workspace:*",
|
||||
"@angular/compiler": "workspace:*",
|
||||
"@angular/compiler-cli": "workspace:*",
|
||||
"@angular/compiler": "workspace:*",
|
||||
"@angular/core": "workspace:*",
|
||||
"@angular/docs": "workspace:*",
|
||||
"@angular/forms": "workspace:*",
|
||||
"@angular/material": "21.1.1",
|
||||
"@angular/material": "20.2.4",
|
||||
"@angular/platform-browser": "workspace:*",
|
||||
"@angular/platform-server": "workspace:*",
|
||||
"@angular/router": "workspace:*",
|
||||
"@angular/ssr": "21.1.2",
|
||||
"@codemirror/autocomplete": "6.20.0",
|
||||
"@codemirror/commands": "6.10.1",
|
||||
"@angular/ssr": "20.3.2",
|
||||
"@codemirror/autocomplete": "6.18.6",
|
||||
"@codemirror/commands": "6.8.1",
|
||||
"@codemirror/lang-angular": "0.1.4",
|
||||
"@codemirror/lang-css": "6.3.1",
|
||||
"@codemirror/lang-html": "6.4.11",
|
||||
"@codemirror/lang-html": "6.4.9",
|
||||
"@codemirror/lang-javascript": "6.2.4",
|
||||
"@codemirror/lang-sass": "6.0.2",
|
||||
"@codemirror/language": "6.12.1",
|
||||
"@codemirror/lint": "6.9.2",
|
||||
"@codemirror/language": "6.11.3",
|
||||
"@codemirror/lint": "6.8.5",
|
||||
"@codemirror/search": "6.5.11",
|
||||
"@codemirror/state": "6.5.3",
|
||||
"@codemirror/view": "6.39.9",
|
||||
"@lezer/common": "1.5.0",
|
||||
"@lezer/css": "1.3.0",
|
||||
"@lezer/highlight": "1.2.3",
|
||||
"@lezer/html": "1.3.13",
|
||||
"@lezer/javascript": "1.5.4",
|
||||
"@lezer/lr": "1.4.7",
|
||||
"@lezer/sass": "1.1.0",
|
||||
"@marijn/find-cluster-break": "1.0.2",
|
||||
"@codemirror/state": "6.5.2",
|
||||
"@codemirror/view": "6.38.1",
|
||||
"@lezer/common": "1.2.3",
|
||||
"@lezer/highlight": "1.2.1",
|
||||
"@lezer/javascript": "1.5.1",
|
||||
"@stackblitz/sdk": "1.11.0",
|
||||
"@types/dom-navigation": "1.0.6",
|
||||
"@types/jasmine": "5.1.13",
|
||||
"@types/jsdom": "27.0.0",
|
||||
"@types/node": "24.10.4",
|
||||
"@typescript/vfs": "1.6.2",
|
||||
"@types/jasmine": "5.1.9",
|
||||
"@types/jsdom": "21.1.7",
|
||||
"@types/node": "24.3.0",
|
||||
"@typescript/vfs": "1.6.1",
|
||||
"@webcontainer/api": "1.6.1",
|
||||
"@xterm/addon-fit": "0.11.0",
|
||||
"@xterm/xterm": "6.0.0",
|
||||
"algoliasearch": "5.46.2",
|
||||
"@xterm/addon-fit": "0.10.0",
|
||||
"@xterm/xterm": "5.5.0",
|
||||
"algoliasearch": "5.35.0",
|
||||
"angular-split": "20.0.0",
|
||||
"crelt": "1.0.6",
|
||||
"diff": "8.0.2",
|
||||
"emoji-regex": "10.6.0",
|
||||
"emoji-regex": "10.4.0",
|
||||
"fflate": "0.8.2",
|
||||
"jasmine-core": "5.13.0",
|
||||
"jsdom": "27.4.0",
|
||||
"html-entities": "2.6.0",
|
||||
"jasmine-core": "5.9.0",
|
||||
"jsdom": "26.1.0",
|
||||
"karma-chrome-launcher": "3.2.0",
|
||||
"karma-coverage": "2.2.1",
|
||||
"karma-jasmine": "5.1.0",
|
||||
"karma-jasmine-html-reporter": "2.1.0",
|
||||
"marked": "17.0.1",
|
||||
"mermaid": "11.12.2",
|
||||
"karma-jasmine": "5.1.0",
|
||||
"marked": "16.2.0",
|
||||
"mermaid": "11.10.0",
|
||||
"ngx-progressbar": "14.0.0",
|
||||
"open-in-idx": "0.1.1",
|
||||
"playwright-core": "1.57.0",
|
||||
"preact": "10.28.2",
|
||||
"preact-render-to-string": "6.6.5",
|
||||
"prettier": "3.8.0",
|
||||
"playwright-core": "1.55.0",
|
||||
"preact-render-to-string": "6.6.1",
|
||||
"preact": "10.27.1",
|
||||
"prettier": "3.6.2",
|
||||
"rxjs": "7.8.2",
|
||||
"shiki": "3.21.0",
|
||||
"style-mod": "4.1.3",
|
||||
"tinyglobby": "0.2.15",
|
||||
"shiki": "3.11.0",
|
||||
"tinyglobby": "0.2.14",
|
||||
"tslib": "2.8.1",
|
||||
"typescript": "5.9.3",
|
||||
"typescript": "5.9.2",
|
||||
"xhr2": "0.2.1",
|
||||
"zone.js": "0.15.1",
|
||||
"@algolia/client-common": "5.35.0",
|
||||
"@algolia/requester-browser-xhr": "5.35.0",
|
||||
"@algolia/requester-node-http": "5.35.0",
|
||||
"@lezer/css": "1.3.0",
|
||||
"@lezer/html": "1.3.10",
|
||||
"@lezer/lr": "1.4.2",
|
||||
"@lezer/sass": "1.1.0",
|
||||
"@marijn/find-cluster-break": "1.0.2",
|
||||
"crelt": "1.0.6",
|
||||
"style-mod": "4.1.2",
|
||||
"w3c-keyname": "2.2.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "10.4.23",
|
||||
"karma": "~6.4.4",
|
||||
"postcss": "8.5.6",
|
||||
"tailwindcss": "3.4.19"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
load("@aspect_rules_ts//ts:defs.bzl", "ts_project")
|
||||
load("//adev/shared-docs:defaults.bzl", "js_binary", "js_run_binary")
|
||||
|
||||
package(default_visibility = ["//adev:__subpackages__"])
|
||||
|
||||
ts_project(
|
||||
name = "generate_routes_lib",
|
||||
srcs = [
|
||||
"generate-routes.mts",
|
||||
],
|
||||
data = [
|
||||
"//adev/src/assets:docs_api_manifest",
|
||||
"//adev/src/content/tutorials/deferrable-views",
|
||||
"//adev/src/content/tutorials/first-app",
|
||||
"//adev/src/content/tutorials/learn-angular",
|
||||
"//adev/src/content/tutorials/signal-forms",
|
||||
"//adev/src/content/tutorials/signals",
|
||||
],
|
||||
tsconfig = {
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"moduleResolution": "node",
|
||||
"types": ["node"],
|
||||
"rootDir": ".",
|
||||
"skipLibCheck": True,
|
||||
},
|
||||
},
|
||||
deps = [
|
||||
"//adev:node_modules/@angular/docs",
|
||||
"//adev:node_modules/@types/node",
|
||||
"//adev/src/app/routing/navigation-entries",
|
||||
"//adev/src/content/reference/errors:route-nav-items",
|
||||
"//adev/src/content/reference/extended-diagnostics:route-nav-items",
|
||||
],
|
||||
)
|
||||
|
||||
js_binary(
|
||||
name = "generate_route",
|
||||
data = [
|
||||
"generate-routes.mjs",
|
||||
":generate_routes_lib",
|
||||
"//adev/src/content:guide_files",
|
||||
],
|
||||
entry_point = ":generate-routes.mjs",
|
||||
)
|
||||
|
||||
js_run_binary(
|
||||
name = "run_generate_route",
|
||||
outs = ["defined-routes.json"],
|
||||
chdir = package_name(),
|
||||
tool = ":generate_route",
|
||||
)
|
||||
@@ -1,82 +0,0 @@
|
||||
/*!
|
||||
* @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
|
||||
*/
|
||||
|
||||
import {ALL_ITEMS} from '../../src/app/routing/navigation-entries';
|
||||
import {NavigationItem} from '@angular/docs';
|
||||
import {writeFileSync, readFileSync} from 'fs';
|
||||
import {join, resolve} from 'path';
|
||||
|
||||
const outputFile = 'defined-routes.json';
|
||||
const contentRoot = resolve(process.cwd(), '../../src/content');
|
||||
|
||||
/**
|
||||
* The scripts generates a list of all defined routes in the guides section and stores them
|
||||
* in a JSON file. This file then used by other bazel targets to know which routes are valid.
|
||||
*/
|
||||
|
||||
function extractRoutes(items: NavigationItem[]): string[] {
|
||||
const routes: string[] = [];
|
||||
for (const item of items) {
|
||||
if (item.path && !item.path.startsWith('http')) {
|
||||
routes.push(item.path);
|
||||
if (item.contentPath) {
|
||||
const content = readFileSync(join(contentRoot, `${item.contentPath}.md`), {
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
const headings = extractHeadings(content);
|
||||
routes.push(
|
||||
...headings.map(
|
||||
(heading) => `${item.path}#${heading.toLowerCase().replace(/\s+/g, '-')}`,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
if (item.children) {
|
||||
routes.push(...extractRoutes(item.children));
|
||||
}
|
||||
}
|
||||
return routes;
|
||||
}
|
||||
|
||||
function extractHeadings(content: string): string[] {
|
||||
const headings = content
|
||||
.split('\n')
|
||||
// Top level heading (H1) are used for the page title only
|
||||
// and yes, headings can have leading spaces
|
||||
.filter((line) => line.trim().startsWith('##'))
|
||||
.map((line) => line.replace(/^#+\s*/, '').trim());
|
||||
|
||||
const stepRegex = /<docs-step[^>]*title="([^"]*)"/g;
|
||||
let match;
|
||||
while ((match = stepRegex.exec(content)) !== null) {
|
||||
headings.push(match[1]);
|
||||
}
|
||||
|
||||
return headings.map((heading: string) => getIdFromHeading(heading));
|
||||
}
|
||||
|
||||
function main() {
|
||||
const allRoutes: string[] = [];
|
||||
|
||||
allRoutes.push(...extractRoutes(ALL_ITEMS));
|
||||
|
||||
const uniqueRoutes = Array.from(new Set(allRoutes.filter((r) => !!r)));
|
||||
|
||||
console.warn('Generated routes:', JSON.stringify(uniqueRoutes, null, 2));
|
||||
writeFileSync(outputFile, JSON.stringify(uniqueRoutes, null, 2));
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
// TODO: refactor so this function is shared with the generation pipeline (adev/shared-docs/pipeline/shared/marked/transformations/heading.mts)
|
||||
function getIdFromHeading(heading: string): string {
|
||||
return heading
|
||||
.toLowerCase()
|
||||
.replace(/\s|\//g, '-') // replace spaces and slashes with dashes
|
||||
.replace(/[^\p{L}\d\-]/gu, ''); // only keep letters, digits & dashes
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
//tslint:disable:no-console
|
||||
import assert from 'node:assert';
|
||||
import {execSync} from 'node:child_process';
|
||||
import {existsSync, constants as fsConstants} from 'node:fs';
|
||||
import {copyFile, mkdtemp, readdir, readFile, realpath, unlink, writeFile} from 'node:fs/promises';
|
||||
import {tmpdir} from 'node:os';
|
||||
import {join} from 'node:path';
|
||||
|
||||
export async function copyJsonAssets({repo, githubApi, assetsPath, destPath}) {
|
||||
const buildInfoPath = join(destPath, '_build-info.json');
|
||||
if (!existsSync(buildInfoPath)) {
|
||||
throw new Error(`${buildInfoPath} does not exist.`);
|
||||
}
|
||||
|
||||
assert(process.env.GITHUB_REF);
|
||||
const currentBranch = process.env.GITHUB_REF;
|
||||
|
||||
const {sha: storedSha, branchName: storedBranch} = JSON.parse(
|
||||
await readFile(buildInfoPath, 'utf-8'),
|
||||
);
|
||||
|
||||
let downstreamBranch = currentBranch;
|
||||
let latestSha = await githubApi.getShaForBranch(currentBranch);
|
||||
if (
|
||||
latestSha.includes('No commit') &&
|
||||
currentBranch !== 'refs/heads/main' &&
|
||||
currentBranch !== storedBranch
|
||||
) {
|
||||
// In some cases, such as when a new branch is created for a feature,
|
||||
// the branch may not exist in the downstream repo. For example, during an
|
||||
// exceptional minor release (e.g. FW 20.3.x and Components: 20.2.x).
|
||||
// In such scenarios, we fallback to the last known branch.
|
||||
latestSha = await githubApi.getShaForBranch(storedBranch);
|
||||
downstreamBranch = storedBranch;
|
||||
}
|
||||
|
||||
console.log(`Comparing ${storedSha}...${latestSha}.`);
|
||||
const affectedFiles = await githubApi.getAffectedFiles(storedSha, latestSha);
|
||||
const changedFiles = affectedFiles.filter((file) => file.startsWith(`${assetsPath}/`));
|
||||
|
||||
let shaWhenFilesChanged;
|
||||
if (changedFiles.length > 0) {
|
||||
console.log(
|
||||
`The below files changed between ${storedSha} and ${latestSha}:\n` +
|
||||
changedFiles.map((f) => '* ' + f).join('\n'),
|
||||
);
|
||||
|
||||
const temporaryDir = await realpath(await mkdtemp(join(tmpdir(), 'copy-json-assets-')));
|
||||
const execOptions = {cwd: temporaryDir, stdio: 'inherit'};
|
||||
execSync('git init', execOptions);
|
||||
execSync(`git remote add origin https://github.com/${repo}.git`, execOptions);
|
||||
// fetch a commit
|
||||
execSync(`git fetch origin ${latestSha}`, execOptions);
|
||||
// reset this repository's main branch to the commit of interest
|
||||
execSync('git reset --hard FETCH_HEAD', execOptions);
|
||||
// get sha when files where changed
|
||||
shaWhenFilesChanged = execSync(`git rev-list -1 ${latestSha} "${assetsPath}/"`, {
|
||||
encoding: 'utf8',
|
||||
cwd: temporaryDir,
|
||||
stdio: ['ignore', 'pipe', 'ignore'],
|
||||
}).trim();
|
||||
|
||||
// Delete existing asset files.
|
||||
const apiFilesUnlink = (await readdir(destPath))
|
||||
.filter((f) => f.endsWith('.json'))
|
||||
.map((f) => unlink(join(destPath, f)));
|
||||
|
||||
await Promise.allSettled(apiFilesUnlink);
|
||||
|
||||
// Copy new asset files
|
||||
const tempAssetsDir = join(temporaryDir, assetsPath);
|
||||
const assetFilesCopy = (await readdir(tempAssetsDir)).map((f) => {
|
||||
const src = join(tempAssetsDir, f);
|
||||
const dest = join(destPath, f);
|
||||
|
||||
return copyFile(src, dest, fsConstants.COPYFILE_FICLONE);
|
||||
});
|
||||
|
||||
await Promise.allSettled(assetFilesCopy);
|
||||
|
||||
console.log(`Successfully updated asset files in '${destPath}'.\n`);
|
||||
} else {
|
||||
console.log(`No '${assetsPath}/**' files changed between ${storedSha} and ${latestSha}.`);
|
||||
}
|
||||
|
||||
// Write SHA to file.
|
||||
await writeFile(
|
||||
buildInfoPath,
|
||||
JSON.stringify(
|
||||
{
|
||||
branchName: downstreamBranch,
|
||||
sha: shaWhenFilesChanged ?? storedSha,
|
||||
},
|
||||
undefined,
|
||||
2,
|
||||
),
|
||||
);
|
||||
|
||||
// The below command will show uncommitted changes.
|
||||
// This is expected because the framework repo and component/cli might have different minors
|
||||
// (e.g. during exceptional minor releases), leading to changes that need to be committed.
|
||||
console.log('\nChanges: ');
|
||||
execSync(`git status --porcelain`, {stdio: 'inherit'});
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
import {type SynonymHit} from 'algoliasearch';
|
||||
|
||||
/**
|
||||
* List of synonyms to upload to algolia.
|
||||
*
|
||||
* More information about synonyms can be found here:
|
||||
* https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/
|
||||
*/
|
||||
const synonyms: SynonymHit[] = [
|
||||
{
|
||||
objectID: 'di-synonyms',
|
||||
type: 'synonym',
|
||||
synonyms: ['DI', 'dependency injection'],
|
||||
},
|
||||
];
|
||||
|
||||
export default synonyms;
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"moduleResolution": "bundler",
|
||||
"preserveSymlinks": true,
|
||||
"importHelpers": true,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"allowImportingTsExtensions": true,
|
||||
"lib": ["ES2022"],
|
||||
"types": [],
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
import {algoliasearch} from 'algoliasearch';
|
||||
import synonyms from './algolia-synonyms.mts';
|
||||
|
||||
/** The name of the index being updated. */
|
||||
const INDEX_NAME = 'angular_v17';
|
||||
/** The api key for making the change on the algolia index. */
|
||||
const ALGOLIA_KEY = process.env['ALGOLIA_KEY'];
|
||||
/** The algolia application id. */
|
||||
const APP_NAME = 'L1XWT2UJ7F';
|
||||
|
||||
async function main() {
|
||||
try {
|
||||
if (ALGOLIA_KEY === undefined) {
|
||||
throw new Error('Missing required environment variable: `ALGOLIA_KEY`');
|
||||
}
|
||||
const client = algoliasearch(APP_NAME, ALGOLIA_KEY);
|
||||
|
||||
// Obtain and list all of the previous synonyms for record keeping.
|
||||
const {hits: oldHits, nbHits} = await client.searchSynonyms({indexName: INDEX_NAME});
|
||||
// The list of previous synonyms cleaned to only include the information we store locally.
|
||||
const oldSynonyms = oldHits.map(({objectID, type, synonyms}) => ({objectID, type, synonyms}));
|
||||
|
||||
// Delete all of the current synonyms
|
||||
await client.clearSynonyms({indexName: INDEX_NAME, forwardToReplicas: true});
|
||||
console.info(`Deleted ${nbHits} synonym(s)`);
|
||||
|
||||
// Upload our new synonyms
|
||||
await client.saveSynonyms({
|
||||
indexName: INDEX_NAME,
|
||||
replaceExistingSynonyms: true,
|
||||
forwardToReplicas: true,
|
||||
synonymHit: synonyms,
|
||||
});
|
||||
console.info(`Uploaded ${synonyms.length} new synonym(s)`);
|
||||
|
||||
// List both the old and new synonyms for easier comparison in debugging.
|
||||
console.info(`Previous Synonyms:`);
|
||||
console.info(JSON.stringify(oldSynonyms, undefined, 2));
|
||||
console.info(`New Synonyms:`);
|
||||
console.info(JSON.stringify(synonyms, undefined, 2));
|
||||
|
||||
console.info('\nSuccessfully updated synonyms');
|
||||
} catch (error) {
|
||||
console.error('\nError updating synonyms:');
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -0,0 +1,3 @@
|
||||
# Generating data for `angular.dev/api` CDK packages
|
||||
|
||||
This script updates the Angular CDK api JSON files stored in `adev/src/content/cdk`. This files are used to generate the [angular.dev api](https://angular.dev/api) pages for the CDK packages.
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
import {dirname, resolve as resolvePath} from 'node:path';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {copyJsonAssets} from '../shared/copy-json-assets.mjs';
|
||||
import {GithubClient} from '../shared/github-client.mjs';
|
||||
|
||||
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const CDK_BUILDS_REPO = 'angular/cdk-builds';
|
||||
const CDK_APIS_CONTENT_PATH = resolvePath(scriptDir, '../../src/content/cdk');
|
||||
|
||||
async function main() {
|
||||
await copyJsonAssets({
|
||||
repo: CDK_BUILDS_REPO,
|
||||
assetsPath: '_adev_assets',
|
||||
destPath: CDK_APIS_CONTENT_PATH,
|
||||
githubApi: new GithubClient(
|
||||
CDK_BUILDS_REPO,
|
||||
process.env.ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN,
|
||||
'ADEV_Angular_CDK_Sources_Update',
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
main().catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
# Generating data for `angular.dev/cli`
|
||||
|
||||
This script updates the Angular CLI help JSON files stored in `adev/src/content/cli/help`. This files are used to generate the [angular.dev CLI](https://angular.dev/cli) pages.
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
import {dirname, resolve as resolvePath} from 'node:path';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {copyJsonAssets} from '../shared/copy-json-assets.mjs';
|
||||
import {GithubClient} from '../shared/github-client.mjs';
|
||||
|
||||
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const CLI_BUILDS_REPO = 'angular/cli-builds';
|
||||
const CLI_HELP_CONTENT_PATH = resolvePath(scriptDir, '../../src/content/cli/help');
|
||||
|
||||
async function main() {
|
||||
await copyJsonAssets({
|
||||
repo: CLI_BUILDS_REPO,
|
||||
assetsPath: 'help',
|
||||
destPath: CLI_HELP_CONTENT_PATH,
|
||||
githubApi: new GithubClient(
|
||||
CLI_BUILDS_REPO,
|
||||
process.env.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN,
|
||||
'ADEV_Angular_CLI_Sources_Update',
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
main().catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -1,15 +0,0 @@
|
||||
# Update cross-repository documentation assets
|
||||
|
||||
This script updates documentation assets from other repositories for `angular.dev`.
|
||||
|
||||
## Aria Packages
|
||||
|
||||
Updates the Angular Aria API JSON files in `adev/src/content/aria`, used for the [angular.dev API](https://angular.dev/api) pages.
|
||||
|
||||
## CDK Packages
|
||||
|
||||
Updates the Angular CDK API JSON files in `adev/src/content/cdk`, used for the [angular.dev API](https://angular.dev/api) pages.
|
||||
|
||||
## CLI Help Pages
|
||||
|
||||
Updates the Angular CLI help JSON files in `adev/src/content/cli`, used for the [angular.dev CLI](https://angular.dev/cli) pages.
|
||||
@@ -1,41 +0,0 @@
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
//tslint:disable:no-console
|
||||
import {execSync} from 'node:child_process';
|
||||
import {join} from 'node:path';
|
||||
import {updateAssets} from './update-assets.mjs';
|
||||
|
||||
async function main() {
|
||||
await updateAssets({
|
||||
repo: 'angular/aria-builds',
|
||||
assetsPath: '_adev_assets',
|
||||
destPath: join(import.meta.dirname, '../../src/content/aria'),
|
||||
});
|
||||
|
||||
await updateAssets({
|
||||
repo: 'angular/cdk-builds',
|
||||
assetsPath: '_adev_assets',
|
||||
destPath: join(import.meta.dirname, '../../src/content/cdk'),
|
||||
});
|
||||
|
||||
await updateAssets({
|
||||
repo: 'angular/cli-builds',
|
||||
assetsPath: 'help',
|
||||
destPath: join(import.meta.dirname, '../../src/content/cli'),
|
||||
});
|
||||
|
||||
console.log('\n-----------------------------------------------');
|
||||
console.log('Change list');
|
||||
console.log('-----------------------------------------------\n');
|
||||
execSync(`git status --porcelain`, {stdio: 'inherit'});
|
||||
}
|
||||
|
||||
main().catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -1,132 +0,0 @@
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
//tslint:disable:no-console
|
||||
import assert from 'node:assert';
|
||||
import {execSync} from 'node:child_process';
|
||||
import {existsSync, constants as fsConstants} from 'node:fs';
|
||||
import {
|
||||
copyFile,
|
||||
mkdtemp,
|
||||
readdir,
|
||||
readFile,
|
||||
realpath,
|
||||
rm,
|
||||
unlink,
|
||||
writeFile,
|
||||
} from 'node:fs/promises';
|
||||
import {tmpdir} from 'node:os';
|
||||
import {join} from 'node:path';
|
||||
import {GithubClient} from './github-client.mjs';
|
||||
|
||||
export async function updateAssets({repo, assetsPath, destPath}) {
|
||||
console.log('\n-----------------------------------------------');
|
||||
console.log(`Processing: ${repo}`);
|
||||
console.log('-----------------------------------------------\n');
|
||||
|
||||
const buildInfoPath = join(destPath, '_build-info.json');
|
||||
if (!existsSync(buildInfoPath)) {
|
||||
throw new Error(`${buildInfoPath} does not exist.`);
|
||||
}
|
||||
|
||||
assert(process.env.GITHUB_REF);
|
||||
const currentBranch = process.env.GITHUB_REF;
|
||||
|
||||
const {sha: storedSha, branchName: storedBranch} = JSON.parse(
|
||||
await readFile(buildInfoPath, 'utf-8'),
|
||||
);
|
||||
|
||||
assert(process.env.ANGULAR_READONLY_GITHUB_TOKEN);
|
||||
const githubApi = new GithubClient(
|
||||
repo,
|
||||
process.env.ANGULAR_READONLY_GITHUB_TOKEN,
|
||||
'ADEV_Cross_Repo_Docs_Update',
|
||||
);
|
||||
|
||||
let downstreamBranch = currentBranch;
|
||||
let latestSha = await githubApi.getShaForBranch(currentBranch);
|
||||
if (
|
||||
latestSha.includes('No commit') &&
|
||||
currentBranch !== 'refs/heads/main' &&
|
||||
currentBranch !== storedBranch
|
||||
) {
|
||||
// In some cases, such as when a new branch is created for a feature,
|
||||
// the branch may not exist in the downstream repo. For example, during an
|
||||
// exceptional minor release (e.g. FW 20.3.x and Components: 20.2.x).
|
||||
// In such scenarios, we fallback to the last known branch.
|
||||
latestSha = await githubApi.getShaForBranch(storedBranch);
|
||||
downstreamBranch = storedBranch;
|
||||
}
|
||||
|
||||
console.log(`Comparing ${storedSha}...${latestSha}.`);
|
||||
const affectedFiles = await githubApi.getAffectedFiles(storedSha, latestSha);
|
||||
const changedFiles = affectedFiles.filter((file) => file.startsWith(`${assetsPath}/`));
|
||||
|
||||
let shaWhenFilesChanged;
|
||||
if (changedFiles.length > 0) {
|
||||
console.log(
|
||||
`The below files changed between ${storedSha} and ${latestSha}:\n` +
|
||||
changedFiles.map((f) => '* ' + f).join('\n'),
|
||||
);
|
||||
|
||||
const temporaryDir = await realpath(await mkdtemp(join(tmpdir(), 'update-assets-')));
|
||||
|
||||
try {
|
||||
const execOptions = {cwd: temporaryDir, stdio: 'inherit'};
|
||||
execSync('git init', execOptions);
|
||||
execSync(`git remote add origin https://github.com/${repo}.git`, execOptions);
|
||||
// fetch a commit
|
||||
execSync(`git fetch origin ${latestSha}`, execOptions);
|
||||
// reset this repository's main branch to the commit of interest
|
||||
execSync('git reset --hard FETCH_HEAD', execOptions);
|
||||
// get sha when files where changed
|
||||
shaWhenFilesChanged = execSync(`git rev-list -1 ${latestSha} "${assetsPath}/"`, {
|
||||
encoding: 'utf8',
|
||||
cwd: temporaryDir,
|
||||
stdio: ['ignore', 'pipe', 'ignore'],
|
||||
}).trim();
|
||||
|
||||
// Delete existing asset files.
|
||||
const apiFilesUnlink = (await readdir(destPath))
|
||||
.filter((f) => f.endsWith('.json'))
|
||||
.map((f) => unlink(join(destPath, f)));
|
||||
|
||||
await Promise.allSettled(apiFilesUnlink);
|
||||
|
||||
// Copy new asset files
|
||||
const tempAssetsDir = join(temporaryDir, assetsPath);
|
||||
const assetFilesCopy = (await readdir(tempAssetsDir)).map((f) => {
|
||||
const src = join(tempAssetsDir, f);
|
||||
const dest = join(destPath, f);
|
||||
|
||||
return copyFile(src, dest, fsConstants.COPYFILE_FICLONE);
|
||||
});
|
||||
|
||||
await Promise.allSettled(assetFilesCopy);
|
||||
} finally {
|
||||
await rm(temporaryDir, {force: true, recursive: true});
|
||||
}
|
||||
|
||||
console.log(`Successfully updated asset files in '${destPath}'.\n`);
|
||||
} else {
|
||||
console.log(`No '${assetsPath}/**' files changed between ${storedSha} and ${latestSha}.`);
|
||||
}
|
||||
|
||||
// Write SHA to file.
|
||||
await writeFile(
|
||||
buildInfoPath,
|
||||
JSON.stringify(
|
||||
{
|
||||
branchName: downstreamBranch,
|
||||
sha: shaWhenFilesChanged ?? storedSha,
|
||||
},
|
||||
undefined,
|
||||
2,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -20,7 +20,6 @@ ts_project(
|
||||
"//adev/shared-docs/components/search-dialog",
|
||||
"//adev/shared-docs/components/select",
|
||||
"//adev/shared-docs/components/slide-toggle",
|
||||
"//adev/shared-docs/components/tab-group",
|
||||
"//adev/shared-docs/components/table-of-contents",
|
||||
"//adev/shared-docs/components/text-field",
|
||||
"//adev/shared-docs/components/top-level-banner",
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
<!-- Algolia logo -->
|
||||
<svg
|
||||
id="Layer_1"
|
||||
class="docs-algolia-logo"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 2196.2 500"
|
||||
id="Layer_1"
|
||||
class="docs-algolia-logo"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 2196.2 500"
|
||||
>
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1,
|
||||
.cls-2 {
|
||||
fill: #003dff;
|
||||
}
|
||||
.cls-2 {
|
||||
fill-rule: evenodd;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
|
||||
/>
|
||||
<rect class="cls-1" x="1845.88" y="104.73" width="62.58" height="277.9" rx="5.9" ry="5.9" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-1"
|
||||
d="M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"
|
||||
/>
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1,
|
||||
.cls-2 {
|
||||
fill: #003dff;
|
||||
}
|
||||
.cls-2 {
|
||||
fill-rule: evenodd;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
|
||||
/>
|
||||
<rect class="cls-1" x="1845.88" y="104.73" width="62.58" height="277.9" rx="5.9" ry="5.9" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"
|
||||
/>
|
||||
<path
|
||||
class="cls-1"
|
||||
d="M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"
|
||||
/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.0 KiB |
@@ -13,8 +13,10 @@ import {NavigationState} from '../../services';
|
||||
import {NavigationItem} from '../../interfaces';
|
||||
import {By} from '@angular/platform-browser';
|
||||
import {provideRouter} from '@angular/router';
|
||||
import {provideZonelessChangeDetection} from '@angular/core';
|
||||
|
||||
describe('Breadcrumb', () => {
|
||||
let fixture: ComponentFixture<Breadcrumb>;
|
||||
let navigationStateSpy: jasmine.SpyObj<NavigationState>;
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -24,19 +26,20 @@ describe('Breadcrumb', () => {
|
||||
imports: [Breadcrumb],
|
||||
providers: [
|
||||
provideRouter([]),
|
||||
provideZonelessChangeDetection(),
|
||||
{
|
||||
provide: NavigationState,
|
||||
useValue: navigationStateSpy,
|
||||
},
|
||||
],
|
||||
});
|
||||
fixture = TestBed.createComponent(Breadcrumb);
|
||||
});
|
||||
|
||||
it('should display proper breadcrumb structure based on navigation state', async () => {
|
||||
it('should display proper breadcrumb structure based on navigation state', () => {
|
||||
navigationStateSpy.activeNavigationItem.and.returnValue(item);
|
||||
const fixture = TestBed.createComponent(Breadcrumb);
|
||||
await fixture.whenStable();
|
||||
|
||||
fixture.detectChanges();
|
||||
const breadcrumbs = fixture.debugElement.queryAll(By.css('.docs-breadcrumb span'));
|
||||
|
||||
expect(breadcrumbs.length).toBe(2);
|
||||
@@ -44,11 +47,10 @@ describe('Breadcrumb', () => {
|
||||
expect(breadcrumbs[1].nativeElement.innerText).toEqual('Parent');
|
||||
});
|
||||
|
||||
it('should display breadcrumb links when navigation item has got path', async () => {
|
||||
it('should display breadcrumb links when navigation item has got path', () => {
|
||||
navigationStateSpy.activeNavigationItem.and.returnValue(exampleItemWithPath);
|
||||
|
||||
const fixture = TestBed.createComponent(Breadcrumb);
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
const breadcrumbs = fixture.debugElement.queryAll(By.css('.docs-breadcrumb a'));
|
||||
|
||||
expect(breadcrumbs.length).toBe(1);
|
||||
|
||||
@@ -1,28 +1,22 @@
|
||||
@if (!hasAccepted()) {
|
||||
<div class="docs-cookies-popup docs-invert-mode">
|
||||
<p>This site uses cookies from Google to deliver its services and to analyze traffic.</p>
|
||||
<div class="docs-cookies-popup docs-invert-mode">
|
||||
<p>This site uses cookies from Google to deliver its services and to analyze traffic.</p>
|
||||
|
||||
<div>
|
||||
<a
|
||||
href="https://policies.google.com/technologies/cookies"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
class="docs-primary-btn"
|
||||
aria-label="Learn more about how Google uses cookies"
|
||||
text="Learn more"
|
||||
>
|
||||
<div>
|
||||
<a href="https://policies.google.com/technologies/cookies" target="_blank" rel="noopener">
|
||||
<button type="button" class="docs-primary-btn" [attr.text]="'Learn more'" aria-label="Learn More">
|
||||
Learn more
|
||||
</a>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
(click)="accept()"
|
||||
class="docs-primary-btn"
|
||||
text="Ok, Got it"
|
||||
aria-label="Ok, Got it"
|
||||
>
|
||||
Ok, Got it
|
||||
</button>
|
||||
</div>
|
||||
</a>
|
||||
<button
|
||||
type="button"
|
||||
(click)="accept()"
|
||||
class="docs-primary-btn"
|
||||
[attr.text]="'Ok, Got it'"
|
||||
aria-label="Ok, Got it"
|
||||
>
|
||||
Ok, Got it
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
import {CookiePopup, STORAGE_KEY} from './cookie-popup.component';
|
||||
import {LOCAL_STORAGE} from '../../providers/index';
|
||||
import {MockLocalStorage} from '../../testing/index';
|
||||
import {provideZonelessChangeDetection} from '@angular/core';
|
||||
|
||||
describe('CookiePopup', () => {
|
||||
let fixture: ComponentFixture<CookiePopup>;
|
||||
@@ -20,6 +21,7 @@ describe('CookiePopup', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CookiePopup],
|
||||
providers: [
|
||||
provideZonelessChangeDetection(),
|
||||
{
|
||||
provide: LOCAL_STORAGE,
|
||||
useValue: mockLocalStorage,
|
||||
@@ -28,34 +30,34 @@ describe('CookiePopup', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should make the popup visible by default', async () => {
|
||||
await initComponent(false);
|
||||
it('should make the popup visible by default', () => {
|
||||
initComponent(false);
|
||||
|
||||
expect(getCookiesPopup()).not.toBeNull();
|
||||
});
|
||||
|
||||
it('should hide the cookies popup if the user has already accepted cookies', async () => {
|
||||
await initComponent(true);
|
||||
it('should hide the cookies popup if the user has already accepted cookies', () => {
|
||||
initComponent(true);
|
||||
|
||||
expect(getCookiesPopup()).toBeNull();
|
||||
});
|
||||
|
||||
it('should hide the cookies popup', async () => {
|
||||
await initComponent(false);
|
||||
it('should hide the cookies popup', () => {
|
||||
initComponent(false);
|
||||
|
||||
accept();
|
||||
await fixture.whenStable();
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(getCookiesPopup()).toBeNull();
|
||||
});
|
||||
|
||||
it('should store the user confirmation', async () => {
|
||||
await initComponent(false);
|
||||
it('should store the user confirmation', () => {
|
||||
initComponent(false);
|
||||
|
||||
expect(mockLocalStorage.getItem(STORAGE_KEY)).toBeNull();
|
||||
|
||||
accept();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(mockLocalStorage.getItem(STORAGE_KEY)).toBe('true');
|
||||
});
|
||||
@@ -71,10 +73,10 @@ describe('CookiePopup', () => {
|
||||
?.click();
|
||||
}
|
||||
|
||||
async function initComponent(cookiesAccepted: boolean) {
|
||||
function initComponent(cookiesAccepted: boolean) {
|
||||
mockLocalStorage.setItem(STORAGE_KEY, cookiesAccepted ? 'true' : null);
|
||||
fixture = TestBed.createComponent(CookiePopup);
|
||||
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -27,7 +27,7 @@ export class CookiePopup {
|
||||
private readonly localStorage = inject(LOCAL_STORAGE);
|
||||
|
||||
/** Whether the user has accepted the cookie disclaimer. */
|
||||
readonly hasAccepted = signal(false);
|
||||
readonly hasAccepted = signal<boolean>(false);
|
||||
|
||||
constructor() {
|
||||
// Needs to be in a try/catch, because some browsers will
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
load("//adev/shared-docs:defaults.bzl", "ng_project")
|
||||
|
||||
ng_project(
|
||||
name = "copy-link-anchor",
|
||||
srcs = [
|
||||
"copy-link-anchor.component.ts",
|
||||
],
|
||||
visibility = [
|
||||
"//adev/shared-docs/components:__pkg__",
|
||||
"//adev/shared-docs/components/viewers:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"//adev:node_modules/@angular/cdk",
|
||||
"//adev:node_modules/@angular/common",
|
||||
"//adev:node_modules/@angular/core",
|
||||
"//adev:node_modules/@angular/material",
|
||||
"//adev/shared-docs/components/icon",
|
||||
],
|
||||
)
|
||||
@@ -1,66 +0,0 @@
|
||||
/*!
|
||||
* @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
|
||||
*/
|
||||
|
||||
import {ChangeDetectionStrategy, Component, inject, input, signal} from '@angular/core';
|
||||
import {Clipboard} from '@angular/cdk/clipboard';
|
||||
import {MatTooltip} from '@angular/material/tooltip';
|
||||
import {IconComponent} from '../icon/icon.component';
|
||||
|
||||
export const CONFIRMATION_DISPLAY_TIME_MS = 1000;
|
||||
|
||||
@Component({
|
||||
selector: 'docs-copy-link-button',
|
||||
template: `<docs-icon>{{ showCopySuccess() ? 'check' : 'link' }}</docs-icon>`,
|
||||
styles: `
|
||||
:host {
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
margin-left: 8px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
color: var(--quaternary-contrast);
|
||||
vertical-align: middle;
|
||||
}
|
||||
:host(.docs-copy-link-success) {
|
||||
color: var(--bright-blue);
|
||||
}
|
||||
`,
|
||||
hostDirectives: [
|
||||
{
|
||||
directive: MatTooltip,
|
||||
inputs: ['matTooltip'],
|
||||
},
|
||||
],
|
||||
host: {
|
||||
'[ariaLabel]': '"Copy link to " + label()',
|
||||
'(click)': 'copyLink()',
|
||||
'matTooltipPosition': 'above',
|
||||
'[class.docs-copy-link-success]': 'showCopySuccess()',
|
||||
},
|
||||
imports: [IconComponent],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class CopyLinkButton {
|
||||
readonly href = input.required<string>();
|
||||
readonly label = input.required<string>();
|
||||
|
||||
protected readonly showCopySuccess = signal(false);
|
||||
|
||||
private readonly clipboard = inject(Clipboard);
|
||||
|
||||
copyLink(): void {
|
||||
const link = `${window.location.origin}${this.href()}`;
|
||||
this.clipboard.copy(link);
|
||||
this.showCopySuccess.set(true);
|
||||
setTimeout(() => {
|
||||
this.showCopySuccess.set(false);
|
||||
}, CONFIRMATION_DISPLAY_TIME_MS);
|
||||
}
|
||||
}
|
||||
+33
-9
@@ -12,7 +12,12 @@ import {
|
||||
CONFIRMATION_DISPLAY_TIME_MS,
|
||||
CopySourceCodeButton,
|
||||
} from './copy-source-code-button.component';
|
||||
import {ChangeDetectionStrategy, Component, signal} from '@angular/core';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
provideZonelessChangeDetection,
|
||||
signal,
|
||||
} from '@angular/core';
|
||||
import {By} from '@angular/platform-browser';
|
||||
import {Clipboard} from '@angular/cdk/clipboard';
|
||||
|
||||
@@ -27,6 +32,7 @@ describe('CopySourceCodeButton', () => {
|
||||
beforeEach(async () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CodeSnippetWrapper],
|
||||
providers: [provideZonelessChangeDetection()],
|
||||
});
|
||||
fixture = TestBed.createComponent(CodeSnippetWrapper);
|
||||
component = fixture.componentInstance;
|
||||
@@ -50,20 +56,38 @@ describe('CopySourceCodeButton', () => {
|
||||
expect(copySpy.calls.argsFor(0)[0].trim()).toBe(expectedCodeToBeCopied);
|
||||
});
|
||||
|
||||
it(`should set ${SUCCESSFULLY_COPY_CLASS_NAME} for ${CONFIRMATION_DISPLAY_TIME_MS} ms when copy was executed properly`, async () => {
|
||||
const clock = jasmine.clock().install();
|
||||
component.code.set('example');
|
||||
it('should not copy lines marked as deleted when code snippet contains diff', async () => {
|
||||
const codeInHtmlFormat = `
|
||||
<code>
|
||||
<div class="line remove"><span class="hljs-tag"><<span class="hljs-name">div</span> *<span class="hljs-attr">ngFor</span>=<span class="hljs-string">"let product of products"</span>></span></div>
|
||||
<div class="line add"><span class="hljs-tag"><<span class="hljs-name">div</span> *<span class="hljs-attr">ngFor</span>=<span class="hljs-string">"let product of products()"</span>></span></div>
|
||||
</code>
|
||||
`;
|
||||
const expectedCodeToBeCopied = `<div *ngFor="let product of products()">`;
|
||||
component.code.set(codeInHtmlFormat);
|
||||
|
||||
await fixture.whenStable();
|
||||
|
||||
const button = fixture.debugElement.query(By.directive(CopySourceCodeButton)).nativeElement;
|
||||
button.click();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(copySpy.calls.argsFor(0)[0].trim()).toBe(expectedCodeToBeCopied);
|
||||
});
|
||||
|
||||
it(`should set ${SUCCESSFULLY_COPY_CLASS_NAME} for ${CONFIRMATION_DISPLAY_TIME_MS} ms when copy was executed properly`, () => {
|
||||
const clock = jasmine.clock().install();
|
||||
component.code.set('example');
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const button = fixture.debugElement.query(By.directive(CopySourceCodeButton)).nativeElement;
|
||||
button.click();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(button).toHaveClass(SUCCESSFULLY_COPY_CLASS_NAME);
|
||||
|
||||
clock.tick(CONFIRMATION_DISPLAY_TIME_MS);
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(button).not.toHaveClass(SUCCESSFULLY_COPY_CLASS_NAME);
|
||||
clock.uninstall();
|
||||
@@ -74,17 +98,17 @@ describe('CopySourceCodeButton', () => {
|
||||
component.code.set('example');
|
||||
copySpy.and.throwError('Fake copy error');
|
||||
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
|
||||
const button = fixture.debugElement.query(By.directive(CopySourceCodeButton)).nativeElement;
|
||||
button.click();
|
||||
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(button).toHaveClass(FAILED_COPY_CLASS_NAME);
|
||||
|
||||
clock.tick(CONFIRMATION_DISPLAY_TIME_MS);
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(button).not.toHaveClass(FAILED_COPY_CLASS_NAME);
|
||||
clock.uninstall();
|
||||
|
||||
@@ -12,7 +12,6 @@ ng_project(
|
||||
],
|
||||
visibility = [
|
||||
"//adev/shared-docs/components:__pkg__",
|
||||
"//adev/shared-docs/components/copy-link-anchor:__pkg__",
|
||||
"//adev/shared-docs/components/copy-source-code-button:__pkg__",
|
||||
"//adev/shared-docs/components/navigation-list:__pkg__",
|
||||
"//adev/shared-docs/components/table-of-contents:__pkg__",
|
||||
|
||||
@@ -1,33 +1,23 @@
|
||||
<ng-template
|
||||
#navigationList
|
||||
let-navigationItems
|
||||
let-preserveOtherCategoryOrder="preserveOtherCategoryOrder"
|
||||
>
|
||||
<ng-template #navigationList let-navigationItems>
|
||||
<ul
|
||||
class="docs-navigation-list docs-faceted-list"
|
||||
[class.docs-navigation-list-dropdown]="isDropdownView()"
|
||||
>
|
||||
@for (itemGroup of groupItems(navigationItems, preserveOtherCategoryOrder); track $index) {
|
||||
@for (itemGroup of groupItems(navigationItems); track $index) {
|
||||
@let groupLabel = itemGroup[0];
|
||||
@let items = itemGroup[1];
|
||||
@let firstItem = items[0];
|
||||
|
||||
@if (groupLabel && collapsableLevel() !== firstItem.level && items.length > 1) {
|
||||
<li class="docs-navigation-group">{{ groupLabel }}</li>
|
||||
@if (groupLabel) {
|
||||
<li class="docs-navigation-group">{{groupLabel | titlecase}}</li>
|
||||
}
|
||||
@for (item of items; track $index) {
|
||||
<li
|
||||
class="docs-faceted-list-item"
|
||||
[class.single-entry]="items.length === 1 && item.level !== 1"
|
||||
>
|
||||
@let itemLabel = item.label!;
|
||||
<li class="docs-faceted-list-item">
|
||||
@if (item.path) {
|
||||
@if (item.isExternal) {
|
||||
<a
|
||||
[href]="item.path"
|
||||
target="_blank"
|
||||
[matTooltip]="item.label"
|
||||
[matTooltipDisabled]="itemLabel.length < 27"
|
||||
[matTooltipDisabled]="item.label.length < 27"
|
||||
matTooltipPosition="after"
|
||||
[attr.aria-label]="item.label"
|
||||
[matTooltipClass]="'API-tooltip'"
|
||||
@@ -37,6 +27,7 @@
|
||||
class="docs-faceted-list-item-text"
|
||||
>
|
||||
{{ item.label }}
|
||||
<ng-container *ngTemplateOutlet="itemStatus; context: {$implicit: item}" />
|
||||
</span>
|
||||
|
||||
@if (item.children && item.level! > 1 && !item.isExpanded) {
|
||||
@@ -47,21 +38,16 @@
|
||||
<a
|
||||
[routerLink]="'/' + item.path"
|
||||
routerLinkActive="docs-faceted-list-item-active"
|
||||
[routerLinkActiveOptions]="{
|
||||
paths: 'exact',
|
||||
queryParams: 'ignored',
|
||||
matrixParams: 'ignored',
|
||||
fragment: 'ignored',
|
||||
}"
|
||||
[routerLinkActiveOptions]="{ exact: true }"
|
||||
(click)="emitClickOnLink()"
|
||||
[matTooltip]="item.label"
|
||||
[matTooltipDisabled]="itemLabel.length < 27"
|
||||
[matTooltipDisabled]="item.label.length < 27"
|
||||
matTooltipPosition="after"
|
||||
[attr.aria-label]="item.label"
|
||||
[matTooltipClass]="'API-tooltip'"
|
||||
>
|
||||
<span class="docs-faceted-list-item-text">
|
||||
{{ item.label }}
|
||||
{{item.label}}
|
||||
<ng-container *ngTemplateOutlet="itemStatus; context: {$implicit: item}" />
|
||||
</span>
|
||||
|
||||
@@ -76,13 +62,13 @@
|
||||
<div
|
||||
class="docs-secondary-nav-header"
|
||||
[matTooltip]="item.label"
|
||||
[matTooltipDisabled]="itemLabel.length < 27"
|
||||
[matTooltipDisabled]="item.label.length < 27"
|
||||
matTooltipPosition="after"
|
||||
[attr.aria-label]="item.label"
|
||||
[matTooltipClass]="'API-tooltip'"
|
||||
>
|
||||
<span class="docs-faceted-list-item-text">
|
||||
{{ item.label }}
|
||||
{{item.label}}
|
||||
<ng-container *ngTemplateOutlet="itemStatus; context: {$implicit: item}" />
|
||||
</span>
|
||||
</div>
|
||||
@@ -90,8 +76,7 @@
|
||||
|
||||
<!-- Nav Button Expand/Collapse -->
|
||||
@if (
|
||||
(item.children && item.level === expandableLevel()) ||
|
||||
item.level === collapsableLevel()
|
||||
(item.children && item.level === expandableLevel()) || item.level === collapsableLevel()
|
||||
) {
|
||||
<button
|
||||
type="button"
|
||||
@@ -103,10 +88,9 @@
|
||||
[class.docs-expanded-button]="item.children && item.level == collapsableLevel()"
|
||||
[class.docs-not-expanded-button]="item.children && item.level === expandableLevel()"
|
||||
[class.docs-nav-item-has-icon]="
|
||||
item.children && item.level === expandableLevel() && !item.isExpanded
|
||||
"
|
||||
item.children && item.level === expandableLevel() && !item.isExpanded"
|
||||
[matTooltip]="item.label"
|
||||
[matTooltipDisabled]="itemLabel.length < 27"
|
||||
[matTooltipDisabled]="item.label.length < 27"
|
||||
matTooltipPosition="after"
|
||||
[attr.aria-label]="item.label"
|
||||
[matTooltipClass]="'API-tooltip'"
|
||||
@@ -121,21 +105,9 @@
|
||||
</button>
|
||||
}
|
||||
}
|
||||
@if (
|
||||
item.level &&
|
||||
displayItemsToLevel() > item.level &&
|
||||
item.children &&
|
||||
item.children.length > 0
|
||||
) {
|
||||
@if (displayItemsToLevel() > item.level && item.children?.length > 0) {
|
||||
<ng-container
|
||||
*ngTemplateOutlet="
|
||||
navigationList;
|
||||
context: {
|
||||
$implicit: item.children,
|
||||
level: item.level,
|
||||
preserveOtherCategoryOrder: item.preserveOtherCategoryOrder,
|
||||
}
|
||||
"
|
||||
*ngTemplateOutlet="navigationList; context: {$implicit: item.children, level: item.level}"
|
||||
/>
|
||||
}
|
||||
</li>
|
||||
@@ -144,15 +116,7 @@
|
||||
</ul>
|
||||
</ng-template>
|
||||
|
||||
<ng-container
|
||||
*ngTemplateOutlet="
|
||||
navigationList;
|
||||
context: {
|
||||
$implicit: navigationItems(),
|
||||
preserveOtherCategoryOrder: preserveOtherCategoryOrder(),
|
||||
}
|
||||
"
|
||||
/>
|
||||
<ng-container *ngTemplateOutlet="navigationList; context: {$implicit: navigationItems()}" />
|
||||
|
||||
<ng-template let-item #itemStatus>
|
||||
@if (item.status === 'new') {
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
max-width: calc(100% - 1rem);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
.docs-nav-item-has-icon {
|
||||
@@ -194,7 +193,3 @@ a,
|
||||
margin-top: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.single-entry:not(:first-child) {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user