Skip to content

Commit 82cc576

Browse files
committed
build: use pnpm as the package manager instead of yarn (angular#62924)
Use pnpm instead of yarn as the package manager and interaction tool for the repo PR Close angular#62924
1 parent 892c2d1 commit 82cc576

64 files changed

Lines changed: 17279 additions & 27177 deletions

File tree

Some content is hidden

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

.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: 32 additions & 33 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,16 +51,16 @@ 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
- name: Cypress run
6060
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
6161
with:
62-
command: yarn devtools:test:e2e
63-
start: yarn bazel run //devtools/src:devserver
62+
command: pnpm devtools:test:e2e
63+
start: pnpm bazel run //devtools/src:devserver
6464
wait-on: 'http://localhost:4200'
6565
wait-on-timeout: 300
6666

@@ -78,9 +78,9 @@ jobs:
7878
with:
7979
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
8080
- name: Install node modules
81-
run: yarn install --frozen-lockfile --network-timeout 100000
81+
run: pnpm install --frozen-lockfile
8282
- name: Run CI tests for framework
83-
run: yarn test:ci
83+
run: pnpm test:ci
8484

8585
integration-tests:
8686
runs-on: ubuntu-latest-4core
@@ -96,9 +96,9 @@ jobs:
9696
with:
9797
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
9898
- name: Install node modules
99-
run: yarn install --frozen-lockfile --network-timeout 100000
99+
run: pnpm install --frozen-lockfile
100100
- name: Run integration CI tests for framework
101-
run: yarn integration-tests:ci
101+
run: pnpm integration-tests:ci
102102

103103
adev:
104104
runs-on:
@@ -113,11 +113,11 @@ jobs:
113113
with:
114114
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
115115
- name: Install node modules
116-
run: yarn install --frozen-lockfile
116+
run: pnpm install --frozen-lockfile
117117
- name: Run tests
118-
run: yarn bazel test //adev/...
118+
run: pnpm bazel test //adev/...
119119
- name: Build adev in fast mode to ensure it continues to work
120-
run: yarn bazel build //adev:build --config=release
120+
run: pnpm bazel build //adev:build --config=release
121121

122122
publish-snapshots:
123123
runs-on:
@@ -132,9 +132,9 @@ jobs:
132132
- name: Setup Bazel RBE
133133
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
134134
- name: Install node modules
135-
run: yarn install --frozen-lockfile
135+
run: pnpm install --frozen-lockfile
136136
- run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials
137-
- run: yarn build
137+
- run: pnpm build
138138
- run: ./scripts/ci/publish-build-artifacts.sh
139139

140140
zone-js:
@@ -156,9 +156,9 @@ jobs:
156156
with:
157157
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
158158
- name: Install node modules
159-
run: yarn install --frozen-lockfile
159+
run: pnpm install --frozen-lockfile
160160
- run: |
161-
yarn bazel build \
161+
pnpm bazel build \
162162
//packages/zone.js/bundles:zone.umd.js \
163163
//packages/zone.js:npm_package \
164164
//packages/zone.js/test/closure:closure
@@ -176,15 +176,14 @@ jobs:
176176
cp dist/bin/packages/zone.js/test/closure/zone.closure.js ./packages/zone.js/build/test/zone.closure.mjs
177177
178178
# Install
179-
- run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
179+
- run: pnpm -C packages/zone.js install --frozen-lockfile
180180
# Run zone.js tools tests
181-
- run: yarn --cwd packages/zone.js promisefinallytest
182-
- run: yarn --cwd packages/zone.js jest:test
183-
- run: yarn --cwd packages/zone.js jest:nodetest
184-
- run: yarn --cwd packages/zone.js vitest:test
185-
- run: yarn --cwd packages/zone.js electrontest
186-
- run: yarn --cwd packages/zone.js/test/typings install --frozen-lockfile --non-interactive
187-
- run: yarn --cwd packages/zone.js/test/typings test
181+
- run: pnpm -C packages/zone.js promisefinallytest
182+
- run: pnpm -C packages/zone.js jest:test
183+
- run: pnpm -C packages/zone.js jest:nodetest
184+
- run: pnpm -C packages/zone.js vitest:test
185+
- run: pnpm -C packages/zone.js electrontest
186+
- run: pnpm -C packages/zone.js/test/typings test
188187

189188
# saucelabs:
190189
# runs-on: ubuntu-latest-4core
@@ -196,7 +195,7 @@ jobs:
196195
# with:
197196
# cache-node-modules: true
198197
# - name: Install node modules
199-
# run: yarn install --frozen-lockfile
198+
# run: pnpm install --frozen-lockfile
200199
# - uses: ./.github/actions/saucelabs-legacy
201200

202201
adev-deploy:
@@ -211,9 +210,9 @@ jobs:
211210
- name: Setup Bazel RBE
212211
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
213212
- name: Install node modules
214-
run: yarn install --frozen-lockfile
213+
run: pnpm install --frozen-lockfile
215214
- name: Build adev to ensure it continues to work
216-
run: yarn bazel build //adev:build --full_build_adev --config=release
215+
run: pnpm bazel build //adev:build --full_build_adev --config=release
217216
- name: Deploy to firebase
218217
uses: ./.github/actions/deploy-docs-site
219218
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)