Skip to content

Migrate to pnpm - #2993

Merged
zoontek merged 5 commits into
masterfrom
migrate-to-pnpm
Dec 4, 2026
Merged

zoontek merged 5 commits into
masterfrom
migrate-to-pnpm

Conversation

@zoontek

@zoontek zoontek commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@zoontek
zoontek requested a review from hassankhan December 3, 2026 19:48
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 99.2 kB

compressed-size-action

@chrfalch-bot chrfalch-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for this! I checked out the branch and ran pnpm install --frozen-lockfile, format, typecheck, lint, unit and build. All of them pass. The tests give the same result as on master: 55 files, 857 passed, 6 skipped. The release script and the build order still work as before. A few things need attention:

1. The React prerelease job no longer tests React's prerelease channel (.github/workflows/react-integration.yml)
pnpm_config_overrides is applied, but react and react-dom are only peer dependencies of react-native-web. pnpm installs those peers on its own, so they still resolve to react@19.3.1. Only benchmarks and examples get the canary build. I reproduced this locally: require("react") from packages/react-native-web/src gives 19.3.1, and the unit tests pass. So this job would pass without ever testing against react@next. Root @testing-library/react also ends up pairing react@19.3.1 with the canary react-dom. One fix is pnpm --filter react-native-web add -D react@next react-dom@next after install. Another is to make React a catalog: devDependency of react-native-web, so the override reaches it. Either way, it would help to check in the job that react-native-web resolves the canary version.

2. The CI badge points at the old workflow (packages/react-native-web/README.md:65)
The badge uses workflows/tests/badge.svg, but the workflow is now test. Suggest https://github.com/necolas/react-native-web/actions/workflows/test.yml/badge.svg. This README is also the one published to npm.

3. The benchmarks now measure the local package
Before, benchmarks measured react-native-web@0.21.4 from npm. Now it uses workspace:*, and the version labels are gone. That's probably intended, but it should be in the PR description.

Nits

  • CONTRIBUTING requires Node >= 22.18.0, because node scripts/createModuleMap.ts runs TypeScript directly. Adding "engines": { "node": ">=22.18.0" } to the root package.json would enforce that.
  • Removing the markdown-it plugins from eleventy.config.js is fine, since nothing uses them. It isn't needed for the migration, though, so it could go in a separate PR.

@chrfalch

chrfalch commented Dec 3, 2026

Copy link
Copy Markdown

LGTM after the above fix

@chrfalch-bot chrfalch-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks, the React fix works. I ran the react-integration.yml install steps locally. react and react-dom now resolve to the canary build everywhere, including from packages/react-native-web and @testing-library/react. The unit tests pass on it: 55 files, 857 passed, 6 skipped. The normal install, format, typecheck, lint, unit and build all pass on this commit too.

Two follow-ups, neither blocking:

  • In react-integration.yml, pnpm_config_overrides is set only on the install step. Before pnpm unit runs, pnpm checks the installed packages again without the override. With CI=true, that check fails with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH, and the tests happen to keep running on the canary build. Without CI=true, it quietly reinstalls stable React. Moving the variable to the job's env would make this reliable and remove the error from the log.
  • The Vitest 4 → 5 upgrade is a major version bump. It could go in its own PR, so it's easier to review and revert. Test counts are unchanged, though.

@chrfalch

chrfalch commented Dec 4, 2026

Copy link
Copy Markdown

LGTM - Approved!

@zoontek
zoontek merged commit 3881525 into master Dec 4, 2026
5 checks passed
@zoontek
zoontek deleted the migrate-to-pnpm branch December 4, 2026 09:28
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