Skip to content

Commit ba073b9

Browse files
authored
Merge pull request #4568 from NomicFoundation/feature/3521-replace-pkg-manager-yarn-with-pnpm
Replace yarn with pnpm
2 parents a6ea606 + 8957574 commit ba073b9

File tree

99 files changed

+26772
-25029
lines changed

Some content is hidden

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

99 files changed

+26772
-25029
lines changed

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
version: 2
55
updates:
6-
- package-ecosystem: "npm"
6+
- package-ecosystem: "pnpm"
77
directory: "/"
88
schedule:
99
interval: "daily"

.github/workflows/LATEST_DEPENDENCY_VERSIONS.yml

+12-8
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,32 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
test-without-yarn-lock:
10-
name: Test without yarn.lock
9+
test-without-pnpm-lock-yaml:
10+
name: Test without pnpm-lock.yaml
1111
strategy:
1212
matrix:
1313
system: ["ubuntu-latest", "windows-latest"]
1414
runs-on: ${{ matrix.system }}
1515
steps:
16+
- uses: actions/checkout@v2
17+
- uses: pnpm/action-setup@v2
18+
with:
19+
version: 8
1620
- uses: actions/setup-node@v2
1721
with:
1822
node-version: 16
19-
- uses: actions/checkout@v2
20-
- name: Delete yarn.lock
21-
run: "rm yarn.lock"
23+
cache: "pnpm"
24+
- name: Delete pnpm-lock.yaml
25+
run: "rm pnpm-lock.yaml"
2226
- name: Install
23-
run: yarn
27+
run: pnpm install --no-frozen-lockfile
2428
- name: List dependencies
25-
run: yarn list
29+
run: pnpm list -r --depth 2
2630
- name: Run tests
2731
env:
2832
DO_NOT_SET_THIS_ENV_VAR____IS_HARDHAT_CI: true
2933
FORCE_COLOR: 3
30-
run: yarn test || (echo "===== Retry =====" && yarn test)
34+
run: pnpm test || (echo "===== Retry =====" && pnpm test)
3135
- name: Notify failures
3236
if: failure()
3337
uses: slackapi/[email protected]

.github/workflows/check-docs-site.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v2
19+
- uses: pnpm/action-setup@v2
20+
with:
21+
version: 8
1922
- uses: actions/setup-node@v2
2023
with:
2124
node-version: 16
22-
cache: yarn
25+
cache: "pnpm"
2326
- name: Install
24-
run: yarn --frozen-lockfile
27+
run: pnpm install --frozen-lockfile --prefer-offline
2528
- name: Install Docs
26-
run: cd docs && yarn
29+
run: cd docs && pnpm install --frozen-lockfile --prefer-offline
2730
- name: lint
28-
run: cd docs && yarn lint
31+
run: cd docs && pnpm lint
2932
- name: Build
30-
run: cd docs && yarn build
33+
run: cd docs && pnpm build
3134
- name: Storybook
32-
run: cd docs && yarn build-storybook
35+
run: cd docs && pnpm build-storybook

.github/workflows/comment-on-linter-error.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,27 @@ jobs:
2020
uses: actions/checkout@v2
2121
with:
2222
ref: "refs/pull/${{ github.event.number }}/merge"
23+
- uses: pnpm/action-setup@v2
24+
with:
25+
version: 8
2326
- uses: actions/setup-node@v2
2427
with:
2528
node-version: 16
26-
cache: yarn
29+
cache: "pnpm"
2730
- name: Install
28-
run: yarn --frozen-lockfile
31+
run: pnpm install --frozen-lockfile --prefer-offline
2932
- name: Build
30-
run: yarn build
33+
run: pnpm build
3134
- name: lint
32-
run: yarn lint
35+
run: pnpm lint
3336
- name: Check dependency versions
3437
run: node scripts/check-dependencies.js
3538
- name: Install website
3639
working-directory: docs/
37-
run: yarn
40+
run: pnpm install --frozen-lockfile --prefer-offline
3841
- name: Lint website
3942
working-directory: docs/
40-
run: yarn lint
43+
run: pnpm lint
4144
- uses: actions/github-script@v6
4245
name: Comment on failure
4346
if: ${{ failure() }}
@@ -47,5 +50,5 @@ jobs:
4750
issue_number: context.issue.number,
4851
owner: context.repo.owner,
4952
repo: context.repo.repo,
50-
body: "Thanks for submitting this PR!\n\nUnfortunately, it has some linter errors, so we can't merge it yet. Can you please fix them?\n\nRunning yarn `lint:fix` in the root of the repository may fix them automatically."
53+
body: "Thanks for submitting this PR!\n\nUnfortunately, it has some linter errors, so we can't merge it yet. Can you please fix them?\n\nRunning pnpm lint:fix in the root of the repository may fix them automatically."
5154
})

.github/workflows/compile-with-typescript-v4.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,20 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v2
17+
- uses: pnpm/action-setup@v2
18+
with:
19+
version: 8
1720
- uses: actions/setup-node@v2
1821
with:
1922
node-version: 16
23+
cache: "pnpm"
2024
- name: Install typescript v4 in all packages
2125
run: |
22-
sed -i 's/"typescript": "~5.0.0"/"typescript": "^4.0.0"/' package.json packages/*/package.json && yarn
26+
sed -i 's/"typescript": "~5.0.0"/"typescript": "^4.0.0"/' package.json packages/*/package.json && pnpm install --no-frozen-lockfile
2327
# hardhat-viem is the only package that requires TypeScript v5
2428
- name: Remove hardhat-viem directory
2529
run: rm -fr packages/hardhat-viem
2630
- name: Remove hardhat-viem from the build script
2731
run: sed -i 's/packages\/hardhat-viem packages\/hardhat-toolbox-viem//' package.json
2832
- name: Build
29-
run: yarn build
33+
run: pnpm build

.github/workflows/hardhat-chai-matchers-ci.yml

+21-12
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,21 @@ jobs:
3030
runs-on: windows-latest
3131
steps:
3232
- uses: actions/checkout@v2
33+
- uses: pnpm/action-setup@v2
34+
with:
35+
version: 8
3336
- uses: actions/setup-node@v2
3437
with:
3538
node-version: 16
36-
cache: yarn
39+
cache: "pnpm"
3740
- name: Install
38-
run: yarn --frozen-lockfile
41+
run: pnpm install --frozen-lockfile --prefer-offline
3942
- name: Build
40-
run: yarn build
43+
run: pnpm build
4144
- name: Run tests
4245
env:
4346
FORCE_COLOR: 3
44-
run: yarn test:ci
47+
run: pnpm test:ci
4548

4649
test_on_macos:
4750
name: Test hardhat-chai-matchers on MacOS with Node 16
@@ -50,18 +53,21 @@ jobs:
5053
if: ${{ false }}
5154
steps:
5255
- uses: actions/checkout@v2
56+
- uses: pnpm/action-setup@v2
57+
with:
58+
version: 8
5359
- uses: actions/setup-node@v2
5460
with:
5561
node-version: 16
56-
cache: yarn
62+
cache: "pnpm"
5763
- name: Install
58-
run: yarn --frozen-lockfile
64+
run: pnpm install --frozen-lockfile --prefer-offline
5965
- name: Build
60-
run: yarn build
66+
run: pnpm build
6167
- name: Run tests
6268
env:
6369
FORCE_COLOR: 3
64-
run: yarn test:ci
70+
run: pnpm test:ci
6571

6672
test_on_linux:
6773
name: Test hardhat-chai-matchers on Ubuntu with Node ${{ matrix.node }}
@@ -71,15 +77,18 @@ jobs:
7177
node: [16, 18, 20]
7278
steps:
7379
- uses: actions/checkout@v2
80+
- uses: pnpm/action-setup@v2
81+
with:
82+
version: 8
7483
- uses: actions/setup-node@v2
7584
with:
7685
node-version: ${{ matrix.node }}
77-
cache: yarn
86+
cache: "pnpm"
7887
- name: Install
79-
run: yarn --frozen-lockfile
88+
run: pnpm install --frozen-lockfile --prefer-offline
8089
- name: Build
81-
run: yarn build
90+
run: pnpm build
8291
- name: Run tests
8392
env:
8493
FORCE_COLOR: 3
85-
run: yarn test:ci
94+
run: pnpm test:ci

.github/workflows/hardhat-core-ci.yml

+29-17
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,22 @@ jobs:
3030
runs-on: windows-latest
3131
steps:
3232
- uses: actions/checkout@v2
33+
- uses: pnpm/action-setup@v2
34+
with:
35+
version: 8
3336
- uses: actions/setup-node@v2
3437
with:
3538
node-version: 16
36-
cache: yarn
39+
cache: "pnpm"
3740
- name: Install
38-
run: yarn --frozen-lockfile
41+
run: pnpm install --frozen-lockfile --prefer-offline
3942
- name: Build
40-
run: yarn build
43+
run: pnpm build
4144
- name: Run tests
4245
env:
4346
DO_NOT_SET_THIS_ENV_VAR____IS_HARDHAT_CI: true
4447
FORCE_COLOR: 3
45-
run: yarn test:except-tracing
48+
run: pnpm test:except-tracing
4649

4750
test_on_macos:
4851
name: Test hardhat-core on MacOS with Node 16
@@ -51,19 +54,22 @@ jobs:
5154
if: ${{ false }}
5255
steps:
5356
- uses: actions/checkout@v2
57+
- uses: pnpm/action-setup@v2
58+
with:
59+
version: 8
5460
- uses: actions/setup-node@v2
5561
with:
5662
node-version: 16
57-
cache: yarn
63+
cache: "pnpm"
5864
- name: Install
59-
run: yarn --frozen-lockfile
65+
run: pnpm install --frozen-lockfile --prefer-offline
6066
- name: Build
61-
run: yarn build
67+
run: pnpm build
6268
- name: Run tests
6369
env:
6470
DO_NOT_SET_THIS_ENV_VAR____IS_HARDHAT_CI: true
6571
FORCE_COLOR: 3
66-
run: yarn test:except-tracing
72+
run: pnpm test:except-tracing
6773

6874
test_on_linux:
6975
name: Test hardhat-core on Ubuntu with Node ${{ matrix.node }}
@@ -73,19 +79,22 @@ jobs:
7379
node: [16, 18, 20]
7480
steps:
7581
- uses: actions/checkout@v2
82+
- uses: pnpm/action-setup@v2
83+
with:
84+
version: 8
7685
- uses: actions/setup-node@v2
7786
with:
7887
node-version: ${{ matrix.node }}
79-
cache: yarn
88+
cache: "pnpm"
8089
- name: Install
81-
run: yarn --frozen-lockfile
90+
run: pnpm install --frozen-lockfile --prefer-offline
8291
- name: Build
83-
run: yarn build
92+
run: pnpm build
8493
- name: Run tests
8594
env:
8695
DO_NOT_SET_THIS_ENV_VAR____IS_HARDHAT_CI: true
8796
FORCE_COLOR: 3
88-
run: yarn test:except-tracing
97+
run: pnpm test:except-tracing
8998

9099
test_types_node:
91100
name: Test different versions of @types/node
@@ -95,18 +104,21 @@ jobs:
95104
node: [16, 18, 20]
96105
steps:
97106
- uses: actions/checkout@v2
107+
- uses: pnpm/action-setup@v2
108+
with:
109+
version: 8
98110
- uses: actions/setup-node@v2
99111
with:
100112
node-version: ${{ matrix.node }}
101-
cache: yarn
113+
cache: "pnpm"
102114
- name: Install
103-
run: yarn --frozen-lockfile
115+
run: pnpm install --frozen-lockfile --prefer-offline
104116
- name: Install @types/node
105-
run: yarn add --dev @types/node@${{ matrix.node }}
117+
run: pnpm add --save-dev @types/node@${{ matrix.node }}
106118
- name: Build
107-
run: yarn build
119+
run: pnpm build
108120
- name: Run tests
109121
env:
110122
DO_NOT_SET_THIS_ENV_VAR____IS_HARDHAT_CI: true
111123
FORCE_COLOR: 3
112-
run: yarn test:except-tracing
124+
run: pnpm test:except-tracing

.github/workflows/hardhat-ethers-ci.yml

+21-12
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,19 @@ jobs:
3232
runs-on: windows-latest
3333
steps:
3434
- uses: actions/checkout@v2
35+
- uses: pnpm/action-setup@v2
36+
with:
37+
version: 8
3538
- uses: actions/setup-node@v2
3639
with:
3740
node-version: 16
38-
cache: yarn
41+
cache: "pnpm"
3942
- name: Install
40-
run: yarn --frozen-lockfile
43+
run: pnpm install --frozen-lockfile --prefer-offline
4144
- name: Build
42-
run: yarn build
45+
run: pnpm build
4346
- name: Run tests
44-
run: yarn test
47+
run: pnpm test
4548

4649
test_on_macos:
4750
name: Test hardhat-ethers on MacOS with Node 16
@@ -50,16 +53,19 @@ jobs:
5053
if: ${{ false }}
5154
steps:
5255
- uses: actions/checkout@v2
56+
- uses: pnpm/action-setup@v2
57+
with:
58+
version: 8
5359
- uses: actions/setup-node@v2
5460
with:
5561
node-version: 16
56-
cache: yarn
62+
cache: "pnpm"
5763
- name: Install
58-
run: yarn --frozen-lockfile
64+
run: pnpm install --frozen-lockfile --prefer-offline
5965
- name: Build
60-
run: yarn build
66+
run: pnpm build
6167
- name: Run tests
62-
run: yarn test
68+
run: pnpm test
6369

6470
test_on_linux:
6571
name: Test hardhat-ethers on Ubuntu with Node ${{ matrix.node }}
@@ -69,13 +75,16 @@ jobs:
6975
node: [16, 18, 20]
7076
steps:
7177
- uses: actions/checkout@v2
78+
- uses: pnpm/action-setup@v2
79+
with:
80+
version: 8
7281
- uses: actions/setup-node@v2
7382
with:
7483
node-version: ${{ matrix.node }}
75-
cache: yarn
84+
cache: "pnpm"
7685
- name: Install
77-
run: yarn --frozen-lockfile
86+
run: pnpm install --frozen-lockfile --prefer-offline
7887
- name: Build
79-
run: yarn build
88+
run: pnpm build
8089
- name: Run tests
81-
run: yarn test
90+
run: pnpm test

0 commit comments

Comments
 (0)