Skip to content

Commit 8a229e3

Browse files
Merge pull request #37 from 0xsequence/pnpm
Replace yarn with pnpm
2 parents 8249572 + b92467c commit 8a229e3

15 files changed

Lines changed: 1524 additions & 1512 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
on: [push]
32

43
name: ci
@@ -14,15 +13,19 @@ jobs:
1413
- uses: actions/setup-node@v1
1514
with:
1615
node-version: 18
16+
- uses: pnpm/action-setup@v2
17+
with:
18+
version: 10
1719
- uses: actions/cache@master
18-
id: yarn-cache
20+
id: pnpm-cache
1921
with:
2022
path: |
2123
node_modules
2224
*/*/node_modules
23-
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
24-
- run: yarn install --network-concurrency 1
25-
if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }}
25+
.pnpm-store
26+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}
27+
- run: pnpm install --frozen-lockfile
28+
if: ${{ steps.pnpm-cache.outputs.cache-hit != 'true' }}
2629

2730
lint-sol:
2831
name: Solidity lint
@@ -35,21 +38,25 @@ jobs:
3538
- uses: actions/setup-node@v1
3639
with:
3740
node-version: 18
41+
- uses: pnpm/action-setup@v2
42+
with:
43+
version: 10
3844
- uses: actions/cache@master
39-
id: yarn-cache
45+
id: pnpm-cache
4046
with:
4147
path: |
4248
node_modules
4349
*/*/node_modules
44-
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
50+
.pnpm-store
51+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}
4552

4653
- name: Install Foundry
4754
uses: foundry-rs/foundry-toolchain@v1
4855
with:
4956
version: nightly
5057

5158
- name: Run linting
52-
run: yarn lint:sol
59+
run: pnpm lint:sol
5360

5461
foundry-tests:
5562
name: Foundry tests
@@ -62,13 +69,17 @@ jobs:
6269
- uses: actions/setup-node@v1
6370
with:
6471
node-version: 18
72+
- uses: pnpm/action-setup@v2
73+
with:
74+
version: 10
6575
- uses: actions/cache@master
66-
id: yarn-cache
76+
id: pnpm-cache
6777
with:
6878
path: |
6979
node_modules
7080
*/*/node_modules
71-
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
81+
.pnpm-store
82+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}
7283

7384
- name: Install Foundry
7485
uses: foundry-rs/foundry-toolchain@v1
@@ -89,14 +100,18 @@ jobs:
89100
# - uses: actions/setup-node@v1
90101
# with:
91102
# node-version: 18
103+
# - uses: pnpm/action-setup@v2
104+
# with:
105+
# version: 10
92106
# - uses: actions/cache@master
93-
# id: yarn-cache
107+
# id: pnpm-cache
94108
# with:
95109
# path: |
96110
# node_modules
97111
# */*/node_modules
98-
# key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
99-
# - run: yarn coverage || true
112+
# .pnpm-store
113+
# key: ${{ runner.os }}-pnpm-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}
114+
# - run: pnpm coverage || true
100115
# - name: Coveralls
101116
# uses: coverallsapp/github-action@master
102117
# with:

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ report/
77
# Ignore .DS_Store files on macOS
88
.DS_Store
99

10-
# Yarn
10+
# PNPM
1111
node_modules/
12-
yarn-error.log
12+
pnpm-error.log
1313

1414
# Env vars
1515
.env

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ Base and preset **implementations of common token standards**:
2020

2121
Clone the repository, including git submodules.
2222

23-
Install dependencies with `yarn`.
23+
Install dependencies with `pnpm i`.
2424

25-
Compile the contracts with `yarn build`.
25+
Compile the contracts with `pnpm build`.
2626

2727
### Testing
2828

29-
Run tests with `yarn test`.
29+
Run tests with `pnpm test`.
3030

31-
Run coverage report with `yarn coverage`. View coverage report with `genhtml -o report --branch-coverage --ignore-errors category lcov.info && py -m http.server`. Viewing the report with this command requires Python to be installed.
31+
Run coverage report with `pnpm run coverage`. View coverage report with `genhtml -o report --branch-coverage --ignore-errors category lcov.info && py -m http.server`. Viewing the report with this command requires Python to be installed.
3232

33-
Compare gas usage with `yarn snapshot:compare`. Note as some test use random values, the gas usage may vary slightly between runs.
33+
Compare gas usage with `pnpm run snapshot:compare`. Note as some test use random values, the gas usage may vary slightly between runs.
3434

3535
### Deployment
3636

@@ -43,7 +43,7 @@ cp .env.example .env
4343
Then run the deployment script.
4444

4545
```sh
46-
yarn deploy --rpc-url $RPC_URL --broadcast
46+
pnpm deploy --rpc-url $RPC_URL --broadcast
4747
```
4848

4949
## Dependencies

lefthook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ pre-commit:
22
commands:
33
lint-and-format:
44
glob: '**/*.sol'
5-
run: yarn format:sol {staged_files} && yarn lint:sol {staged_files} && git add {staged_files}
5+
run: pnpm run format:sol {staged_files} && pnpm run lint:sol {staged_files} && git add {staged_files}

0 commit comments

Comments
 (0)