Skip to content

Commit 216d883

Browse files
committed
build: use pnpm as the package manager instead of yarn (#62926)
Use pnpm instead of yarn as the package manager and interaction tool for the repo PR Close #62926
1 parent 0777222 commit 216d883

File tree

69 files changed

+17269
-27068
lines changed

Some content is hidden

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

69 files changed

+17269
-27068
lines changed

.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx

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

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ packages/router/node_modules
6262
packages/zone.js/node_modules
6363
packages/upgrade/node_modules
6464
packages/benchpress/node_modules
65+
packages/service-worker/node_modules
6566
tools/bazel/rules_angular_store/node_modules

.bazelrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test --nolegacy_external_runfiles
3838
# in Bazel 0.21.0 but turned off again in 0.22.0. Follow
3939
# https://github.com/bazelbuild/bazel/issues/7026 for more details.
4040
# This flag is needed to so that the bazel cache is not invalidated
41-
# when running bazel via `yarn bazel`.
41+
# when running bazel via `pnpm bazel`.
4242
# See https://github.com/angular/angular/issues/27514.
4343
build --incompatible_strict_action_env
4444
run --incompatible_strict_action_env
@@ -60,11 +60,11 @@ build --enable_runfiles
6060
# Releases should always be stamped with version control info
6161
# This command assumes node on the path and is a workaround for
6262
# https://github.com/bazelbuild/bazel/issues/4802
63-
build:release --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=release"
63+
build:release --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=release"
6464
build:release --stamp
6565

6666
# Snapshots should also be stamped with version control information.
67-
build:snapshot-build --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=snapshot"
67+
build:snapshot-build --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=snapshot"
6868
build:snapshot-build --stamp
6969

7070
# Angular DevTools for Firefox releases *cannot* be stamped and `--config snapshot-build-firefox` is a no-op.

.devcontainer/recommended-devcontainer.json

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

.github/actions/saucelabs-legacy/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ runs:
3434
run: ./tools/saucelabs/sauce-service.sh ready-wait
3535
- name: Running tests on Saucelabs.
3636
shell: bash
37-
run: KARMA_WEB_TEST_MODE=SL_REQUIRED yarn karma start ./karma-js.conf.js --single-run
37+
run: KARMA_WEB_TEST_MODE=SL_REQUIRED pnpm karma start ./karma-js.conf.js --single-run
3838
- name: Stop Saucelabs tunnel service
3939
shell: bash
4040
run: ./tools/saucelabs/sauce-service.sh stop

.github/actions/yarn-install/action.yml

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

.github/workflows/adev-preview-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
- name: Setup Bazel RBE
2828
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
2929
- name: Install node modules
30-
run: yarn install --frozen-lockfile
30+
run: pnpm install --frozen-lockfile
3131
- name: Build adev to ensure it continues to work
32-
run: yarn bazel build //adev:build --full_build_adev --config=release
32+
run: pnpm bazel build //adev:build --full_build_adev --config=release
3333
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
3434
with:
3535
workflow-artifact-name: 'adev-preview'

.github/workflows/benchmark-compare.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
# that the action was triggered by a team member.
3737
ref: ${{steps.comment-branch.outputs.head_ref}}
3838

39-
- uses: ./.github/actions/yarn-install
39+
- run: pnpm install --frozen-lockfile
4040

4141
- uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
4242
with:
@@ -47,9 +47,9 @@ jobs:
4747
env:
4848
# Untrusted input used in an executable code, must be wrapped as an env var to prevent injections
4949
COMMENT_BODY: ${{ github.event.comment.body }}
50-
run: yarn benchmarks prepare-for-github-action "$COMMENT_BODY"
50+
run: pnpm benchmarks prepare-for-github-action "$COMMENT_BODY"
5151

52-
- run: yarn benchmarks run-compare ${{steps.info.outputs.compareSha}} ${{steps.info.outputs.benchmarkTarget}}
52+
- run: pnpm benchmarks run-compare ${{steps.info.outputs.compareSha}} ${{steps.info.outputs.benchmarkTarget}}
5353
id: benchmark
5454
name: Running benchmark
5555

.github/workflows/ci.yml

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ jobs:
2525
with:
2626
cache-node-modules: true
2727
- name: Install node modules
28-
run: yarn install --frozen-lockfile
28+
run: pnpm install --frozen-lockfile
2929
- name: Check code lint
30-
run: yarn -s tslint
30+
run: pnpm tslint
3131
- name: Check for circular dependencies
32-
run: yarn -s ts-circular-deps:check
32+
run: pnpm ts-circular-deps:check
3333
- name: Validate pull approve configuration
34-
run: yarn -s ng-dev pullapprove verify
34+
run: pnpm ng-dev pullapprove verify
3535
- name: Validate angular robot configuration
36-
run: yarn -s ng-dev ngbot verify
36+
run: pnpm ng-dev ngbot verify
3737
- name: Confirm code builds with typescript as expected
38-
run: yarn -s check-tooling-setup
38+
run: pnpm check-tooling-setup
3939

4040
devtools:
4141
runs-on: ubuntu-latest
@@ -51,11 +51,11 @@ jobs:
5151
with:
5252
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
5353
- name: Install node modules
54-
run: yarn install --frozen-lockfile
54+
run: pnpm install --frozen-lockfile
5555
- name: Run unit tests
56-
run: yarn devtools:test
56+
run: pnpm devtools:test
5757
- name: Test build
58-
run: yarn devtools:build:chrome
58+
run: pnpm devtools:build:chrome
5959

6060
test:
6161
runs-on: ubuntu-latest-4core
@@ -71,9 +71,9 @@ jobs:
7171
with:
7272
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
7373
- name: Install node modules
74-
run: yarn install --frozen-lockfile --network-timeout 100000
74+
run: pnpm install --frozen-lockfile
7575
- name: Run CI tests for framework
76-
run: yarn test:ci
76+
run: pnpm test:ci
7777

7878
integration-tests:
7979
runs-on: ubuntu-latest-4core
@@ -89,9 +89,9 @@ jobs:
8989
with:
9090
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
9191
- name: Install node modules
92-
run: yarn install --frozen-lockfile --network-timeout 100000
92+
run: pnpm install --frozen-lockfile
9393
- name: Run integration CI tests for framework
94-
run: yarn integration-tests:ci
94+
run: pnpm integration-tests:ci
9595

9696
adev:
9797
runs-on:
@@ -106,11 +106,11 @@ jobs:
106106
with:
107107
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
108108
- name: Install node modules
109-
run: yarn install --frozen-lockfile
109+
run: pnpm install --frozen-lockfile
110110
- name: Run tests
111-
run: yarn bazel test //adev/...
111+
run: pnpm bazel test //adev/...
112112
- name: Build adev in fast mode to ensure it continues to work
113-
run: yarn bazel build //adev:build --config=release
113+
run: pnpm bazel build //adev:build --config=release
114114

115115
publish-snapshots:
116116
runs-on:
@@ -125,9 +125,9 @@ jobs:
125125
- name: Setup Bazel RBE
126126
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
127127
- name: Install node modules
128-
run: yarn install --frozen-lockfile
128+
run: pnpm install --frozen-lockfile
129129
- run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials
130-
- run: yarn build
130+
- run: pnpm build
131131
- run: ./scripts/ci/publish-build-artifacts.sh
132132

133133
zone-js:
@@ -149,9 +149,9 @@ jobs:
149149
with:
150150
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
151151
- name: Install node modules
152-
run: yarn install --frozen-lockfile
152+
run: pnpm install --frozen-lockfile
153153
- run: |
154-
yarn bazel build \
154+
pnpm bazel build \
155155
//packages/zone.js/bundles:zone.umd.js \
156156
//packages/zone.js:npm_package \
157157
//packages/zone.js/test/closure:closure
@@ -169,15 +169,14 @@ jobs:
169169
cp dist/bin/packages/zone.js/test/closure/zone.closure.js ./packages/zone.js/build/test/zone.closure.mjs
170170
171171
# Install
172-
- run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
172+
- run: pnpm -C packages/zone.js install --frozen-lockfile
173173
# Run zone.js tools tests
174-
- run: yarn --cwd packages/zone.js promisefinallytest
175-
- run: yarn --cwd packages/zone.js jest:test
176-
- run: yarn --cwd packages/zone.js jest:nodetest
177-
- run: yarn --cwd packages/zone.js vitest:test
178-
- run: yarn --cwd packages/zone.js electrontest
179-
- run: yarn --cwd packages/zone.js/test/typings install --frozen-lockfile --non-interactive
180-
- run: yarn --cwd packages/zone.js/test/typings test
174+
- run: pnpm -C packages/zone.js promisefinallytest
175+
- run: pnpm -C packages/zone.js jest:test
176+
- run: pnpm -C packages/zone.js jest:nodetest
177+
- run: pnpm -C packages/zone.js vitest:test
178+
- run: pnpm -C packages/zone.js electrontest
179+
- run: pnpm -C packages/zone.js/test/typings test
181180

182181
# saucelabs:
183182
# runs-on: ubuntu-latest-4core
@@ -189,7 +188,7 @@ jobs:
189188
# with:
190189
# cache-node-modules: true
191190
# - name: Install node modules
192-
# run: yarn install --frozen-lockfile
191+
# run: pnpm install --frozen-lockfile
193192
# - uses: ./.github/actions/saucelabs-legacy
194193

195194
adev-deploy:
@@ -204,9 +203,9 @@ jobs:
204203
- name: Setup Bazel RBE
205204
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
206205
- name: Install node modules
207-
run: yarn install --frozen-lockfile
206+
run: pnpm install --frozen-lockfile
208207
- name: Build adev to ensure it continues to work
209-
run: yarn bazel build //adev:build --full_build_adev --config=release
208+
run: pnpm bazel build //adev:build --full_build_adev --config=release
210209
- name: Deploy to firebase
211210
uses: ./.github/actions/deploy-docs-site
212211
with:

.github/workflows/manual.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ jobs:
1717
with:
1818
cache-node-modules: true
1919
- name: Install node modules
20-
run: yarn install --frozen-lockfile
20+
run: pnpm install --frozen-lockfile
2121
- name: Setup Bazel
2222
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
2323
- name: Setup Bazel Remote Caching
2424
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
2525
- name: Setup Saucelabs Variables
2626
uses: angular/dev-infra/github-actions/saucelabs@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
2727
- name: Set up Sauce Tunnel Daemon
28-
run: yarn bazel run //tools/saucelabs-daemon/background-service -- $JOBS &
28+
run: pnpm bazel run //tools/saucelabs-daemon/background-service -- $JOBS &
2929
env:
3030
SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
3131
- name: Run all saucelabs bazel tests
3232
run: |
3333
TESTS=$(./node_modules/.bin/bazelisk query --output label '(kind(karma_web_test, ...) intersect attr("tags", "saucelabs", ...)) except attr("tags", "fixme-saucelabs", ...)')
34-
yarn bazel test --config=saucelabs --jobs=$JOBS ${TESTS}
34+
pnpm bazel test --config=saucelabs --jobs=$JOBS ${TESTS}

0 commit comments

Comments
 (0)