Skip to content

Commit 08e2798

Browse files
author
Codacy Archive
committed
snapshot 2025-10-31T01:48:52.013389+00:00
0 parents  commit 08e2798

File tree

9,188 files changed

+1467203
-0
lines changed

Some content is hidden

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

9,188 files changed

+1467203
-0
lines changed

.bazelignore

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Bazel does not yet support wildcards or other .gitignore semantics for
2+
# .bazelignore. Two issues for this feature request are outstanding:
3+
# https://github.com/bazelbuild/bazel/issues/7093
4+
# https://github.com/bazelbuild/bazel/issues/8106
5+
.git
6+
node_modules
7+
dist/
8+
9+
# All integration test node_modules folders
10+
integration/animations/node_modules
11+
integration/animations-async/node_modules
12+
integration/cli-elements-universal/node_modules
13+
integration/cli-hello-world/node_modules
14+
integration/cli-hello-world-ivy-i18n/node_modules
15+
integration/cli-hello-world-lazy/node_modules
16+
integration/cli-hello-world-mocha/node_modules
17+
integration/cli-signal-inputs/node_modules
18+
integration/defer/node_modules
19+
integration/dynamic-compiler/node_modules
20+
integration/forms/node_modules
21+
integration/injectable-def/node_modules
22+
integration/ivy-i18n/node_modules
23+
integration/ng_elements/node_modules
24+
integration/ng_update/node_modules
25+
integration/ng_update_migrations/node_modules
26+
integration/ng-add-localize/node_modules
27+
integration/no_ts_linker/node_modules
28+
integration/nodenext_resolution/node_modules
29+
integration/platform-server/node_modules
30+
integration/platform-server-zoneless/node_modules
31+
integration/platform-server-hydration/node_modules
32+
integration/service-worker-schema/node_modules
33+
integration/side-effects/node_modules
34+
integration/standalone-bootstrap/node_modules
35+
integration/terser/node_modules
36+
integration/trusted-types/node_modules
37+
integration/typings_test_rxjs7/node_modules
38+
integration/legacy-animations/node_modules
39+
integration/legacy-animations-async/node_modules
40+
integration/typings_test_ts59/node_modules
41+
modules/ssr-benchmarks/node_modules
42+
vscode-ng-language-service/integration/project/dist/
43+
44+
# For rules_js
45+
adev/node_modules
46+
adev/shared-docs/node_modules
47+
adev/shared-docs/pipeline/api-gen/node_modules
48+
modules/node_modules
49+
integration/node_modules
50+
packages/animations/node_modules
51+
packages/common/node_modules
52+
packages/localize/node_modules
53+
packages/compiler-cli/node_modules
54+
packages/compiler-cli/linker/babel/test/node_modules
55+
packages/compiler/node_modules
56+
packages/core/node_modules
57+
packages/core/test/bundling/node_modules
58+
packages/elements/node_modules
59+
packages/forms/node_modules
60+
packages/language-service/node_modules
61+
packages/platform-browser/node_modules
62+
packages/platform-server/node_modules
63+
packages/platform-browser-dynamic/node_modules
64+
packages/router/node_modules
65+
packages/zone.js/node_modules
66+
packages/zone.js/test/typings/node_modules
67+
packages/upgrade/node_modules
68+
packages/benchpress/node_modules
69+
packages/service-worker/node_modules
70+
packages/zone.js/test/typings/node_modules
71+
packages/zone.js/node_modules
72+
tools/bazel/rules_angular_store/node_modules
73+
vscode-ng-language-service/node_modules
74+
vscode-ng-language-service/server/node_modules
75+
vscode-ng-language-service/integration/pre_standalone_project/node_modules
76+
vscode-ng-language-service/integration/project/node_modules

.bazelrc

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# Enable debugging tests with --config=debug
2+
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results --strategy=TestRunner=standalone
3+
4+
# Do not attempt to de-flake locally.
5+
# On CI we might set this to `3` to run with deflaking.
6+
test --flaky_test_attempts=1
7+
8+
# Required by `rules_ts`.
9+
common --@aspect_rules_ts//ts:skipLibCheck=always
10+
common --@aspect_rules_ts//ts:default_to_tsc_transpiler
11+
12+
# Needed as otherwise `env` of TS actions would be ignored.
13+
common --incompatible_merge_fixed_and_default_shell_env
14+
15+
# Frozen lockfile
16+
common --lockfile_mode=error
17+
18+
###############################
19+
# Filesystem interactions #
20+
###############################
21+
22+
# Create symlinks in the project:
23+
# - dist/bin for outputs
24+
# - dist/testlogs, dist/genfiles
25+
# - bazel-out
26+
# NB: bazel-out should be excluded from the editor configuration.
27+
# The checked-in /.vscode/settings.json does this for VSCode.
28+
# Other editors may require manual config to ignore this directory.
29+
# In the past, we say a problem where VSCode traversed a massive tree, opening file handles and
30+
# eventually a surprising failure with auto-discovery of the C++ toolchain in
31+
# MacOS High Sierra.
32+
# See https://github.com/bazelbuild/bazel/issues/4603
33+
build --symlink_prefix=dist/
34+
35+
# Turn off legacy external runfiles
36+
build --nolegacy_external_runfiles
37+
run --nolegacy_external_runfiles
38+
test --nolegacy_external_runfiles
39+
40+
# Turn on --incompatible_strict_action_env which was on by default
41+
# in Bazel 0.21.0 but turned off again in 0.22.0. Follow
42+
# https://github.com/bazelbuild/bazel/issues/7026 for more details.
43+
# This flag is needed to so that the bazel cache is not invalidated
44+
# when running bazel via `pnpm bazel`.
45+
# See https://github.com/angular/angular/issues/27514.
46+
build --incompatible_strict_action_env
47+
run --incompatible_strict_action_env
48+
test --incompatible_strict_action_env
49+
50+
# Do not build runfile trees by default. If an execution strategy relies on runfile
51+
# symlink teee, the tree is created on-demand. See: https://github.com/bazelbuild/bazel/issues/6627
52+
# and https://github.com/bazelbuild/bazel/commit/03246077f948f2790a83520e7dccc2625650e6df
53+
build --nobuild_runfile_links
54+
55+
build --enable_runfiles
56+
57+
###############################
58+
# Release support #
59+
# Turn on these settings with #
60+
# --config=release #
61+
###############################
62+
63+
# Releases should always be stamped with version control info
64+
# This command assumes node on the path and is a workaround for
65+
# https://github.com/bazelbuild/bazel/issues/4802
66+
build:release --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=release"
67+
build:release --stamp
68+
69+
# Snapshots should also be stamped with version control information.
70+
build:snapshot-build --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=snapshot"
71+
build:snapshot-build --stamp
72+
# @angular/language-server package depends directly on other Angular framework packages.
73+
# This flag ensures that the language server uses the snapshot-built framework packages from the repository.
74+
build:snapshot-build --//:enable_language_server_snapshot_repo_deps
75+
76+
# Angular DevTools for Firefox releases *cannot* be stamped and `--config snapshot-build-firefox` is a no-op.
77+
# This is because Mozilla requires add-on source code to be uploaded and then they manually reproduce the build.
78+
# If we stamp the build based on Git information such as the current commit, then reproducing the build would require
79+
# uploading the entire `.git` directory. We already must upload the entire monorepo, and uploading `.git` as well
80+
# exceeds the max source file size. To address this, we just *don't* stamp Firefox builds of Angular DevTools.
81+
build:snapshot-build-firefox --nostamp
82+
83+
###############################
84+
# Output #
85+
###############################
86+
87+
# A more useful default output mode for bazel query
88+
# Prints eg. "ng_module rule //foo:bar" rather than just "//foo:bar"
89+
query --output=label_kind
90+
91+
# By default, failing tests don't print any output, it goes to the log file
92+
test --test_output=errors
93+
94+
##################################
95+
# Remote Build Execution support #
96+
# Turn on these settings with #
97+
# --config=remote #
98+
##################################
99+
100+
# The following --define=EXECUTOR=remote will be able to be removed
101+
# once https://github.com/bazelbuild/bazel/issues/7254 is fixed
102+
build:remote --define=EXECUTOR=remote
103+
104+
# Set a higher timeout value, just in case.
105+
build:remote --remote_timeout=600
106+
107+
# Bazel detects maximum number of jobs based on host resources.
108+
# Since we run remotely, we can increase this number significantly.
109+
common:remote --jobs=200
110+
111+
build:remote --google_default_credentials
112+
113+
# Force remote exeuctions to consider the entire run as linux
114+
build:remote --cpu=k8
115+
build:remote --host_cpu=k8
116+
117+
# Toolchain and platform related flags
118+
build:remote --extra_execution_platforms=@devinfra//bazel/remote-execution:platform_with_network
119+
build:remote --host_platform=@devinfra//bazel/remote-execution:platform_with_network
120+
build:remote --platforms=@devinfra//bazel/remote-execution:platform_with_network
121+
122+
# Remote instance and caching
123+
build:remote --remote_instance_name=projects/internal-200822/instances/primary_instance
124+
build:remote --bes_instance_name=internal-200822
125+
build:remote --remote_cache=remotebuildexecution.googleapis.com
126+
build:remote --remote_executor=remotebuildexecution.googleapis.com
127+
build:remote --remote_upload_local_results=false
128+
129+
build:remote --remote_grpc_log=/tmp/rbe-grpc.log
130+
131+
# See: https://docs.google.com/document/d/1NgDPsCIwprDdqC1zj0qQrh5KGK2hQTSTux1DAvi4rSc/edit?tab=t.0.
132+
build:remote --experimental_remote_execution_keepalive
133+
134+
# Use HTTP remote cache
135+
build:remote-cache --remote_cache=https://storage.googleapis.com/angular-team-cache
136+
build:remote-cache --remote_accept_cached=true
137+
build:remote-cache --remote_upload_local_results=false
138+
build:remote-cache --google_default_credentials
139+
140+
# Additional flags added when running a "trusted build" with additional access
141+
build:trusted-build --remote_upload_local_results=true
142+
143+
# Ensure that tags like "no-remote-exec" get propagated to actions created by rules,
144+
# even if the rule implementation does not explicitly pass them to the execution requirements.
145+
# https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation
146+
common --experimental_allow_tags_propagation
147+
148+
# Disable network access in the sandbox by default. To enable network access
149+
# for a particular target, use:
150+
#
151+
# load("@devinfra//bazel/remote-execution:index.bzl", "ENABLE_NETWORK")
152+
# my_target(
153+
# ...,
154+
# exec_properties = ENABLE_NETWORK, # Enables network in remote exec
155+
# tags = ["requires-network"] # Enables network in sandbox
156+
# )
157+
build --nosandbox_default_allow_network
158+
159+
##################################
160+
# Saucelabs tests settings #
161+
# Turn on these settings with #
162+
# --config=saucelabs #
163+
##################################
164+
165+
# For saucelabs tests we don't want to enable flaky test attempts. Karma has its own integrated
166+
# retry mechanism and we do not want to retry unnecessarily if Karma already tried multiple times.
167+
test:saucelabs --flaky_test_attempts=1
168+
169+
################
170+
# Flag Aliases #
171+
################
172+
173+
# --ng_perf will ask the Ivy compiler to produce performance results for each build.
174+
build --flag_alias=ng_perf=//packages/compiler-cli:ng_perf
175+
176+
####################################################
177+
# User bazel configuration
178+
# NOTE: This needs to be the *last* entry in the config.
179+
####################################################
180+
181+
# Load any settings which are specific to the current user. Needs to be *last* statement
182+
# in this config, as the user configuration should be able to overwrite flags from this file.
183+
try-import %workspace%/.bazelrc.user

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.6.2

.clang-format

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Language: JavaScript
2+
BasedOnStyle: Google
3+
ColumnLimit: 100

.devcontainer/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# VSCode Remote Development - Developing inside a Container
2+
3+
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).
4+
5+
Info on remote development and developing inside a container with VSCode:
6+
- [VSCode: Remote Development](https://code.visualstudio.com/docs/remote/remote-overview)
7+
- [VSCode: Developing inside a Container](https://code.visualstudio.com/docs/remote/containers)
8+
- [VSCode: Remote Development FAQ](https://code.visualstudio.com/docs/remote/faq)
9+
10+
11+
## Usage
12+
13+
_Prerequisite: [Install Docker](https://docs.docker.com/install) on your local environment._
14+
15+
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.
16+
17+
In a nutshell, you need to:
18+
- Install the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension.
19+
- Copy [recommended-Dockerfile](./recommended-Dockerfile) to `Dockerfile` (and optionally tweak to suit your needs).
20+
- Copy [recommended-devcontainer.json](./recommended-devcontainer.json) to `devcontainer.json` (and optionally tweak to suit your needs).
21+
- Open VSCode and bring up the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette).
22+
- Type `Remote-Containers: Open Folder in Container` and choose your local clone of [angular/angular](https://github.com/angular/angular).
23+
24+
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).
25+
26+
27+
## Updating `recommended-devcontainer.json` and `recommended-Dockerfile`
28+
29+
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.
30+
31+
Please, keep in mind that any changes you make will potentially be used by many people on different environments. Try to keep these config files cross-platform compatible and free of personal preferences.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Image metadata and config.
2+
# Ideally, the Node.js version should match what we use on CI.
3+
FROM cimg/node:18.13.0@sha256:45d0ee279f522c4562a464df71108104cc9b2187205333ffd0707d4f05589731
4+
5+
6+
LABEL name="Angular dev environment" \
7+
description="This image can be used to create a dev environment for building Angular." \
8+
vendor="angular" \
9+
version="1.0"
10+
11+
EXPOSE 4000 4200 4433 5000 8080 9876
12+
13+
14+
# Switch to `root`.
15+
USER root
16+
17+
18+
# Configure `Node.js`/`npm`.
19+
RUN npm config --global set user root
20+
21+
22+
# Go! (And keep going.)
23+
CMD ["tail", "--follow", "/dev/null"]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Reference: https://code.visualstudio.com/docs/remote/containers#_devcontainerjson-reference
2+
{
3+
"name": "Angular dev container",
4+
"dockerFile": "Dockerfile",
5+
"appPort": [4000, 4200, 4433, 5000, 8080, 9876],
6+
"postCreateCommand": "pnpm install",
7+
"extensions": [
8+
"devondcarew.bazel-code",
9+
"ms-vscode.vscode-typescript-tslint-plugin"
10+
],
11+
}

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# https://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
insert_final_newline = false
15+
trim_trailing_whitespace = false

.gemini/config.yaml

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

0 commit comments

Comments
 (0)