diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx b/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx
deleted file mode 100755
index 69ba423fce1..00000000000
--- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx
+++ /dev/null
@@ -1,32 +0,0 @@
-# @generated
-# Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml").
-# This file should be checked into version control along with the pnpm-lock.yaml file.
-.npmrc=-1406867100
-.pnpmfile.cjs=-562808090
-adev/package.json=1217761867
-adev/shared-docs/package.json=735765359
-adev/shared-docs/pipeline/api-gen/package.json=939673974
-integration/package.json=-239561259
-modules/package.json=-440211647
-package.json=-1964085731
-packages/animations/package.json=-678724831
-packages/benchpress/package.json=-1908328724
-packages/common/package.json=1729763064
-packages/compiler-cli/linker/babel/test/package.json=939673974
-packages/compiler-cli/package.json=1178475833
-packages/compiler/package.json=1190056499
-packages/core/package.json=1154833122
-packages/core/test/bundling/package.json=-1323505630
-packages/elements/package.json=-892969618
-packages/forms/package.json=-877154917
-packages/localize/package.json=-1162087867
-packages/platform-browser-dynamic/package.json=1901947880
-packages/platform-browser/package.json=-1163479450
-packages/platform-server/package.json=-737662753
-packages/router/package.json=860819913
-packages/upgrade/package.json=16347051
-pnpm-lock.yaml=1278205383
-pnpm-workspace.yaml=1065599792
-tools/bazel/rules_angular_store/package.json=-239561259
-tools/pnpm-patches/dagre-d3-es+7.0.11.patch=-904066270
-yarn.lock=-513575863
diff --git a/.bazelignore b/.bazelignore
index 87054a797ae..6c19ecb141a 100644
--- a/.bazelignore
+++ b/.bazelignore
@@ -62,4 +62,5 @@ packages/router/node_modules
packages/zone.js/node_modules
packages/upgrade/node_modules
packages/benchpress/node_modules
+packages/service-worker/node_modules
tools/bazel/rules_angular_store/node_modules
diff --git a/.bazelrc b/.bazelrc
index 36974ebfa6c..3c0d4583f82 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -38,7 +38,7 @@ test --nolegacy_external_runfiles
# in Bazel 0.21.0 but turned off again in 0.22.0. Follow
# https://github.com/bazelbuild/bazel/issues/7026 for more details.
# This flag is needed to so that the bazel cache is not invalidated
-# when running bazel via `yarn bazel`.
+# when running bazel via `pnpm bazel`.
# See https://github.com/angular/angular/issues/27514.
build --incompatible_strict_action_env
run --incompatible_strict_action_env
@@ -60,11 +60,11 @@ build --enable_runfiles
# Releases should always be stamped with version control info
# This command assumes node on the path and is a workaround for
# https://github.com/bazelbuild/bazel/issues/4802
-build:release --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=release"
+build:release --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=release"
build:release --stamp
# Snapshots should also be stamped with version control information.
-build:snapshot-build --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=snapshot"
+build:snapshot-build --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=snapshot"
build:snapshot-build --stamp
# Angular DevTools for Firefox releases *cannot* be stamped and `--config snapshot-build-firefox` is a no-op.
diff --git a/.devcontainer/recommended-devcontainer.json b/.devcontainer/recommended-devcontainer.json
index 32513341983..03a2e3b5d79 100644
--- a/.devcontainer/recommended-devcontainer.json
+++ b/.devcontainer/recommended-devcontainer.json
@@ -3,7 +3,7 @@
"name": "Angular dev container",
"dockerFile": "Dockerfile",
"appPort": [4000, 4200, 4433, 5000, 8080, 9876],
- "postCreateCommand": "yarn install",
+ "postCreateCommand": "pnpm install",
"extensions": [
"devondcarew.bazel-code",
"ms-vscode.vscode-typescript-tslint-plugin"
diff --git a/.github/actions/saucelabs-legacy/action.yml b/.github/actions/saucelabs-legacy/action.yml
index c72dd5c6d78..267ef4ed3f8 100644
--- a/.github/actions/saucelabs-legacy/action.yml
+++ b/.github/actions/saucelabs-legacy/action.yml
@@ -34,7 +34,7 @@ runs:
run: ./tools/saucelabs/sauce-service.sh ready-wait
- name: Running tests on Saucelabs.
shell: bash
- run: KARMA_WEB_TEST_MODE=SL_REQUIRED yarn karma start ./karma-js.conf.js --single-run
+ run: KARMA_WEB_TEST_MODE=SL_REQUIRED pnpm karma start ./karma-js.conf.js --single-run
- name: Stop Saucelabs tunnel service
shell: bash
run: ./tools/saucelabs/sauce-service.sh stop
diff --git a/.github/actions/yarn-install/action.yml b/.github/actions/yarn-install/action.yml
deleted file mode 100644
index 7e08f912566..00000000000
--- a/.github/actions/yarn-install/action.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-name: 'Installing Yarn dependencies'
-description: 'Installs the dependencies using Yarn'
-
-runs:
- using: 'composite'
- steps:
- - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
- with:
- path: |
- ./node_modules/
- # If just `WORKSPACE` or `yarn.lock` is changed, the most recent cache can be restored.
- # See: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action.
- key: v1-angular-main-deps-${{hashFiles('WORKSPACE')}}-${{hashFiles('yarn.lock')}}
- restore-keys: v1-angular-main-deps-
-
- - run: yarn install --frozen-lockfile --non-interactive
- shell: bash
diff --git a/.github/workflows/adev-preview-build.yml b/.github/workflows/adev-preview-build.yml
index 177a820a39f..cd28e5d409a 100644
--- a/.github/workflows/adev-preview-build.yml
+++ b/.github/workflows/adev-preview-build.yml
@@ -27,9 +27,9 @@ jobs:
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- name: Build adev to ensure it continues to work
- run: yarn bazel build //adev:build --full_build_adev --config=release
+ run: pnpm bazel build //adev:build --full_build_adev --config=release
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
workflow-artifact-name: 'adev-preview'
diff --git a/.github/workflows/benchmark-compare.yml b/.github/workflows/benchmark-compare.yml
index 055441067b7..eb45c5a433e 100644
--- a/.github/workflows/benchmark-compare.yml
+++ b/.github/workflows/benchmark-compare.yml
@@ -36,7 +36,7 @@ jobs:
# that the action was triggered by a team member.
ref: ${{steps.comment-branch.outputs.head_ref}}
- - uses: ./.github/actions/yarn-install
+ - run: pnpm install --frozen-lockfile
- uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
@@ -47,9 +47,9 @@ jobs:
env:
# Untrusted input used in an executable code, must be wrapped as an env var to prevent injections
COMMENT_BODY: ${{ github.event.comment.body }}
- run: yarn benchmarks prepare-for-github-action "$COMMENT_BODY"
+ run: pnpm benchmarks prepare-for-github-action "$COMMENT_BODY"
- - run: yarn benchmarks run-compare ${{steps.info.outputs.compareSha}} ${{steps.info.outputs.benchmarkTarget}}
+ - run: pnpm benchmarks run-compare ${{steps.info.outputs.compareSha}} ${{steps.info.outputs.benchmarkTarget}}
id: benchmark
name: Running benchmark
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 049a11f45fe..c7690192988 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -25,17 +25,17 @@ jobs:
with:
cache-node-modules: true
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- name: Check code lint
- run: yarn -s tslint
+ run: pnpm tslint
- name: Check for circular dependencies
- run: yarn -s ts-circular-deps:check
+ run: pnpm ts-circular-deps:check
- name: Validate pull approve configuration
- run: yarn -s ng-dev pullapprove verify
+ run: pnpm ng-dev pullapprove verify
- name: Validate angular robot configuration
- run: yarn -s ng-dev ngbot verify
+ run: pnpm ng-dev ngbot verify
- name: Confirm code builds with typescript as expected
- run: yarn -s check-tooling-setup
+ run: pnpm check-tooling-setup
devtools:
runs-on: ubuntu-latest
@@ -51,11 +51,11 @@ jobs:
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- name: Run unit tests
- run: yarn devtools:test
+ run: pnpm devtools:test
- name: Test build
- run: yarn devtools:build:chrome
+ run: pnpm devtools:build:chrome
test:
runs-on: ubuntu-latest-4core
@@ -71,9 +71,9 @@ jobs:
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
- run: yarn install --frozen-lockfile --network-timeout 100000
+ run: pnpm install --frozen-lockfile
- name: Run CI tests for framework
- run: yarn test:ci
+ run: pnpm test:ci
integration-tests:
runs-on: ubuntu-latest-4core
@@ -89,9 +89,9 @@ jobs:
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
- run: yarn install --frozen-lockfile --network-timeout 100000
+ run: pnpm install --frozen-lockfile
- name: Run integration CI tests for framework
- run: yarn integration-tests:ci
+ run: pnpm integration-tests:ci
adev:
runs-on:
@@ -106,11 +106,11 @@ jobs:
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- name: Run tests
- run: yarn bazel test //adev/...
+ run: pnpm bazel test //adev/...
- name: Build adev in fast mode to ensure it continues to work
- run: yarn bazel build //adev:build --config=release
+ run: pnpm bazel build //adev:build --config=release
publish-snapshots:
runs-on:
@@ -125,9 +125,9 @@ jobs:
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials
- - run: yarn build
+ - run: pnpm build
- run: ./scripts/ci/publish-build-artifacts.sh
zone-js:
@@ -149,9 +149,9 @@ jobs:
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- run: |
- yarn bazel build \
+ pnpm bazel build \
//packages/zone.js/bundles:zone.umd.js \
//packages/zone.js:npm_package \
//packages/zone.js/test/closure:closure
@@ -169,15 +169,14 @@ jobs:
cp dist/bin/packages/zone.js/test/closure/zone.closure.js ./packages/zone.js/build/test/zone.closure.mjs
# Install
- - run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
+ - run: pnpm -C packages/zone.js install --frozen-lockfile
# Run zone.js tools tests
- - run: yarn --cwd packages/zone.js promisefinallytest
- - run: yarn --cwd packages/zone.js jest:test
- - run: yarn --cwd packages/zone.js jest:nodetest
- - run: yarn --cwd packages/zone.js vitest:test
- - run: yarn --cwd packages/zone.js electrontest
- - run: yarn --cwd packages/zone.js/test/typings install --frozen-lockfile --non-interactive
- - run: yarn --cwd packages/zone.js/test/typings test
+ - run: pnpm -C packages/zone.js promisefinallytest
+ - run: pnpm -C packages/zone.js jest:test
+ - run: pnpm -C packages/zone.js jest:nodetest
+ - run: pnpm -C packages/zone.js vitest:test
+ - run: pnpm -C packages/zone.js electrontest
+ - run: pnpm -C packages/zone.js/test/typings test
# saucelabs:
# runs-on: ubuntu-latest-4core
@@ -189,7 +188,7 @@ jobs:
# with:
# cache-node-modules: true
# - name: Install node modules
- # run: yarn install --frozen-lockfile
+ # run: pnpm install --frozen-lockfile
# - uses: ./.github/actions/saucelabs-legacy
adev-deploy:
@@ -204,9 +203,9 @@ jobs:
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- name: Build adev to ensure it continues to work
- run: yarn bazel build //adev:build --full_build_adev --config=release
+ run: pnpm bazel build //adev:build --full_build_adev --config=release
- name: Deploy to firebase
uses: ./.github/actions/deploy-docs-site
with:
diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml
index 7f50c628354..01e35fdf72c 100644
--- a/.github/workflows/manual.yml
+++ b/.github/workflows/manual.yml
@@ -17,7 +17,7 @@ jobs:
with:
cache-node-modules: true
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Setup Bazel Remote Caching
@@ -25,10 +25,10 @@ jobs:
- name: Setup Saucelabs Variables
uses: angular/dev-infra/github-actions/saucelabs@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Set up Sauce Tunnel Daemon
- run: yarn bazel run //tools/saucelabs-daemon/background-service -- $JOBS &
+ run: pnpm bazel run //tools/saucelabs-daemon/background-service -- $JOBS &
env:
SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
- name: Run all saucelabs bazel tests
run: |
TESTS=$(./node_modules/.bin/bazelisk query --output label '(kind(karma_web_test, ...) intersect attr("tags", "saucelabs", ...)) except attr("tags", "fixme-saucelabs", ...)')
- yarn bazel test --config=saucelabs --jobs=$JOBS ${TESTS}
+ pnpm bazel test --config=saucelabs --jobs=$JOBS ${TESTS}
diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml
index 610bb771016..578064b0795 100644
--- a/.github/workflows/perf.yml
+++ b/.github/workflows/perf.yml
@@ -23,9 +23,9 @@ jobs:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Install node modules
- run: yarn -s install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- id: workflows
- run: echo "workflows=$(yarn -s ng-dev perf workflows --list)" >> "$GITHUB_OUTPUT"
+ run: echo "workflows=$(pnpm ng-dev perf workflows --list)" >> "$GITHUB_OUTPUT"
workflow:
timeout-minutes: 30
@@ -40,7 +40,7 @@ jobs:
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Install node modules
- run: yarn -s install --frozen-lockfile
+ 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:
@@ -50,4 +50,4 @@ jobs:
project_id: 'internal-200822'
workload_identity_provider: 'projects/823469418460/locations/global/workloadIdentityPools/measurables-tracking/providers/angular'
service_account: 'measures-uploader@internal-200822.iam.gserviceaccount.com'
- - run: yarn ng-dev perf workflows --name ${{ matrix.workflow }} --commit-sha ${{github.sha}}
+ - run: pnpm ng-dev perf workflows --name ${{ matrix.workflow }} --commit-sha ${{github.sha}}
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index b92388ebaf6..736dfe24815 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -23,21 +23,21 @@ jobs:
with:
cache-node-modules: true
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- name: Check code lint
- run: yarn -s tslint
+ run: pnpm tslint
- name: Check for circular dependencies
- run: yarn -s ts-circular-deps:check
+ run: pnpm ts-circular-deps:check
- name: Validate pull approve configuration
- run: yarn -s ng-dev pullapprove verify
+ run: pnpm ng-dev pullapprove verify
- name: Validate angular robot configuration
- run: yarn -s ng-dev ngbot verify
+ run: pnpm ng-dev ngbot verify
- name: Confirm code builds with typescript as expected
- run: yarn -s check-tooling-setup
+ run: pnpm check-tooling-setup
- name: Check commit message
- run: yarn ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
+ run: pnpm ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
- name: Check code format
- run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
+ 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@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
@@ -55,11 +55,11 @@ jobs:
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- name: Run unit tests
- run: yarn devtools:test
+ run: pnpm devtools:test
- name: Test build
- run: yarn devtools:build:chrome
+ run: pnpm devtools:build:chrome
test:
runs-on: ubuntu-latest-8core
@@ -73,12 +73,12 @@ jobs:
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Install node modules
- run: yarn install --frozen-lockfile --network-timeout 100000
+ run: pnpm install --frozen-lockfile
- name: Run CI tests for framework
- run: yarn test:ci
+ run: pnpm test:ci
env:
# Ensures Aspect lock files are up-to-date.
- # TODO(devversion): Remove when removing yarn.
+ # TODO(devversion): Remove when removing pnpm.
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
- name: Upload GRPC logs (for debugging of RBE issues)
if: always()
@@ -99,9 +99,9 @@ jobs:
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Install node modules
- run: yarn install --frozen-lockfile --network-timeout 100000
+ run: pnpm install --frozen-lockfile
- name: Run integration CI tests for framework
- run: yarn integration-tests:ci
+ run: pnpm integration-tests:ci
adev:
runs-on:
@@ -114,11 +114,11 @@ jobs:
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- name: Run tests
- run: yarn bazel test //adev/...
+ run: pnpm bazel test //adev/...
- name: Build adev in fast mode to ensure it continues to work
- run: yarn bazel build //adev:build --config=release
+ run: pnpm bazel build //adev:build --config=release
zone-js:
runs-on:
@@ -137,9 +137,9 @@ jobs:
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Install node modules
- run: yarn install --frozen-lockfile
+ run: pnpm install --frozen-lockfile
- run: |
- yarn bazel build \
+ pnpm bazel build \
//packages/zone.js/bundles:zone.umd.js \
//packages/zone.js:npm_package \
//packages/zone.js/test/closure:closure
@@ -157,15 +157,14 @@ jobs:
cp dist/bin/packages/zone.js/test/closure/zone.closure.js ./packages/zone.js/build/test/zone.closure.mjs
# Install
- - run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
+ - run: pnpm -C packages/zone.js install --frozen-lockfile
# Run zone.js tools tests
- - run: yarn --cwd packages/zone.js promisefinallytest
- - run: yarn --cwd packages/zone.js jest:test
- - run: yarn --cwd packages/zone.js jest:nodetest
- - run: yarn --cwd packages/zone.js vitest:test
- - run: yarn --cwd packages/zone.js electrontest
- - run: yarn --cwd packages/zone.js/test/typings install --frozen-lockfile --non-interactive
- - run: yarn --cwd packages/zone.js/test/typings test
+ - run: pnpm -C packages/zone.js promisefinallytest
+ - run: pnpm -C packages/zone.js jest:test
+ - run: pnpm -C packages/zone.js jest:nodetest
+ - run: pnpm -C packages/zone.js vitest:test
+ - run: pnpm -C packages/zone.js electrontest
+ - run: pnpm -C packages/zone.js/test/typings test
# saucelabs:
# runs-on: ubuntu-latest-4core
@@ -177,5 +176,5 @@ jobs:
# with:
# cache-node-modules: true
# - name: Install node modules
- # run: yarn install --frozen-lockfile
+ # run: pnpm install --frozen-lockfile
# - uses: ./.github/actions/saucelabs-legacy
diff --git a/.husky/commit-msg b/.husky/commit-msg
index 722ef5a097a..70f42fbe6cb 100755
--- a/.husky/commit-msg
+++ b/.husky/commit-msg
@@ -1,6 +1,6 @@
set +e
-yarn -s ng-dev commit-message pre-commit-validate --file $1 2>/dev/null
+pnpm --silent ng-dev commit-message pre-commit-validate --file $1 2>/dev/null
if [ $? -ne 0 ]; then
echo "WARNING: failed to run commit message validation (ng-dev commit-mesage pre-commit-validate)"
fi
diff --git a/.husky/pre-commit b/.husky/pre-commit
index 858fdf5d9da..68912c3fb11 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,6 +1,6 @@
set +e
-yarn -s ng-dev format staged 2>/dev/null
+pnpm --silent ng-dev format staged 2>/dev/null
if [ $? -ne 0 ]; then
echo "WARNING: failed to run file formatting (ng-dev format staged)"
fi
diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg
index 44b7a18accc..75e7adc6192 100755
--- a/.husky/prepare-commit-msg
+++ b/.husky/prepare-commit-msg
@@ -1,6 +1,6 @@
set +e
-yarn -s ng-dev commit-message restore-commit-message-draft $1 $2 2>/dev/null
+pnpm --silent ng-dev commit-message restore-commit-message-draft $1 $2 2>/dev/null
if [ $? -ne 0 ]; then
echo "WARNING: failed to attempt to restore commit message draft (ng-dev commit-message restore-commit-message-draft)"
fi
diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs
index 49f79b5d57b..9d860b39719 100644
--- a/.pnpmfile.cjs
+++ b/.pnpmfile.cjs
@@ -1,25 +1,23 @@
-function readPackage(pkg, context) {
- // TODO(devversion): This exists temporarily during migration as we can't have `workspace:*` deps
- // in the `package.json` also processed by Yarn
- if (pkg.name === 'angular-srcs') {
- pkg.dependencies = {
- ...pkg.dependencies,
- // These dependencies are added to the workspace root so that peer dependencies
- // are resolved via these locally-built versions. e.g. compiler-cli's peer deps.
- '@angular/compiler': 'workspace:*',
- '@angular/compiler-cli': 'workspace:*',
- '@angular/core': 'workspace:*',
- '@angular/common': 'workspace:*',
- '@angular/router': 'workspace:*',
- '@angular/platform-browser': 'workspace:*',
- '@angular/platform-browser-dynamic': 'workspace:*',
- '@angular/platform-server': 'workspace:*',
- '@angular/forms': 'workspace:*',
- '@angular/elements': 'workspace:*',
- '@angular/animations': 'workspace:*',
- };
- }
+// TODO: Define these packages in a single common location.
+const localAngularPackages = [
+ '@angular/animations',
+ '@angular/common',
+ '@angular/compiler',
+ '@angular/compiler-cli',
+ '@angular/core',
+ '@angular/elements',
+ '@angular/forms',
+ '@angular/language-service',
+ '@angular/localize',
+ '@angular/platform-browser',
+ '@angular/platform-browser-dynamic',
+ '@angular/platform-server',
+ '@angular/router',
+ '@angular/service-worker',
+ '@angular/upgrade',
+];
+function readPackage(pkg, context) {
// TODO(devversion): This allows us to make compiler/TS a production dependency of compiler-cli
// because `rules_js` doesn't otherwise include the dependency in the `npm_package_store`.
// See: https://github.com/aspect-build/rules_js/issues/2226
@@ -42,12 +40,14 @@ function readPackage(pkg, context) {
}
// 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.
- if (version === '0.0.0-PLACEHOLDER') {
+ // 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 (localAngularPackages.includes(key)) {
pkg.dependencies = {
...pkg.dependencies,
[key]: 'workspace: *',
};
+ delete pkg.peerDependencies[key];
}
});
diff --git a/.pullapprove.yml b/.pullapprove.yml
index 16d9a81b53d..ee2de32d1d6 100644
--- a/.pullapprove.yml
+++ b/.pullapprove.yml
@@ -332,12 +332,11 @@ groups:
'packages/examples/{*,.*}',
'scripts/**/{*,.*}',
'third_party/**/{*,.*}',
- 'tools/bazel-repo-patches/**/{*,.*}',
'tools/contributing-stats/**/{*,.*}',
'tools/gulp-tasks/**/{*,.*}',
'tools/legacy-saucelabs/**/{*,.*}',
'tools/manual_api_docs/**/{*,.*}',
- 'tools/npm-patches/**/{*,.*}',
+ 'tools/pnpm-patches/**/{*,.*}',
'tools/rxjs/**/{*,.*}',
'tools/saucelabs-daemon/**/{*,.*}',
'tools/saucelabs/**/{*,.*}',
diff --git a/WORKSPACE b/WORKSPACE
index 18a0de61272..1ff2c9395e6 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -68,30 +68,6 @@ rules_js_register_toolchains(
node_version = NODE_VERSION,
)
-# Download npm dependencies.
-load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
-load("//integration:npm_package_archives.bzl", "npm_package_archives")
-
-yarn_install(
- name = "npm",
- # Note that we add the postinstall scripts here so that the dependencies are re-installed
- # when the postinstall patches are modified.
- data = [
- YARN_LABEL,
- "//:.yarnrc",
- "//:tools/npm-patches/@angular+ng-dev+0.0.0-a6dcd24107d12114198251ee5d20cda814a1986a.patch",
- "//tools:postinstall-patches.js",
- ],
- # Currently disabled due to:
- # 1. Missing Windows support currently.
- # 2. Incompatibilites with the `ts_library` rule.
- exports_directories_only = False,
- manual_build_file_contents = npm_package_archives(),
- package_json = "//:package.json",
- yarn = YARN_LABEL,
- yarn_lock = "//:yarn.lock",
-)
-
load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
npm_translate_lock(
@@ -121,14 +97,14 @@ npm_translate_lock(
"//packages/platform-browser-dynamic:package.json",
"//packages/platform-server:package.json",
"//packages/router:package.json",
+ "//packages/service-worker:package.json",
"//packages/upgrade:package.json",
"//tools/bazel/rules_angular_store:package.json",
],
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
- update_pnpm_lock = True,
+ pnpm_version = "10.12.1",
verify_node_modules_ignored = "//:.bazelignore",
- yarn_lock = "//:yarn.lock",
)
load("@npm2//:repositories.bzl", "npm_repositories")
@@ -184,12 +160,6 @@ load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories"
web_test_repositories()
-load("@build_bazel_rules_nodejs//toolchains/esbuild:esbuild_repositories.bzl", "esbuild_repositories")
-
-esbuild_repositories(
- npm_repository = "npm",
-)
-
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
@@ -246,18 +216,6 @@ http_archive(
url = "https://saucelabs.com/downloads/sc-4.8.2-osx.zip",
)
-yarn_install(
- name = "npm_ts_versions",
- data = [
- YARN_LABEL,
- "//:.yarnrc",
- ],
- exports_directories_only = False,
- package_json = "//packages/core/schematics/migrations/signal-migration/test/ts-versions:package.json",
- yarn = YARN_LABEL,
- yarn_lock = "//packages/core/schematics/migrations/signal-migration/test/ts-versions:yarn.lock",
-)
-
git_repository(
name = "devinfra",
commit = "4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30",
diff --git a/adev/README.md b/adev/README.md
index 960a08fa93d..0996f5a8c6e 100644
--- a/adev/README.md
+++ b/adev/README.md
@@ -6,7 +6,7 @@ The content is written primarily in Markdown format located in `src/content`. Fo
## Local Development
-For local development, [yarn](https://yarnpkg.com/) is the preferred package manager. You can set up a local environment with the following commands
+For local development, [pnpm](https://pnpm.io/) is the preferred package manager. You can set up a local environment with the following commands
:
```bash
@@ -17,11 +17,11 @@ git clone https://github.com/angular/angular.git
cd angular
# Install dependencies
-yarn
+pnpm
# Build and run local dev server
# NOTE: Initial build will take some time
-yarn docs
+pnpm docs
```
If you are having issues with the docs building, see the [FAQs](#faqs) section.
@@ -46,8 +46,8 @@ This is most likely due to a bazel dependency / caching issue. To resolve this,
```
# Try this first
-yarn bazel clean
+pnpm bazel clean
# If that doesn't work, try it with the expunge flag
-yarn bazel clean --expunge
+pnpm bazel clean --expunge
```
diff --git a/contributing-docs/building-and-testing-angular.md b/contributing-docs/building-and-testing-angular.md
index 7d9610c17bd..90389d89f26 100644
--- a/contributing-docs/building-and-testing-angular.md
+++ b/contributing-docs/building-and-testing-angular.md
@@ -1,7 +1,7 @@
# Building and Testing Angular
This document describes how to set up your development environment to build and test Angular.
-It also explains the basic mechanics of using `git`, `node`, and `yarn`.
+It also explains the basic mechanics of using `git`, `node`, and `pnpm`.
* [Prerequisite Software](#prerequisite-software)
* [Getting the Sources](#getting-the-sources)
@@ -35,7 +35,7 @@ following on your development machine:
`.nvmrc` is read by [nvm](https://github.com/nvm-sh/nvm) commands like `nvm install`
and `nvm use`.
-* [Yarn](https://yarnpkg.com) (version specified in the engines field
+* [pnpm](https://pnpm.io/) (version specified in the engines field
of [`package.json`](../package.json)) which is used to install dependencies.
* On Windows: [MSYS2](https://www.msys2.org/) which is used by Bazel. Follow
@@ -69,7 +69,7 @@ Next, install the JavaScript modules needed to build and test Angular:
```shell
# Install Angular project dependencies (package.json)
-yarn install
+pnpm install
```
## Building
@@ -77,7 +77,7 @@ yarn install
To build Angular run:
```shell
-yarn build
+pnpm build
```
* Results are put in the `dist/packages-dist` folder.
@@ -90,7 +90,7 @@ To see how to run and debug Angular tests locally please refer to the
Bazel [Testing Angular](./building-with-bazel.md#testing-angular) section.
Note that you should execute all test suites before submitting a PR to
-GitHub (`yarn test //packages/...`).
+GitHub (`pnpm test //packages/...`).
However, affected tests will be executed on our CI infrastructure. So if you forgot to run some
affected tests which would fail, GitHub will indicate the error state and present you the failures.
@@ -101,18 +101,6 @@ PRs can only be merged if the code is formatted properly and all tests are passi
-### Testing changes against a local library/project
-
-Often for developers the best way to ensure the changes they have made work as expected is to run
-use changes in another library or project. To do this developers can build Angular locally, and
-using `yarn link` build a local project with the created artifacts.
-
-This can be done by running:
-
-```sh
-yarn ng-dev misc build-and-link
-```
-
### Building and serving a project
#### Cache
@@ -140,17 +128,17 @@ If the source code is not properly formatted, the CI will fail and the PR cannot
You can automatically format your code by running:
-- `yarn ng-dev format changed [shaOrRef]`: format only files changed since the provided
+- `pnpm ng-dev format changed [shaOrRef]`: format only files changed since the provided
sha/ref. `shaOrRef` defaults to `main`.
-- `yarn ng-dev format all`: format _all_ source code
-- `yarn ng-dev format files `: format only provided files
+- `pnpm ng-dev format all`: format _all_ source code
+- `pnpm ng-dev format files `: format only provided files
## Linting/verifying your Source Code
You can check that your code is properly formatted and adheres to coding style by running:
``` shell
-$ yarn lint
+$ pnpm lint
```
## Publishing Snapshot Builds
@@ -167,7 +155,7 @@ snapshots of the Angular packages created based on the code in the Pull Request.
You can also manually publish `*-builds` snapshots just like our CI build does for upstream
builds. Before being able to publish the packages, you need to build them locally by running the
-`yarn build` command.
+`pnpm build` command.
First time, you need to create the GitHub repositories:
diff --git a/contributing-docs/building-with-bazel.md b/contributing-docs/building-with-bazel.md
index ced4294030b..3cdb26c69e6 100644
--- a/contributing-docs/building-with-bazel.md
+++ b/contributing-docs/building-with-bazel.md
@@ -15,7 +15,7 @@ The binaries for Bazel are provided by
the [`@bazel/bazelisk`](https://github.com/bazelbuild/bazelisk)
npm package and its platform-specific dependencies.
-You can run Bazel with the `yarn bazel` command.
+You can run Bazel with the `pnpm bazel` command.
## Configuration
@@ -36,8 +36,8 @@ want Bazel to create several symlinks in your project directory
## Building Angular
-- Build a package: `yarn bazel build packages/core`
-- Build all packages: `yarn bazel build packages/...`
+- Build a package: `pnpm bazel build packages/core`
+- Build all packages: `pnpm bazel build packages/...`
You can use [ibazel] to run in a "watch mode" that continuously
keeps the outputs up-to-date as you save sources.
@@ -46,15 +46,15 @@ keeps the outputs up-to-date as you save sources.
## Testing Angular
-- Test package in node: `yarn test packages/core/test:test`
-- Test package in karma: `yarn test packages/core/test:test_web`
-- Test all packages: `yarn test packages/...`
+- Test package in node: `pnpm test packages/core/test:test`
+- Test package in karma: `pnpm test packages/core/test:test_web`
+- Test all packages: `pnpm test packages/...`
The ellipsis in the examples above are not meant to be substituted by a package name, but
are used by Bazel as a wildcard to execute all tests in the specified path. To execute all the tests for a
single package, the commands are (exemplary):
-- `yarn test //packages/core/...` for all tests, or
-- `yarn test //packages/core/test:test` for a particular test suite.
+- `pnpm test //packages/core/...` for all tests, or
+- `pnpm test //packages/core/test:test` for a particular test suite.
Bazel very effectively caches build results, so it's common for your first time building a target
to be much slower than subsequent builds.
@@ -78,7 +78,7 @@ using the proper flags with your Bazel test runs in Angular.
- Open Chrome at: [chrome://inspect](chrome://inspect)
- Click on `Open dedicated DevTools for Node` to launch a debugger.
- Run your test with the debug configuration,
- e.g. `yarn bazel test packages/core/test:test --config=debug`
+ e.g. `pnpm bazel test packages/core/test:test --config=debug`
The process should automatically connect to the debugger.
For more, see the [rules_nodejs Debugging documentation](https://bazelbuild.github.io/rules_nodejs/index.html#debugging).
@@ -108,7 +108,7 @@ First time setup:
**Setting breakpoints directly in your code files may not work in VSCode**. This is because the
files you're actually debugging are built files that exist in a `./private/...` folder.
The easiest way to debug a test for now is to add a `debugger` statement in the code
-and launch the bazel corresponding test (`yarn bazel test --config=debug`).
+and launch the bazel corresponding test (`pnpm bazel test --config=debug`).
Bazel will wait on a connection. Go to the debug view (by clicking on the sidebar or
Apple+Shift+D on Mac) and click on the green play icon next to the configuration name
@@ -117,7 +117,7 @@ Apple+Shift+D on Mac) and click on the green play icon next to the configuration
### Debugging a Karma Test
- Run test with `_debug` appended to the target name,
- e.g. `yarn bazel run packages/core/test:test_web_debug`.
+ e.g. `pnpm bazel run packages/core/test:test_web_debug`.
Every `ng_web_test_suite` target has an additional `_debug` target.
- Open any browser at: [http://localhost:9876/debug.html](http://localhost:9876/debug.html)
- Open the browser's DevTools to debug the tests (after, for example, having focused on specific
@@ -128,12 +128,12 @@ Apple+Shift+D on Mac) and click on the green play icon next to the configuration
Open `external` directory which contains everything that bazel downloaded while executing the
workspace file:
```sh
-open $(yarn -s bazel info output_base)/external
+open $(pnpm -s bazel info output_base)/external
```
See subcommands that bazel executes (helpful for debugging):
```sh
-yarn bazel build //packages/core:package -s
+pnpm bazel build //packages/core:package -s
```
## Stamping
@@ -189,7 +189,7 @@ The first step is to generate a profile of the build using the `--profile filena
flag.
```sh
-yarn bazel build //packages/compiler --profile filename_name.profile
+pnpm bazel build //packages/compiler --profile filename_name.profile
```
This generates a `filename_name.profile` that you can then analyse
@@ -202,20 +202,20 @@ command.
You can obtain a simple report directly in the console by running:
```sh
-yarn bazel analyze-profile filename_name.profile
+pnpm bazel analyze-profile filename_name.profile
```
This will show the phase summary, individual phase information and critical path.
You can also list all individual tasks and the time they took using `--task_tree`.
```sh
-yarn bazel analyze-profile filename_name.profile --task_tree ".*"
+pnpm bazel analyze-profile filename_name.profile --task_tree ".*"
```
To show all tasks that take longer than a certain threshold, use the `--task_tree_threshold` flag.
The default behavior is to use a 50ms threshold.
```sh
-yarn bazel analyze-profile filename_name.profile --task_tree ".*" --task_tree_threshold 5000
+pnpm bazel analyze-profile filename_name.profile --task_tree ".*" --task_tree_threshold 5000
```
`--task_tree` takes a regexp as argument that filters by the text shown after the time taken.
@@ -228,7 +228,7 @@ Compiling TypeScript shows as:
To filter all tasks by TypeScript compilations that took more than 5 seconds, use:
```sh
-yarn bazel analyze-profile filename_name.profile --task_tree "Compiling TypeScript" --task_tree_threshold 5000
+pnpm bazel analyze-profile filename_name.profile --task_tree "Compiling TypeScript" --task_tree_threshold 5000
```
### Using the HTML profile report
@@ -236,7 +236,7 @@ yarn bazel analyze-profile filename_name.profile --task_tree "Compiling TypeScri
A more comprehensive way to visualize the profile information is through the HTML report:
```sh
-yarn bazel analyze-profile filename_name.profile --html --html_details --html_histograms
+pnpm bazel analyze-profile filename_name.profile --html --html_details --html_histograms
```
This generates a `filename_name.profile.html` file that you can open in your browser.
@@ -286,7 +286,7 @@ Require stack:
`bazel run` only works in Bazel Windows with non-test targets. Ensure that you are using `bazel test` instead.
-e.g: `yarn bazel test packages/core/test/bundling/forms:symbol_test`
+e.g: `pnpm bazel test packages/core/test/bundling/forms:symbol_test`
#### mkdir missing
If you see the following error::
@@ -303,11 +303,11 @@ The `msys64` library and associated tools (like `mkdir`) are required to build A
Make sure you have `C:\msys64\usr\bin` in the "system" `PATH` rather than the "user" `PATH`.
-After that, a `git clean -xfd`, `yarn`, and `yarn build` should resolve this issue.
+After that, a `git clean -xfd`, `pnpm`, and `pnpm build` should resolve this issue.
### Xcode
-If running `yarn bazel build packages/...` returns the following error:
+If running `pnpm bazel build packages/...` returns the following error:
```
ERROR: /private/var/tmp/[...]/external/local_config_cc/BUILD:50:5: in apple_cc_toolchain rule @local_config_cc//:cc-compiler-darwin_x86_64: Xcode version must be specified to use an Apple CROSSTOOL
@@ -331,7 +331,7 @@ If VSCode is not the root cause, you might try:
bazel clean --expunge
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license
-yarn bazel build //packages/core # Run a build outside VSCode to pre-build the xcode; then safe to run VSCode
+pnpm bazel build //packages/core # Run a build outside VSCode to pre-build the xcode; then safe to run VSCode
```
Source: https://stackoverflow.com/questions/45276830/xcode-version-must-be-specified-to-use-an-apple-crosstool
diff --git a/contributing-docs/caretaking.md b/contributing-docs/caretaking.md
index c49a2c3c5ca..a1f823eb701 100644
--- a/contributing-docs/caretaking.md
+++ b/contributing-docs/caretaking.md
@@ -18,7 +18,7 @@ tool will automatically merge it based on the applied target label.
To merge a PR run:
```sh
-$ yarn ng-dev pr merge
+$ pnpm ng-dev pr merge
```
## Primitives and blocked merges
diff --git a/contributing-docs/public-api-surface.md b/contributing-docs/public-api-surface.md
index 91dafb63a14..ba7c654a808 100644
--- a/contributing-docs/public-api-surface.md
+++ b/contributing-docs/public-api-surface.md
@@ -68,11 +68,11 @@ If you modify any part of a public API in one of the supported public packages,
test in CI with an error message that instructs you to accept the golden file.
The public API guard provides a Bazel target that updates the current status of a given package. If
-you add to or modify the public API in any way, you must use [yarn](https://yarnpkg.com/) to execute
+you add to or modify the public API in any way, you must use [pnpm](https://pnpm.io/) to execute
the Bazel target in your terminal shell of choice (a recent version of `bash` is recommended).
```shell
-yarn bazel run //packages/:_api.accept
+pnpm bazel run //packages/:_api.accept
```
Here is an example of a CI test failure that resulted from adding a new allowed type to a public
@@ -109,6 +109,6 @@ If you modify a public API, you must accept the new golden file.
To do so, execute the following Bazel target:
- yarn bazel run //packages/core:core_api.accept
+ pnpm bazel run //packages/core:core_api.accept
```
diff --git a/contributing-docs/running-benchmarks.md b/contributing-docs/running-benchmarks.md
index 6595a9217a6..26303e9c503 100644
--- a/contributing-docs/running-benchmarks.md
+++ b/contributing-docs/running-benchmarks.md
@@ -7,14 +7,14 @@
### Running benchmark
```
-yarn benchmarks run
+pnpm benchmarks run
```
### Running a comparison with local changes
```
-yarn benchmarks run-compare main
-yarn benchmarks run-compare [bazel-target]
+pnpm benchmarks run-compare main
+pnpm benchmarks run-compare [bazel-target]
```
If no benchmark target is specified, a prompt will allow you to select an available benchmark.
@@ -32,4 +32,4 @@ You can start a comparison by adding a comment as follows to any PR:
```
**Note**: An explicit benchmark target must be provided. You can use the prompt
-of `yarn benchmarks run` to discover available benchmarks.
+of `pnpm benchmarks run` to discover available benchmarks.
diff --git a/devtools/README.md b/devtools/README.md
index f41bc52e8c6..949650da91d 100644
--- a/devtools/README.md
+++ b/devtools/README.md
@@ -24,16 +24,16 @@ To set up your development environment, first install the [correct version of No
nvm install
```
-Second, install [Yarn](https://classic.yarnpkg.com/en/):
+Second, install [pnpm](https://pnpm.io/):
```shell
-npm install -g yarn@1
+npm install -g pnpm
```
Third, install NPM dependencies:
```shell
-yarn --frozen-lockfile
+pnpm --frozen-lockfile
```
Now you should be ready to build the DevTools extension.
@@ -43,7 +43,7 @@ Now you should be ready to build the DevTools extension.
To run the extension in development mode run:
```shell
-yarn devtools:devserver
+pnpm devtools:devserver
```
This would start a development server that you can access on . In development, Angular DevTools
@@ -55,20 +55,20 @@ DevTools then communicate with the user's app via message passing.
Before running end-to-end tests, you need to start the development server using:
```shell
-yarn devtools:devserver
+pnpm devtools:devserver
```
You have two options for running cypress, you can use the interactive cypress UI or you can run Cypress in headless mode.
To open Cypress for Angular DevTools in interactive mode, run:
```shell
-yarn devtools:e2e:open
+pnpm devtools:e2e:open
```
To run Cypress tests headless, use:
```shell
-yarn devtools:test:e2e
+pnpm devtools:test:e2e
```
### Release builds
@@ -76,8 +76,8 @@ yarn devtools:test:e2e
You can build the release version of Angular DevTools for either Chrome or Firefox with:
```shell
-yarn devtools:build:chrome:release
-yarn devtools:build:firefox:release
+pnpm devtools:build:chrome:release
+pnpm devtools:build:firefox:release
```
Either way, the built extension will be at `dist/bin/devtools/projects/shell-browser/src/prodapp`.
diff --git a/devtools/docs/firefox.md b/devtools/docs/firefox.md
index 500c1c91bf4..a813dc7a907 100644
--- a/devtools/docs/firefox.md
+++ b/devtools/docs/firefox.md
@@ -8,7 +8,7 @@ To install Angular DevTools in Firefox follow the steps:
* Click on `Load Temporary Add-on` button to select and load the Angular DevTools extension for Firefox.
-* Select any file from `dist/bin/devtools/projects/shell-browser/src/prodapp` directory to load extension. If you have not built the extension for Firefox yet, you can do it using `yarn devtools:build:firefox` which will generate build for Firefox.
+* Select any file from `dist/bin/devtools/projects/shell-browser/src/prodapp` directory to load extension. If you have not built the extension for Firefox yet, you can do it using `pnpm devtools:build:firefox` which will generate build for Firefox.
* After selecting file and clicking open, you should be able to see Angular DevTools as a temporary Extension in Firefox.
diff --git a/devtools/docs/release.md b/devtools/docs/release.md
index fdbb0f980f7..1664c20fd9b 100644
--- a/devtools/docs/release.md
+++ b/devtools/docs/release.md
@@ -54,7 +54,7 @@ git fetch upstream main
git checkout "${MERGED_RELEASE_COMMIT}"
nvm install
-yarn --immutable
+pnpm --immutable
```
Note that while the steps below can technically be done without merging the release PR
@@ -71,7 +71,7 @@ Next, build and package the extension:
```shell
# Build the Chrome version.
-yarn devtools:build:chrome:release
+pnpm devtools:build:chrome:release
# Package the extension.
(cd dist/bin/devtools/projects/shell-browser/src/prodapp && zip -r ~/devtools-chrome.zip *)
@@ -92,7 +92,7 @@ To publish Angular DevTools as a Firefox Add-on, first build and package the ext
```shell
# Build the Firefox version.
-yarn devtools:build:firefox:release
+pnpm devtools:build:firefox:release
# Package the extension.
(cd dist/bin/devtools/projects/shell-browser/src/prodapp && zip -r ~/devtools-firefox.zip *)
diff --git a/devtools/docs/safari.md b/devtools/docs/safari.md
index 3912bda2650..715bbe69a3a 100644
--- a/devtools/docs/safari.md
+++ b/devtools/docs/safari.md
@@ -10,7 +10,7 @@ To install Angular DevTools in Safari follow the steps:
* Make sure the flag in `Develop -> Experimental Features -> Web Inspector Extensions` is checked.
-* Build Angular DevTools with a chrome configuration with `yarn devtools:build:chrome` this will create an Angular DevTools build in `dist/bin/devtools/projects/shell-browser/src/prodapp`.
+* Build Angular DevTools with a chrome configuration with `pnpm devtools:build:chrome` this will create an Angular DevTools build in `dist/bin/devtools/projects/shell-browser/src/prodapp`.
* Run `xcrun safari-web-extension-converter --macos-only dist/bin/devtools/projects/shell-browser/src/prodapp`. This will convert Angular DevTools into a Safari web extension. This command should open Xcode when it completes.
diff --git a/goldens/README.md b/goldens/README.md
index b32b4e18d86..d2c8ce6e6c3 100644
--- a/goldens/README.md
+++ b/goldens/README.md
@@ -6,7 +6,7 @@ to NPM. These are tested on all PRs and commits as part of our bazel tests.
To check or update the public api goldens, run one of the following commands:
```bash
-yarn public-api:check
-yarn public-api:update
+pnpm public-api:check
+pnpm public-api:update
```
diff --git a/goldens/public-api/manage.js b/goldens/public-api/manage.js
index 549fe4b7732..407a4b337e7 100644
--- a/goldens/public-api/manage.js
+++ b/goldens/public-api/manage.js
@@ -11,7 +11,7 @@ const API_TARGETS_LOCATION = 'packages/...';
// The shell command to query for all Public API guard tests.
const BAZEL_PUBLIC_API_TARGET_QUERY_CMD =
- `yarn -s bazel query --output label 'kind(js_test, ${API_TARGETS_LOCATION}) ` +
+ `pnpm --silent bazel query --output label 'kind(js_test, ${API_TARGETS_LOCATION}) ` +
`intersect attr("tags", "api_guard", ${API_TARGETS_LOCATION})'`;
// Bazel targets for testing Public API goldens
process.stdout.write('Gathering all Public API targets...');
@@ -28,7 +28,7 @@ const ALL_PUBLIC_API_ACCEPTS = ALL_PUBLIC_API_TESTS.map((test) => `${test}.accep
/** Builds all targets in parallel. */
function buildTargets(targets) {
process.stdout.write('Building all public API targets...');
- const commandResult = exec(`yarn -s bazel build ${targets.join(' ')}`, {silent: true});
+ const commandResult = exec(`pnpm --silent bazel build ${targets.join(' ')}`, {silent: true});
if (commandResult.code) {
console.error(commandResult.stdout || commandResult.stderr);
} else {
@@ -43,7 +43,7 @@ function buildTargets(targets) {
function runBazelCommandOnTargets(command, targets, present) {
for (const target of targets) {
process.stdout.write(`${present}: ${target}`);
- const commandResult = exec(`yarn -s bazel ${command} ${target}`, {silent: true});
+ const commandResult = exec(`pnpm --silent bazel ${command} ${target}`, {silent: true});
process.stdout.clearLine();
process.stdout.cursorTo(0);
if (commandResult.code) {
diff --git a/integration/index.bzl b/integration/index.bzl
index 3fa378db70b..666813d969c 100644
--- a/integration/index.bzl
+++ b/integration/index.bzl
@@ -7,7 +7,34 @@
load("@devinfra//bazel/integration:index.bzl", "integration_test")
load("//:packages.bzl", "INTEGRATION_PACKAGES")
-load("//integration:npm_package_archives.bzl", "NPM_PACKAGE_ARCHIVES")
+
+NPM_PACKAGE_ARCHIVES = [
+ "@babel/core",
+ "@rollup/plugin-babel",
+ "@rollup/plugin-node-resolve",
+ "@rollup/plugin-commonjs",
+ "check-side-effects",
+ "jasmine",
+ "http-server",
+ "typescript",
+ "rxjs",
+ "systemjs",
+ "tslib",
+ "patch-package",
+ "protractor",
+ "terser",
+ "rollup",
+ "rollup-plugin-sourcemaps",
+ "@angular/ssr",
+ "@angular/build",
+ "@angular/cli",
+ "@angular-devkit/build-angular",
+ "@bazel/bazelisk",
+ "@types/jasmine",
+ "@types/jasminewd2",
+ "@types/node",
+ "zone.js",
+]
def _ng_integration_test(name, setup_chromium = False, **kwargs):
"Set defaults for the npm_integration_test common to the angular repo"
diff --git a/integration/npm_package_archives.bzl b/integration/npm_package_archives.bzl
deleted file mode 100644
index 281d02dd50d..00000000000
--- a/integration/npm_package_archives.bzl
+++ /dev/null
@@ -1,51 +0,0 @@
-# The @npm packages at the root node_modules are used by integration tests
-# with `file:../../node_modules/foobar` references
-NPM_PACKAGE_ARCHIVES = [
- "@babel/core",
- "@rollup/plugin-babel",
- "@rollup/plugin-node-resolve",
- "@rollup/plugin-commonjs",
- "check-side-effects",
- "jasmine",
- "http-server",
- "typescript",
- "rxjs",
- "systemjs",
- "tslib",
- "patch-package",
- "protractor",
- "terser",
- "rollup",
- "rollup-plugin-sourcemaps",
- "@angular/ssr",
- "@angular/build",
- "@angular/cli",
- "@angular-devkit/build-angular",
- "@bazel/bazelisk",
- "@types/jasmine",
- "@types/jasminewd2",
- "@types/node",
- "zone.js",
-]
-
-def npm_package_archive_label(package_name):
- return package_name.replace("/", "_").replace("@", "") + "_archive"
-
-def npm_package_archives():
- """Function to generate pkg_tar definitions for WORKSPACE yarn_install manual_build_file_contents"""
- npm_packages_to_archive = NPM_PACKAGE_ARCHIVES
- result = """load("@rules_pkg//:pkg.bzl", "pkg_tar")
-"""
- for name in npm_packages_to_archive:
- label_name = npm_package_archive_label(name)
- last_segment_name = name.split("/")[-1]
- result += """pkg_tar(
- name = "{label_name}",
- srcs = ["//{name}:{last_segment_name}__all_files"],
- extension = "tar.gz",
- strip_prefix = "/external/angular/node_modules/{name}",
- # should not be built unless it is a dependency of another rule
- tags = ["manual"],
-)
-""".format(name = name, label_name = label_name, last_segment_name = last_segment_name)
- return result
diff --git a/modules/benchmarks/README.md b/modules/benchmarks/README.md
index a6d01d208fa..ef891a72b07 100644
--- a/modules/benchmarks/README.md
+++ b/modules/benchmarks/README.md
@@ -3,20 +3,20 @@
## Run in the browser
```bash
-yarn bazel run modules/benchmarks/src/tree/{name}:devserver
+pnpm bazel run modules/benchmarks/src/tree/{name}:devserver
# e.g. "ng2" tree benchmark:
-yarn bazel run modules/benchmarks/src/tree/ng2:devserver
+pnpm bazel run modules/benchmarks/src/tree/ng2:devserver
```
## Run e2e tests
```
# Run e2e tests of individual applications:
-yarn bazel test modules/benchmarks/src/tree/ng2/...
+pnpm bazel test modules/benchmarks/src/tree/ng2/...
# Run all e2e tests:
-yarn bazel test modules/benchmarks/...
+pnpm bazel test modules/benchmarks/...
```
## Use of *_aot.ts files
@@ -41,5 +41,5 @@ runs. The following options can be set through [test environment variables](http
Here is an example command that sets the `PERF_DRYRUN` option:
```bash
-yarn bazel test modules/benchmarks/src/tree/baseline:perf --test_env=PERF_DRYRUN=true
+pnpm bazel test modules/benchmarks/src/tree/baseline:perf --test_env=PERF_DRYRUN=true
```
\ No newline at end of file
diff --git a/modules/benchmarks/src/tree/ng2_static/BUILD.bazel b/modules/benchmarks/src/tree/ng2_static/BUILD.bazel
index 818b4b01f89..5663aa4033f 100644
--- a/modules/benchmarks/src/tree/ng2_static/BUILD.bazel
+++ b/modules/benchmarks/src/tree/ng2_static/BUILD.bazel
@@ -42,7 +42,7 @@ http_server(
name = "devserver",
srcs = [
"index.html",
- "@npm//:node_modules/reflect-metadata/Reflect.js",
+ "//modules:node_modules/reflect-metadata",
],
deps = [
":app_bundle",
diff --git a/modules/benchmarks/src/tree/ng2_static/index.html b/modules/benchmarks/src/tree/ng2_static/index.html
index c59ddb12d79..8d0d3f996e1 100644
--- a/modules/benchmarks/src/tree/ng2_static/index.html
+++ b/modules/benchmarks/src/tree/ng2_static/index.html
@@ -26,7 +26,7 @@
-
+
diff --git a/modules/package.json b/modules/package.json
index b0718135d1e..da916a762c7 100644
--- a/modules/package.json
+++ b/modules/package.json
@@ -14,7 +14,9 @@
"@angular/upgrade": "workspace:*",
"@types/node": "24.1.0",
"@types/selenium-webdriver": "3.0.7",
+ "angular-1.8": "npm:angular@1.8",
"protractor": "7.0.0",
+ "reflect-metadata": "0.2.2",
"selenium-webdriver": "3.6.0",
"tslib": "2.8.1",
"zone.js": "0.15.1"
diff --git a/modules/playground/README.md b/modules/playground/README.md
index 50172f008d6..09da35c7179 100644
--- a/modules/playground/README.md
+++ b/modules/playground/README.md
@@ -5,8 +5,8 @@ demonstrates how a specific example can be built and served with Bazel:
```bash
# e.g. src/zippy_component
-yarn bazel run modules/playground/src/zippy_component:devserver
+pnpm bazel run modules/playground/src/zippy_component:devserver
# e.g. src/upgrade
-yarn bazel run modules/playground/src/upgrade:devserver
+pnpm bazel run modules/playground/src/upgrade:devserver
```
\ No newline at end of file
diff --git a/modules/playground/src/upgrade/BUILD.bazel b/modules/playground/src/upgrade/BUILD.bazel
index 43e3e29d546..5c5a1d234ec 100644
--- a/modules/playground/src/upgrade/BUILD.bazel
+++ b/modules/playground/src/upgrade/BUILD.bazel
@@ -39,8 +39,8 @@ http_server(
name = "devserver",
srcs = [
"index.html",
- "@npm//:node_modules/angular-1.8/angular.js",
- "@npm//:node_modules/reflect-metadata/Reflect.js",
+ "//modules:node_modules/angular-1.8",
+ "//modules:node_modules/reflect-metadata",
],
deps = [
":app_bundle",
diff --git a/modules/playground/src/upgrade/index.html b/modules/playground/src/upgrade/index.html
index b5b30c764c5..60fdf6e89fa 100644
--- a/modules/playground/src/upgrade/index.html
+++ b/modules/playground/src/upgrade/index.html
@@ -17,8 +17,8 @@
Greetings from {{name}}!
-
-
+
+