Repository navigation
Migrate to pnpm - #2993
Migrate to pnpm#2993
Conversation
|
Size Change: 0 B Total Size: 99.2 kB |
chrfalch-bot
left a comment
There was a problem hiding this comment.
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.tsruns TypeScript directly. Adding"engines": { "node": ">=22.18.0" }to the rootpackage.jsonwould enforce that. - Removing the markdown-it plugins from
eleventy.config.jsis fine, since nothing uses them. It isn't needed for the migration, though, so it could go in a separate PR.
|
LGTM after the above fix |
chrfalch-bot
left a comment
There was a problem hiding this comment.
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_overridesis set only on the install step. Beforepnpm unitruns, pnpm checks the installed packages again without the override. WithCI=true, that check fails withERR_PNPM_LOCKFILE_CONFIG_MISMATCH, and the tests happen to keep running on the canary build. WithoutCI=true, it quietly reinstalls stable React. Moving the variable to the job'senvwould 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.
|
LGTM - Approved! |
No description provided.