Skip to content

ci(e2e): Run E2E tests with pnpm 12 - #25334

Merged
s1gr1d merged 10 commits into
developfrom
sig/e2e-pnpm-12
Oct 15, 2026
Merged

s1gr1d merged 10 commits into
developfrom
sig/e2e-pnpm-12

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Moves the E2E tests from pnpm 9 to pnpm 12. Volta still manages node.

  • Every app has a pnpm-workspace.yaml. pnpm 11+ reads its settings only from this file.
    • allowBuilds: pnpm 11+ fails the install on build scripts that are not listed. false is only for scripts that just print a message.
    • minimumReleaseAge: 0: by default, pnpm 11+ installs only releases that are at least 24 hours old, and falls back to older versions. The apps test against the newest releases, so the E2E runner fails if an app does not set it.
  • Updated to @electron/rebuild ^4.2.1. Older versions depend on @electron/node-gyp from git, and pnpm 11+ blocks git dependencies of dependencies.
  • Ignored overrides fixed. The bundler-plugin fixtures had overrides in package.json#pnpm, and some apps used package.json#resolutions. pnpm 11+ ignores both without an error. The E2E runner now fails if an app still uses them.
  • Test app fixes for pnpm 12.
    • The Next.js tests and build assertions read the installed version from next/package.json. pnpm add next@15 now saves ^15.x.y, and the old version checks did not work with the ^.
    • The tanstackstart apps use "nitro": "^3.0.0", because pnpm 12 resolved latest || * to the placeholder nitro@0.0.0. This installs the same nitro@3.0.0 as pnpm 9. A follow-up moves them to the nitro beta, which needs Vite 8.
    • 7 apps no longer run npx playwright install in test:build. CI already installs the app's Playwright version, and the second install ran at the same time and failed.

Why pnpm is a root dev dependency

pnpm switches to the version in a packageManager field, but a pnpm must already be installed to do that. Yarn installs that first pnpm as a dev dependency, because Volta can't run pnpm 12 and is unmaintained. The pnpm package is a native binary, so it does not depend on the node version that an app pins. yarn.lock pins the version, so local runs and CI use the same pnpm. Contributors need no extra setup, and CI caches pnpm with node_modules.

Rejected alternatives:

  • pnpm/action-setup alone: it only installs pnpm in CI. Contributors would have to install pnpm themselves, and their version could differ from CI.
  • Corepack: it is deprecated, and Node 25 no longer includes it.
  • mise: no getsentry JS repo uses it, and contributors would need one more tool (alongside Volta).

⚠️ @JPeer264 When the repo moves from Yarn to pnpm, remove the dev dependency and set packageManager in the root package.json. A test app can still pin another pnpm version (10.30 or newer, which reads allowBuilds) with its own packageManager field.

Volta cannot run pnpm 12, so pnpm is now a root devDependency. Volta only
pins node per app. pnpm 11+ reads settings only from pnpm-workspace.yaml and
blocks unlisted build scripts, so each app now has a pnpm-workspace.yaml with
allowBuilds and minimumReleaseAge: 0.
@s1gr1d
s1gr1d marked this pull request as ready for review October 14, 2026 10:26
@s1gr1d
s1gr1d requested review from JPeer264 and mydea October 14, 2026 11:17
Comment thread dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/package.json Outdated
"typescript": "~5.8.3",
"vite": "^7.3.2"
},
"volta": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not directly related to this test, but we should actually replace these with a reference to the workspace volta config.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I may open a PR to update this everywhere)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mydea

mydea commented Oct 14, 2026

Copy link
Copy Markdown
Member

Semi related, opened #25369 to actually update volta config in e2e test apps to better align with the fact we are using node 24 anyhow now by default!

Comment thread dev-packages/e2e-tests/test-applications/aws-serverless-layer/package.json Outdated
# Conflicts:
#	dev-packages/e2e-tests/test-applications/browser-bfcache/package.json
#	dev-packages/e2e-tests/test-applications/browser-mfe-vite/package.json
#	dev-packages/e2e-tests/test-applications/browser-webworker-vite/package.json
#	dev-packages/e2e-tests/test-applications/remix-v3/package.json
@JPeer264
JPeer264 added this pull request to stack #25387 October 15, 2026 08:47
# Conflicts:
#	dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/package.json
#	dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/package.json
#	dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/package.json
#	dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/package.json
#	dev-packages/bundler-plugin-integration-tests/fixtures/vite4/package.json
#	dev-packages/bundler-plugin-integration-tests/fixtures/vite6/package.json
#	dev-packages/bundler-plugin-integration-tests/fixtures/vite7/package.json
#	dev-packages/bundler-plugin-integration-tests/fixtures/vite8/package.json
#	dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/package.json

@JPeer264 JPeer264 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just added nits mostly

Comment thread .agents/skills/e2e/SKILL.md Outdated
- **Packed tarballs missing**: Run `yarn build:tarball` at the repo root, then `yarn test:prepare` in `dev-packages/e2e-tests`
- **Build failures**: Fix build errors before running tests
- **pnpm errors such as `packages field missing or empty`**: The app needs the pnpm version in its `volta.pnpm`. Run with Volta, which installs that version
- **`ERR_PNPM_IGNORED_BUILDS`**: A dependency has a build script that the app's `allowBuilds` does not list. Add it to the app's `pnpm-workspace.yaml`: `true` if the app needs the script, `false` if the script only prints a message

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: Theoretically pnpm approve-builds is adding it - maybe worth to add this here

Comment thread .github/actions/install-pnpm/action.yml Outdated
steps:
- name: Resolve pnpm version
id: pnpm-version
# The devDependency is the one pnpm version for CI and local runs. An app that needs another version sets

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super-l: It is weird that it is written devDependency and not "dev dependency" - maybe we can rename it to the latter. First I read it any thought that something is off 😅

Suggested change
# The devDependency is the one pnpm version for CI and local runs. An app that needs another version sets
# The dev dependency is the one pnpm version for CI and local runs. An app that needs another version sets

@@ -0,0 +1 @@
minimumReleaseAge: 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q/l: Couldn't we make one more global pnpm-workspace.yaml in the e2e test root and copy it over into each directory? Theoretically we don't treat each folder as own workspace, but we potentially forget to set minimumRelaseAge: 0 on new tests.

If we keep it though, we should add a bugbot rule that this is set as a minimum on new e2e tests or make sure in our runners that this is set. wdyt?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a rule for that 👍

Comment thread dev-packages/e2e-tests/test-applications/hydrogen-react-router-7/package.json Outdated
"react": "^19.2.0",
"react-dom": "^19.2.0",
"nitro": "latest || *",
"nitro": "^3.0.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: Is that change necessary in this PR? Or was it required to be changed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, listed in the PR description:

The tanstackstart apps use "nitro": "^3.0.0", because pnpm 12 resolved latest || * to the placeholder nitro@0.0.0. This installs the same nitro@3.0.0 as pnpm 9. A follow-up moves them to the nitro beta, which needs Vite 8.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for confirming. Sorry I forgot the PR description after scrolling through all the changes 😅

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR ref: #25451

"react": "^19.2.0",
"react-dom": "^19.2.0",
"nitro": "latest || *",
"nitro": "^3.0.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread dev-packages/e2e-tests/README.md Outdated
@s1gr1d
s1gr1d merged commit 1c5303c into develop Oct 15, 2026
1096 of 1103 checks passed
@s1gr1d
s1gr1d deleted the sig/e2e-pnpm-12 branch October 15, 2026 14:24
s1gr1d added a commit that referenced this pull request Oct 16, 2026
Follow-up to #25334. The tanstackstart-react apps now use the nitro beta
instead of the deprecated `nitro@3.0.0`. The beta needs Vite 8, so the
apps also use Vite 8 and `@vitejs/plugin-react-swc` 4, which is the
first version that supports Vite 8.

The SDK still supports Vite 7. Only the test apps changed.
JPeer264 added a commit that referenced this pull request Oct 19, 2026
This moves the monorepo from Yarn 1 to pnpm 12.11.2 (`packageManager`):
scripts, CI workflows, the release script and the contributor docs.

Review it commit by commit:

1. A plain `pnpm import` of `yarn.lock`. Most of the added lines of the
PR are here.
2. The dependency changes against that import: the root `workspace:*`
entries, `h3` and `unstorage` for `@sentry/nitro` and `@sentry/nuxt`,
the `yarn.lock` versions of the npm aliases (`pnpm import` resolves them
again), and `pnpm dedupe`.
3. The move from Yarn to pnpm. This commit does not change the lockfile.
4. The bump to pnpm 12: the settings move to `pnpm-workspace.yaml`, the
pnpm dev dependency of #25334 is removed, and `pnpm dedupe` with pnpm 12
merges 10 versions (no new versions).

Other changes beyond the rename:

- Scripts are called with `pnpm run <script>` and package binaries with
`pnpm exec <bin>`. Volta's pnpm 9 rejects the options of `pnpm test`
(for example `--watch`) before it switches to pnpm 12.
- `@sentry/server-runtime-injection` vendors the same files as with
Yarn. It declares `supports-color` 7.2.0, because pnpm installs another
version next to `debug`, and it names vendored files by their path after
the last `node_modules/`.
- The Lambda layer build writes its overrides to a `pnpm-workspace.yaml`
(pnpm 12 does not read `resolutions`), and it no longer writes through
pnpm's hard links into `packages/core/build`.
- The rollup bundler fixtures declare `@babel/preset-react`, like the
webpack fixture. Their configs use it, and with Yarn they found it in
the root `node_modules`. pnpm 12 installs it only in
`packages/bundler-plugins/node_modules`.

## Install layout decisions

`nodeLinker: hoisted` and `autoInstallPeers: false` give the same flat
`node_modules` as Yarn 1. This is only for now, to make the switch from
Yarn easier. The next PR moves to the isolated pnpm default, where every
package must declare all its imports.

## Workspace decisions

All workspace packages are root `devDependencies` (`workspace:*`),
because some configs import workspace packages without declaring them.
The next PR removes them. The `workspaces` list stays in `package.json`
for Deno. `verify-packages-versions.js` checks that it matches the
`packages` list of `pnpm-workspace.yaml`, and that every workspace
package is in the root `devDependencies`. New packages must go into all
three.

## pnpm version decisions

This goes directly to pnpm 12, because a pnpm 9 root does not work with
the pnpm 12 dev dependency of #25334: nested `pnpm` calls in scripts get
pnpm 12, which refuses the pnpm 9 install. Volta cannot run pnpm 12.4 or
newer
([volta-cli/volta#2114](volta-cli/volta#2114)),
so it keeps pnpm 9.15.9, and `manage-package-manager-versions` in
`.npmrc` switches it to the `packageManager` version.

## Known issues

- The release and canary workflows did not run on this branch. A local
simulation of 11.8.0 ran the pre-release script, the CI build, the
tarballs and `npm publish --dry-run`. The tarballs have the same files
as the published 11.7.0.
- npm commands in the repo warn about `manage-package-manager-versions`
in `.npmrc`. npm does not use this setting, but Volta's pnpm 9 needs it
to switch to pnpm 12.
- The Cursor cloud setup sets `VOLTA_FEATURE_PNPM=1` only in its own
commands. A new shell that reads only `~/.bashrc` does not find pnpm.
- Dependency Review (not a required check) fails, because it treats
every package of the new lockfile as added. It reports advisories for
`yarn.lock` versions that are dismissed in Dependabot. After the merge,
it checks only lockfile changes again.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants