Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js: Move everything to pnpm #5775

Merged
merged 21 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/pull-request-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
paths:
- 'libraries/**'
- 'ci/*-version.sh'
- 'pnpm-lock.yaml'
push:
branches: [master]
paths:
- 'libraries/**'
- 'ci/*-version.sh'
- 'pnpm-lock.yaml'

jobs:
cargo-test-sbf:
Expand Down Expand Up @@ -64,13 +66,16 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/cache@v2
with:
path: ~/.npm
key: node-${{ hashFiles('libraries/type-length-value/js/package-lock.json') }}
key: node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
node-
- run: ./ci/js-test-tlv.sh
9 changes: 7 additions & 2 deletions .github/workflows/pull-request-memo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
paths:
- 'memo/**'
- 'ci/*-version.sh'
- 'pnpm-lock.yaml'
push:
branches: [master]
paths:
- 'memo/**'
- 'ci/*-version.sh'
- 'pnpm-lock.yaml'

jobs:
cargo-test-sbf:
Expand Down Expand Up @@ -64,13 +66,16 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/cache@v2
with:
path: ~/.npm
key: node-${{ hashFiles('memo/js/package-lock.json') }}
key: node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
node-
- run: ./ci/js-test-memo.sh
11 changes: 8 additions & 3 deletions .github/workflows/pull-request-name-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
paths:
- 'name-service/**'
- 'ci/*-version.sh'
- 'pnpm-lock.yaml'
push:
branches: [master]
paths:
- 'name-service/**'
- 'ci/*-version.sh'
- 'pnpm-lock.yaml'

jobs:
cargo-test-sbf:
Expand Down Expand Up @@ -72,13 +74,16 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/cache@v2
with:
path: ~/.cache/yarn
key: node-${{ hashFiles('name-service/js/yarn.lock') }}
path: ~/.npm
key: node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
node-
- name: Download programs
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/pull-request-single-pool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- 'associated-token-account/**'
- 'ci/*-version.sh'
- '.github/workflows/pull-request-single-pool.yml'
- 'pnpm-lock.yaml'
push:
branches: [master]
paths:
Expand All @@ -16,6 +17,7 @@ on:
- 'associated-token-account/**'
- 'ci/*-version.sh'
- '.github/workflows/pull-request-single-pool.yml'
- 'pnpm-lock.yaml'

jobs:
cargo-test-sbf:
Expand Down Expand Up @@ -129,6 +131,12 @@ jobs:
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/cache@v2
with:
path: ~/.npm
key: node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
node-
- name: Download programs
uses: actions/download-artifact@v2
with:
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/pull-request-stake-pool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- 'ci/*-version.sh'
- 'ci/warning/purge-ubuntu-runner.sh'
- '.github/workflows/pull-request-stake-pool.yml'
- 'pnpm-lock.yaml'
push:
branches: [master]
paths:
Expand All @@ -16,6 +17,7 @@ on:
- 'ci/*-version.sh'
- 'ci/warning/purge-ubuntu-runner.sh'
- '.github/workflows/pull-request-stake-pool.yml'
- 'pnpm-lock.yaml'

jobs:
cargo-test-sbf:
Expand Down Expand Up @@ -83,24 +85,21 @@ jobs:
runs-on: ubuntu-latest
env:
NODE_VERSION: 16.x
needs: cargo-test-sbf
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/cache@v2
with:
path: ~/.npm
key: node-${{ hashFiles('stake-pool/js/package-lock.json') }}
key: node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
node-
- name: Download programs
uses: actions/download-artifact@v2
with:
name: stake-pool-programs
path: target/deploy
buffalojoec marked this conversation as resolved.
Show resolved Hide resolved
- run: ./ci/js-test-stake-pool.sh

py-test:
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/pull-request-token-lending.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ on:
- 'token-lending/**'
- 'token/**'
- 'ci/*-version.sh'
- 'pnpm-lock.yaml'
push:
branches: [master]
paths:
- 'token-lending/**'
- 'token/**'
- 'ci/*-version.sh'
- 'pnpm-lock.yaml'

jobs:
cargo-test-sbf:
Expand Down Expand Up @@ -70,22 +72,19 @@ jobs:
runs-on: ubuntu-latest
env:
NODE_VERSION: 18.x
needs: cargo-test-sbf
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/cache@v2
with:
path: ~/.npm
key: node-${{ hashFiles('token-lending/js/package-lock.json') }}
key: node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
node-
- name: Download programs
uses: actions/download-artifact@v2
with:
name: token-lending-programs
path: target/deploy
- run: ./ci/js-test-token-lending.sh
9 changes: 7 additions & 2 deletions .github/workflows/pull-request-token-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:
- 'token/program-2022/**'
- 'ci/*-version.sh'
- '.github/workflows/pull-request-token-metadata.yml'
- 'pnpm-lock.yaml'
push:
branches: [master]
paths:
- 'token-metadata/**'
- 'token/program-2022/**'
- 'ci/*-version.sh'
- '.github/workflows/pull-request-token-metadata.yml'
- 'pnpm-lock.yaml'

jobs:
cargo-test-sbf:
Expand Down Expand Up @@ -75,13 +77,16 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/cache@v2
with:
path: ~/.npm
key: node-${{ hashFiles('token-metadata/js/package-lock.json') }}
key: node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
node-
- run: ./ci/js-test-token-metadata.sh
9 changes: 7 additions & 2 deletions .github/workflows/pull-request-token-swap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:
- 'token/**'
- 'libraries/math/**'
- 'ci/*-version.sh'
- 'pnpm-lock.yaml'
push:
branches: [master]
paths:
- 'token-swap/**'
- 'token/**'
- 'libraries/math/**'
- 'ci/*-version.sh'
- 'pnpm-lock.yaml'

jobs:
cargo-test-sbf:
Expand Down Expand Up @@ -89,13 +91,16 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/cache@v2
with:
path: ~/.npm
key: node-${{ hashFiles('token-swap/js/package-lock.json') }}
key: node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
node-
- name: Download programs
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/pull-request-token.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:
- 'token/**'
- 'ci/*-version.sh'
- '.github/workflows/pull-request-token.yml'
- 'pnpm-lock.yaml'
push:
branches: [master]
paths:
- 'associated-token-account/**'
- 'token/**'
- 'ci/*-version.sh'
- '.github/workflows/pull-request-token.yml'
- 'pnpm-lock.yaml'

jobs:
cargo-test-sbf:
Expand Down Expand Up @@ -257,13 +259,16 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/cache@v2
with:
path: ~/.npm
key: node-${{ hashFiles('token/js/package-lock.json') }}
key: node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
node-
- name: Download programs
Expand Down
8 changes: 4 additions & 4 deletions ci/js-test-memo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source ./ci/solana-version.sh install
set -x
cd memo/js

npm install
npm run lint
npm run build
npm test
pnpm install
pnpm lint
pnpm build
pnpm test
8 changes: 4 additions & 4 deletions ci/js-test-name-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source ./ci/solana-version.sh install
set -x
cd name-service/js

yarn install --pure-lockfile
yarn lint
yarn build
yarn test
pnpm install
pnpm lint
pnpm build
pnpm test
4 changes: 2 additions & 2 deletions ci/js-test-single-pool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ cd single-pool/js
pnpm install

cd packages/modern
pnpm run lint
pnpm lint
pnpm build

cd ../classic
pnpm run lint
pnpm lint
pnpm build
pnpm test
13 changes: 8 additions & 5 deletions ci/js-test-stake-pool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

set -ex
cd "$(dirname "$0")/.."
source ./ci/solana-version.sh install

pnpm install

(cd memo/js && pnpm build)
(cd token/js && pnpm build)

cd stake-pool/js
npm install
npm run lint
npm run build
npm run test
pnpm lint
pnpm build
pnpm test
9 changes: 4 additions & 5 deletions ci/js-test-tlv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

set -e
cd "$(dirname "$0")/.."
source ./ci/solana-version.sh install

set -x
cd libraries/type-length-value/js

npm install
npm run lint
npm run build
npm test
pnpm install
pnpm lint
pnpm build
pnpm test
Loading
Loading