Skip to content

Commit 207d9b8

Browse files
committed
chore: bump pnpm to 11
Migrates the monorepo from pnpm 9 to pnpm 11 and the GitHub Action to pnpm/action-setup@v6. Also handles the related defaults that pnpm 11 flips on: - `allowBuilds` replaces `onlyBuiltDependencies` — populated at the root workspace and at every nested workspace (e2e, examples/*, templates/*) so installs don't error with `ERR_PNPM_IGNORED_BUILDS`. - `blockExoticSubdeps: false` in `examples/multiple-accounts` because an older published `@latticexyz/store-sync` resolves `clarinet` from a git tarball. - `preferSymlinkedExecutables: true` at the root as a workaround for turbo 1.9.3, whose postinstall replaces its `bin/turbo` JS shim with a Mach-O binary that pnpm 11's default node-wrapped shim can't exec. - `packageManagerStrict: false` at the root, replacing the now-redundant `packages/explorer/.npmrc`. - `pnpm_config_minimum_release_age: 0` in the published-packages test workflow so it can resolve packages immediately after publish (pnpm 11 defaults this to 1 day). - Docker pnpm cache mount id bumped to `pnpm-v11` since pnpm 11 changes the store layout.
1 parent 0e49b51 commit 207d9b8

28 files changed

Lines changed: 95 additions & 16 deletions

.github/actions/setup-prerequisites/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ runs:
44
using: composite
55
steps:
66
- name: Setup pnpm
7-
uses: pnpm/action-setup@v4
7+
uses: pnpm/action-setup@v6
88

99
- name: Setup node
1010
uses: actions/setup-node@v3

.github/workflows/test-published-packages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
uses: ./.github/actions/setup-prerequisites
3232

3333
- name: Test
34+
env:
35+
# Allow resolving freshly published packages (pnpm 11 defaults this to 1 day).
36+
pnpm_config_minimum_release_age: 0
3437
run: |
3538
pnpm create mud@${{ inputs.tag-or-version }} --name project --template ${{ matrix.template }}
3639
pnpm --dir project install

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ RUN curl -L https://foundry.paradigm.xyz/ | bash && \
3131
# pnpm
3232
ENV PNPM_HOME /pnpm
3333
ENV PATH $PATH:$PNPM_HOME
34-
RUN npm install pnpm@9.6.0 --global && pnpm --version
34+
RUN npm install pnpm@11.0.4 --global && pnpm --version
3535

3636
FROM base AS mud
3737
COPY . /app
3838
WORKDIR /app
3939

40-
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
40+
RUN --mount=type=cache,id=pnpm-v11,target=/pnpm/store pnpm install --frozen-lockfile
4141
RUN NODE_OPTIONS=--max-old-space-size=4096 pnpm run build --force
4242

4343
FROM mud AS store-indexer

e2e/pnpm-workspace.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
packages:
22
- packages/*
3+
allowBuilds:
4+
'@foundry-rs/anvil': true
5+
'@foundry-rs/forge': true
6+
esbuild: true
7+
protobufjs: true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
# this file forces pnpm to treat this separately from the monorepo root workspace
2+
3+
allowBuilds:
4+
'@foundry-rs/anvil': true
5+
'@foundry-rs/forge': true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# this file forces pnpm to treat this separately from the monorepo root workspace
2+
3+
allowBuilds:
4+
esbuild: true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# this file forces pnpm to treat this separately from the monorepo root workspace
2+
3+
allowBuilds:
4+
esbuild: true

examples/local-explorer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
},
2828
"engines": {
2929
"node": "^20",
30-
"pnpm": "^9"
30+
"pnpm": "^11"
3131
}
3232
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
packages:
22
- packages/*
3+
allowBuilds:
4+
'@foundry-rs/anvil': true
5+
'@foundry-rs/forge': true
6+
esbuild: true

examples/minimal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
},
2626
"engines": {
2727
"node": "^20",
28-
"pnpm": "^9"
28+
"pnpm": "^11"
2929
}
3030
}

0 commit comments

Comments
 (0)