Skip to content

Commit e8c999f

Browse files
ThomasRaleebillyjacobybangjelkoski
authored
Chore: pnpm (#574)
* chore: pnpm --------- Co-authored-by: billyjacoby <[email protected]> Co-authored-by: ThomasRalee <[email protected]> Co-authored-by: Bojan Angjelkoski <[email protected]>
1 parent 78f656e commit e8c999f

File tree

175 files changed

+18442
-20822
lines changed

Some content is hidden

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

175 files changed

+18442
-20822
lines changed

.gitbook/building-dapps/configuring-nuxt.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Follow the Getting Started guide at [Nuxt3 Docs](https://nuxt.com/docs/getting-s
1010

1111
### 2. Installing @injectivelabs packages
1212

13-
You can install the @injectivelabs packages using yarn.
13+
You can install the @injectivelabs packages using pnpm.
1414

1515
```bash
16-
$ yarn add @injectivelabs/sdk-ts @injectivelabs/networks @injectivelabs/ts-types @injectivelabs/utils
16+
$ pnpm install @injectivelabs/sdk-ts @injectivelabs/networks @injectivelabs/ts-types @injectivelabs/utils
1717

1818
## If you need Wallet Connection
19-
$ yarn add @injectivelabs/wallet-strategy
19+
$ pnpm install @injectivelabs/wallet-strategy
2020
```
2121

2222
These are the most commonly used packages from the `injective-ts` monorepo.
@@ -26,8 +26,8 @@ These are the most commonly used packages from the `injective-ts` monorepo.
2626
First, add the needed polyfill packages
2727

2828
```bash
29-
$ yarn add @bangjelkoski/node-stdlib-browser
30-
$ yarn add -D @bangjelkoski/vite-plugin-node-polyfills
29+
$ pnpm install @bangjelkoski/node-stdlib-browser
30+
$ pnpm install -D @bangjelkoski/vite-plugin-node-polyfills
3131
```
3232

3333
Make sure you are using the `[email protected]` , `nuxt@^3.8.1`, `typescript@^5.0.4` versions.
@@ -37,7 +37,7 @@ Make sure you are using the `[email protected]` , `nuxt@^3.8.1`, `typescript@^5.0.4`
3737
One of the main dependencies for any crypto-related decentralized application is Buffer. To make sure we add Buffer to our project, we can install it as a dependency and then make a Nuxt plugin to import it to the global/window object:
3838

3939
```bash
40-
$ yarn add buffer
40+
$ pnpm install buffer
4141
```
4242

4343
```ts
@@ -55,7 +55,7 @@ export default defineNuxtPlugin(() => {
5555
If you are going to use `pinia` as state management, add it to your packages:
5656

5757
```bash
58-
$ yarn add @pinia/nuxt@^0.4.9
58+
$ pnpm install @pinia/nuxt@^0.4.9
5959
```
6060

6161
### 5. Using `vueuse`
@@ -173,4 +173,4 @@ There is one optimization that you can to decrease the bundle size - add these r
173173

174174
### 7. Booting our app
175175

176-
Finally, you can start your app locally using `yarn dev` or generate static pages using `yarn generate` which you can deploy to any static page hosting like Netlify, Vercel, etc.
176+
Finally, you can start your app locally using `pnpm dev` or generate static pages using `pnpm generate` which you can deploy to any static page hosting like Netlify, Vercel, etc.

.gitbook/building-dapps/configuring-react.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ $ npm create vite@latest
1414

1515
### 2. Installing @injectivelabs packages
1616

17-
You can install the @injectivelabs packages using yarn.
17+
You can install the @injectivelabs packages using pnpm.
1818

1919
```bash
20-
$ yarn add @injectivelabs/sdk-ts @injectivelabs/networks @injectivelabs/ts-types @injectivelabs/utils
20+
$ pnpm install @injectivelabs/sdk-ts @injectivelabs/networks @injectivelabs/ts-types @injectivelabs/utils
2121

2222
## If you need Wallet Connection
23-
$ yarn add @injectivelabs/wallet-strategy
23+
$ pnpm install @injectivelabs/wallet-strategy
2424
```
2525

2626
These are the most commonly used packages from the `injective-ts` monorepo.
@@ -36,18 +36,18 @@ Example `vite.config.ts` is shared below.
3636
{% endhint %}
3737

3838
```bash
39-
$ yarn add @bangjelkoski/node-stdlib-browser
40-
$ yarn add -D @bangjelkoski/vite-plugin-node-polyfills
41-
$ yarn add buffer
39+
$ pnpm install @bangjelkoski/node-stdlib-browser
40+
$ pnpm install -D @bangjelkoski/vite-plugin-node-polyfills
41+
$ pnpm install buffer
4242
```
4343

4444
Finally, make sure to import the `buffer` in your `main.tsx` on top of the file
4545

4646
```typescript
47-
import { Buffer } from "buffer";
47+
import { Buffer } from 'buffer'
4848

4949
if (!window.Buffer) {
50-
window.Buffer = Buffer; // Optional, for packages expecting Buffer to be global
50+
window.Buffer = Buffer // Optional, for packages expecting Buffer to be global
5151
}
5252
```
5353

@@ -56,7 +56,7 @@ if (!window.Buffer) {
5656
React has a lot of different state managers, pick the one you are going to use and install it. You can use the build in `Context API` for state management without the need to install a third-party solution. The preferred third-party state managers are `Redux` and `Zustand`.
5757

5858
```bash
59-
$ yarn add zustand
59+
$ pnpm install zustand
6060
```
6161

6262
### 5. vite.config.ts
@@ -68,28 +68,28 @@ Open up `vite.config.ts` and add `node-polyfills` inside the `plugins` array.
6868
Your config should look like this:
6969

7070
```ts
71-
import { defineConfig } from "vite";
72-
import react from "@vitejs/plugin-react-swc";
73-
import { nodePolyfills } from "@bangjelkoski/vite-plugin-node-polyfills";
71+
import { defineConfig } from 'vite'
72+
import react from '@vitejs/plugin-react-swc'
73+
import { nodePolyfills } from '@bangjelkoski/vite-plugin-node-polyfills'
7474

7575
// https://vitejs.dev/config/
7676
export default defineConfig({
7777
plugins: [react(), nodePolyfills({ protocolImports: true })],
7878
define: {
79-
global: "globalThis",
79+
global: 'globalThis',
8080
},
8181
resolve: {
8282
alias: {
8383
// others
84-
buffer: "buffer/",
84+
buffer: 'buffer/',
8585
},
8686
},
8787
optimizeDeps: {
88-
include: ["buffer"],
88+
include: ['buffer'],
8989
},
90-
});
90+
})
9191
```
9292

9393
### 8. Booting our app
9494

95-
Finally, you can start your app locally using `yarn dev` or build for production using `yarn build` which you can deploy to any static page hosting like Netlify, Vercel, etc.
95+
Finally, you can start your app locally using `pnpm dev` or build for production using `pnpm build` which you can deploy to any static page hosting like Netlify, Vercel, etc.

.github/workflows/beta.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ jobs:
1010
publish-beta:
1111
runs-on: ubuntu-latest
1212
permissions: write-all
13-
if: ${{ contains(github.ref_name, 'beta') || contains(github.event.commits[0].message, 'beta') }}
13+
if: ${{ contains(github.event.commits[0].message, 'beta') }}
1414
steps:
1515
- name: 'Checkout'
1616
uses: actions/checkout@v4
17-
with:
18-
fetch-depth: 1
1917

20-
- name: 'Use NodeJS 20'
21-
uses: actions/setup-node@v2
18+
- name: Using Node from .nvmrc
19+
uses: useblacksmith/setup-node@v5
2220
with:
23-
node-version: '20.17.0'
21+
node-version-file: '.nvmrc'
2422

25-
- name: 'Setup [email protected]'
26-
run: yarn global add [email protected] --ignore-engines
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: latest
2727

2828
- name: Set up Git user
2929
run: |
@@ -34,11 +34,14 @@ jobs:
3434
run: |
3535
lerna clean --yes
3636
node etc/bootstrapEnv
37-
yarn install --ignore-engines
38-
yarn build
37+
pnpm install
38+
pnpm build
3939
4040
- name: 'Setup npm'
41-
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
41+
run: |
42+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
43+
# Tell Git to ignore this temporary change
44+
git update-index --assume-unchanged .npmrc
4245
env:
4346
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4447

.github/workflows/canary.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ jobs:
1414
steps:
1515
- name: 'Checkout'
1616
uses: actions/checkout@v4
17-
with:
18-
fetch-depth: 1
1917

20-
- name: 'Use NodeJS 20'
21-
uses: actions/setup-node@v2
18+
- name: Using Node from .nvmrc
19+
uses: useblacksmith/setup-node@v5
2220
with:
23-
node-version: '20.17.0'
21+
node-version-file: '.nvmrc'
2422

25-
- name: 'Setup [email protected]'
26-
run: yarn global add [email protected] --ignore-engines
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: latest
2727

2828
- name: Set up Git user
2929
run: |
@@ -34,11 +34,14 @@ jobs:
3434
run: |
3535
lerna clean --yes
3636
node etc/bootstrapEnv
37-
yarn install --ignore-engines
38-
yarn build
37+
pnpm install
38+
pnpm build
3939
4040
- name: 'Setup npm'
41-
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
41+
run: |
42+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
43+
# Tell Git to ignore this temporary change
44+
git update-index --assume-unchanged .npmrc
4245
env:
4346
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4447

.github/workflows/dev.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
17-
with:
18-
fetch-depth: 1
1917

20-
- name: 'Use NodeJS 20'
21-
uses: actions/setup-node@v2
18+
- name: Using Node from .nvmrc
19+
uses: useblacksmith/setup-node@v5
2220
with:
23-
node-version: '20.17.0'
21+
node-version-file: '.nvmrc'
2422

25-
- name: Setup [email protected]
26-
run: yarn global add [email protected] --ignore-engines
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: latest
2727

2828
- name: Set up Git user
2929
run: |
@@ -34,13 +34,14 @@ jobs:
3434
run: |
3535
lerna clean --yes
3636
node etc/bootstrapEnv
37-
yarn install --ignore-engines
38-
yarn build
37+
pnpm install
38+
pnpm build
3939
40-
- name: Setup npm
40+
- name: 'Setup npm'
4141
run: |
4242
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
43-
npm whoami
43+
# Tell Git to ignore this temporary change
44+
git update-index --assume-unchanged .npmrc
4445
env:
4546
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4647

.github/workflows/stable.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ jobs:
1515
steps:
1616
- name: 'Checkout'
1717
uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 1
20-
persist-credentials: false
2118

22-
- name: 'Use NodeJS 20'
23-
uses: actions/setup-node@v2
19+
- name: Using Node from .nvmrc
20+
uses: useblacksmith/setup-node@v5
2421
with:
25-
node-version: '20.17.0'
22+
node-version-file: '.nvmrc'
2623

27-
- name: 'Setup [email protected]'
28-
run: yarn global add [email protected] --ignore-engines
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: latest
2928

3029
- name: Set up Git user
3130
run: |
@@ -36,13 +35,14 @@ jobs:
3635
run: |
3736
lerna clean --yes
3837
node etc/bootstrapEnv
39-
yarn install --ignore-engines
40-
yarn build
38+
pnpm install
39+
pnpm build
4140
4241
- name: Setup npm
4342
run: |
4443
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
45-
npm whoami
44+
# Tell Git to ignore this temporary change
45+
git update-index --assume-unchanged .npmrc
4646
env:
4747
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4848

.husky/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn commitlint --edit $1
4+
pnpm commitlint --edit $1

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn lint-staged
4+
pnpm lint-staged

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefully-hoist=true
2+
strict-peer-dependencies=false

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v24.4.0

0 commit comments

Comments
 (0)