Repository navigation
chore: keep packageManager when cleaning package.json for release - #808
Conversation
`clean-pkg-json` strips `packageManager` before `changeset publish`, so the corepack `yarn` shim falls back to Yarn Classic (1.22.22). Changesets v3 then aborts with "Yarn Classic is not supported" because it runs `yarn --version` to choose a publish tool. Pass `--keep packageManager` so the release keeps resolving Yarn Berry.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
commit: |
Summary
Keep
packageManagerwhenclean-pkg-jsonruns as part ofyarn release:Why
The release of the pending Version Packages PR failed with:
Changesets v3 picks its publish tool by running
yarn --version.clean-pkg-jsonstripspackageManagerfrompackage.jsonbefore that point, so the corepackyarnshim has nothing to pin against and falls back to Yarn Classic:(1.22.22 is also corepack's fallback with no
packageManager.)Passing
--keep packageManagerkeeps the shim pinned to Yarn Berry for the publish step.publishConfig(the provenance setting) is already inclean-pkg-json's default keep list, so it survives either way.Verified locally that after
clean-pkg-json --keep packageManager,packageManageris still present andcorepack yarn --versionstill resolves to4.18.1.Summary by CodeRabbit