Skip to content

pnpm #53

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

Merged
merged 11 commits into from
Aug 21, 2025
Merged

pnpm #53

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
14 changes: 8 additions & 6 deletions .github/workflows/run-tests-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ jobs:
with:
node-version: 20

- name: Set up Yarn
uses: threeal/[email protected]
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Get last git commit hash
run: |
Expand All @@ -70,14 +72,14 @@ jobs:
with:
path: |
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ env.DIFF_HASH }}
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ env.DIFF_HASH }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-

- name: Build example project
run: |
echo "Building example: ${{ matrix.name }} in directory ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}"
cd ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}
ls -la
yarn install
yarn build
pnpm install
pnpm build
27 changes: 13 additions & 14 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,72 +16,71 @@ jobs:
with:
node-version: 20

- name: Set up Yarn
uses: threeal/setup-yarn-action@v2.0.0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
cache: false
version: 9

- name: Install Dependencies
run: |
echo "YARN_ENABLE_IMMUTABLE_INSTALLS=false" >> $GITHUB_ENV
npm install -g create-interchain-app

- name: authz
run: |
cia --example authz --name authz
cd authz
yarn build
pnpm build

- name: ibc-asset-list
run: |
cia --example ibc-asset-list --name ibc-asset-list
cd ibc-asset-list
yarn build
pnpm build

- name: injective
run: |
cia --example injective --name injective
cd injective
yarn build
pnpm build

- name: injective-vue
run: |
cia --example injective-vue --name injective-vue
cd injective-vue
yarn build
pnpm build

- name: stake-tokens
run: |
cia --example stake-tokens --name stake-tokens
cd stake-tokens
yarn build
pnpm build

- name: vote-proposal
run: |
cia --example vote-proposal --name vote-proposal
cd vote-proposal
yarn build
pnpm build

- name: chain-template
run: |
cia --template chain-template --name chain-template
cd chain-template
yarn build
pnpm build

- name: connect-chain
run: |
cia --template connect-chain --name connect-chain
cd connect-chain
yarn build
pnpm build

- name: connect-multi-chain
run: |
cia --template connect-multi-chain --name connect-multi-chain
cd connect-multi-chain
yarn build
pnpm build

- name: website
run: |
cia --boilerplate website --name website
cd website
yarn build
pnpm build
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"eslint.validate": ["javascript", "javascriptreact"],
"files.exclude": {
".yarn/*": true
".pnpm-store/*": true
},
"typescript.tsdk": "node_modules/typescript/lib"
}
10 changes: 0 additions & 10 deletions .yarnrc

This file was deleted.

1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Once the app is created, move into the app directory and start the development s

```sh
cd my-app
yarn && yarn dev
pnpm install && pnpm dev
```

Now your app should be running on `http://localhost:3000`!
Expand Down Expand Up @@ -107,7 +107,7 @@ npm init interchain-app
### Yarn

```sh
yarn create interchain-app
pnpm create interchain-app
```

## Examples
Expand Down Expand Up @@ -195,20 +195,20 @@ cia --name ibc-asset-list-example --example ibc-asset-list

## Development

Because the nature of how template boilerplates are generated, we generate `yarn.lock` files inside of nested packages so we can fix versions to avoid non-deterministic installations.
Because the nature of how template boilerplates are generated, we generate `pnpm-lock.yaml` files inside of nested packages so we can fix versions to avoid non-deterministic installations.

When adding packages, yarn workspaces will use the root `yarn.lock`. It could be ideal to remove it while adding packages, and when publishing or pushing new changes, generating the nested lock files.
When adding packages, pnpm workspaces will use the root `pnpm-lock.yaml`. It could be ideal to remove it while adding packages, and when publishing or pushing new changes, generating the nested lock files.

In the root, to remove all nested lock files:

```
yarn locks:remove
pnpm locks:remove
```

When you need to remove/generate locks for all nested packages, simply run `yarn locks` in the root:
When you need to remove/generate locks for all nested packages, simply run `pnpm locks` in the root:

```
yarn locks
pnpm locks
```

## Interchain JavaScript Stack
Expand Down
8 changes: 4 additions & 4 deletions boilerplates/lerna-module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ npm install __MODULENAME__
When first cloning the repo:

```sh
yarn
pnpm install
# build the prod packages. When devs would like to navigate to the source code, this will only navigate from references to their definitions (.d.ts files) between packages.
yarn build
pnpm build
```

Or if you want to make your dev process smoother, you can run:

```sh
yarn
pnpm install
# build the dev packages with .map files, this enables navigation from references to their source code between packages.
yarn build:dev
pnpm build:dev
```

## Interchain JavaScript Stack
Expand Down
4 changes: 2 additions & 2 deletions boilerplates/lerna-tsx-module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ npm install __MODULENAME__
When first cloning the repo:

```
yarn
yarn build
pnpm install
pnpm build
```

## Interchain JavaScript Stack
Expand Down
11 changes: 8 additions & 3 deletions boilerplates/lerna-workspace/.github/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ jobs:
with:
node-version: '20.x'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install Dependencies
run: yarn install
run: pnpm install

- name: Build Project
run: yarn build
run: pnpm build

- name: Run Parser Tests
run: yarn workspace modulename test
run: pnpm --filter modulename test
working-directory: packages/modulefolder
8 changes: 4 additions & 4 deletions boilerplates/lerna-workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ npm install __MODULENAME__
When first cloning the repo:

```sh
yarn
pnpm install
# build the prod packages. When devs would like to navigate to the source code, this will only navigate from references to their definitions (.d.ts files) between packages.
yarn build
pnpm build
```

Or if you want to make your dev process smoother, you can run:

```sh
yarn
pnpm install
# build the dev packages with .map files, this enables navigation from references to their source code between packages.
yarn build:dev
pnpm build:dev
```

## Interchain JavaScript Stack
Expand Down
6 changes: 2 additions & 4 deletions boilerplates/lerna-workspace/lerna.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"lerna": "6",
"conventionalCommits": true,
"npmClient": "yarn",
"npmClientArgs": [
"--no-lockfile"
],
"npmClient": "pnpm",
"npmClientArgs": [],
"packages": [
"packages/*"
],
Expand Down
4 changes: 2 additions & 2 deletions boilerplates/lerna-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"scripts": {
"clean": "lerna run clean",
"build": "lerna run build --stream",
"build:dev": "lerna run build:dev --stream; yarn symlink",
"build:dev": "lerna run build:dev --stream; pnpm run symlink",
"lint": "lerna run lint --parallel",
"symlink": "symlink-workspace --logLevel error",
"postinstall": "yarn symlink"
"postinstall": "pnpm run symlink"
},
"devDependencies": {
"@types/jest": "^29.5.11",
Expand Down
11 changes: 8 additions & 3 deletions boilerplates/npm-boilerplate/.github/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ jobs:
with:
node-version: '20.x'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install Dependencies
run: yarn install
run: pnpm install

- name: Build Project
run: yarn build
run: pnpm build

- name: Run Tests
run: yarn test
run: pnpm test
11 changes: 8 additions & 3 deletions boilerplates/telescope/.github/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ jobs:
with:
node-version: '20.x'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install Dependencies
run: yarn install
run: pnpm install

- name: Build Project
run: yarn build
run: pnpm build

- name: Run Tests
run: yarn test
run: pnpm test
8 changes: 4 additions & 4 deletions boilerplates/telescope/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,16 +263,16 @@ const stargateClient = await SigningStargateClient.connectWithSigner(rpcEndpoint
When first cloning the repo:

```
yarn
yarn build
pnpm install
pnpm build
```

### Codegen

Look inside of `scripts/codegen.ts` and configure the settings for bundling your SDK and contracts into `__PACKAGE_IDENTIFIER__`:

```
yarn codegen
pnpm codegen
```

### Publishing
Expand All @@ -293,7 +293,7 @@ If you absolutely need to publish manually using npm, ensure to do it this way,

```
cd ./packages/<your-telescope-module>
yarn build
pnpm build
cd dist
npm publish
```
Expand Down
6 changes: 2 additions & 4 deletions boilerplates/telescope/lerna.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"lerna": "6",
"conventionalCommits": true,
"npmClient": "yarn",
"npmClientArgs": [
"--no-lockfile"
],
"npmClient": "pnpm",
"npmClientArgs": [],
"packages": [
"packages/*"
],
Expand Down
2 changes: 1 addition & 1 deletion boilerplates/telescope/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test": "lerna run test --stream --scope __PACKAGE_IDENTIFIER__",
"codegen": "lerna run codegen --stream --scope __PACKAGE_IDENTIFIER__",
"symlink": "symlink-workspace --logLevel error",
"postinstall": "yarn symlink"
"postinstall": "pnpm run symlink"
},
"devDependencies": {
"@types/jest": "^29.5.11",
Expand Down
Loading
Loading