Skip to content

Commit bfe9b2c

Browse files
authored
Merge pull request #1678 from cprussin/migrate-to-pnpm
Migrate to pnpm
2 parents 31c1024 + 52592d4 commit bfe9b2c

File tree

88 files changed

+32317
-99387
lines changed

Some content is hidden

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

88 files changed

+32317
-99387
lines changed

.envrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
# the shebang is ignored, but nice for editors
3+
4+
if type -P lorri &>/dev/null; then
5+
eval "$(lorri direnv)"
6+
elif type -P nix-shell &>/dev/null; then
7+
echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]'
8+
use nix
9+
fi

.github/workflows/ci-ethereum-contract.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,18 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v3
2424

25-
- name: Install contract npm dependencies
26-
run: npm ci
25+
- uses: pnpm/action-setup@v4
26+
name: Install pnpm
27+
with:
28+
run_install: true
2729

2830
- name: Install Foundry
2931
uses: foundry-rs/[email protected]
3032
with:
3133
version: nightly
3234

3335
- name: Install Forge dependencies
34-
run: npm run install-forge-deps
36+
run: pnpm run install-forge-deps
3537

3638
- name: Run tests
3739
run: forge test -vvv --deny-warnings

.github/workflows/ci-hermes-client-api-types.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14-
- uses: actions/setup-node@v3
14+
- uses: actions/setup-node@v4
1515
with:
1616
node-version: 18
17-
cache: "npm"
18-
- name: Install deps
19-
run: npm ci
17+
- uses: pnpm/action-setup@v4
18+
name: Install pnpm
19+
with:
20+
run_install: true
2021
- name: Generate API Types
21-
run: npx lerna run generate-hermes-api-types
22+
run: pnpm exec lerna run generate-hermes-api-types
2223
- name: Check API Types
23-
run: npx lerna run check-hermes-api-types
24+
run: pnpm exec lerna run check-hermes-api-types

.github/workflows/ci-message-buffer-idl.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ jobs:
3434
run: anchor build
3535
- name: Copy anchor target files
3636
run: cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/
37+
- uses: pnpm/action-setup@v4
38+
name: Install pnpm
3739
- name: Install prettier globally
38-
run: npm install -g [email protected]
40+
run: pnpm install -g [email protected]
3941
- name: Run prettier (to avoid pre-commit failures)
4042
run: |
41-
npx [email protected] --write "./idl/*"
43+
pnpm dlx [email protected] --write "./idl/*"
4244
- name: Check IDL changes
4345
# Fails if the IDL files are not up to date. Please use anchor build to regenerate the IDL files for
4446
# the current version of the contract and update idl directory.

.github/workflows/ci-typescript.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,20 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@v4
27-
- uses: actions/setup-node@v3
27+
- uses: actions/setup-node@v4
2828
with:
2929
node-version: 18
30-
cache: "npm"
31-
- name: Install deps
32-
run: npm ci
30+
- uses: pnpm/action-setup@v4
31+
name: Install pnpm
32+
with:
33+
run_install: true
3334
- name: Build
34-
run: npx lerna run build
35+
run: pnpm exec lerna run build
3536
- name: Test
36-
run: npx lerna run test
37+
run: pnpm exec lerna run test
3738
- name: Lint
38-
run: npx lerna run lint
39+
run: pnpm exec lerna run lint
3940
- name: Generate ABIs
40-
run: npx lerna run generate-abi
41+
run: pnpm exec lerna run generate-abi
4142
- name: Check ABIs
42-
run: npx lerna run check-abi
43+
run: pnpm exec lerna run check-abi

.github/workflows/publish-js.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
13+
- uses: actions/setup-node@v4
1414
with:
1515
node-version: "18"
16-
registry-url: "https://registry.npmjs.org"
17-
- run: npm ci
18-
- run: npx lerna run build --no-private
19-
- run: npx lerna publish from-package --no-private --no-git-tag-version --yes
16+
- uses: pnpm/action-setup@v4
17+
name: Install pnpm
18+
with:
19+
run_install: true
20+
- run: pnpm exec lerna run build --no-private
21+
- run: pnpm exec lerna publish from-package --no-private --no-git-tag-version --yes
2022
env:
2123
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release-pyth-cosmwasm-contract.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v2
1616
- name: Setup tool
17-
run: npm ci
17+
run: pnpm i
1818
- name: Build generic cosmwasm contract
1919
run: |
20-
npm run build-contract -- --cosmwasm
20+
pnpm run build-contract -- --cosmwasm
2121
mv ../artifacts ../cosmwasm
2222
zip -r cosmwasm.zip ../cosmwasm
2323
- name: Build injective cosmwasm contract
2424
run: |
25-
npm run build-contract -- --injective
25+
pnpm run build-contract -- --injective
2626
mv ../artifacts ../injective
2727
zip -r injective.zip ../injective
2828
- name: Build osmosis cosmwasm contract
2929
run: |
30-
npm run build-contract -- --osmosis
30+
pnpm run build-contract -- --osmosis
3131
mv ../artifacts ../osmosis
3232
zip -r osmosis.zip ../osmosis
3333

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bigtable-writer.json
1616
tsconfig.tsbuildinfo
1717
*~
1818
*mnemonic*
19-
.envrc
2019
*/*.sui.log*
2120
__pycache__
2221
.DS_Store
22+
.vercel

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ repos:
33
rev: v3.2.0
44
hooks:
55
- id: trailing-whitespace
6-
exclude: target_chains/sui/vendor/
6+
exclude: target_chains/sui/vendor/|patches/
77
- id: end-of-file-fixer
8-
exclude: target_chains/sui/vendor/
8+
exclude: target_chains/sui/vendor/|patches/
99
- id: check-added-large-files
10-
exclude: package-lock.json,target_chains/sui/vendor/
10+
exclude: target_chains/sui/vendor/|patches/
1111
# Hook to format many type of files in the repo
1212
# including solidity contracts.
1313
- repo: https://github.com/pre-commit/mirrors-prettier

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pnpm-lock.yaml
2+
patches/

0 commit comments

Comments
 (0)