Repository navigation
ci: enable npm publish provenance for changesets v3 - #807
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
commit: |
592865e to
285cb38
Compare
Changesets v3 publishes Yarn projects through `yarn npm publish`, which only emits an npm provenance statement when `npmPublishProvenance` (or `publishConfig.provenance`) asks for it. Declare `publishConfig.provenance` in package.json rather than in `.yarnrc.yml`, because the Yarn 3.8.7 jobs on older Node.js reject the `npmPublishProvenance` setting while ignoring the manifest field, and `clean-pkg-json` keeps `publishConfig`.
285cb38 to
d0be3ac
Compare
Summary
Set
publishConfig.provenance: trueinpackage.json.Why
Changesets v3 publishes Yarn projects via
yarn npm publish, which only writes a provenance statement whennpmPublishProvenanceorpublishConfig.provenanceis enabled. The release workflow already has the requiredid-token: writepermission.publishConfig.provenanceis the standard manifest field and is portable across package managers. It also avoids breaking the Node 14/16 CI jobs: those pin Yarn 3.8.7, which rejects thenpmPublishProvenancesetting in.yarnrc.ymlbut ignores the manifest field.clean-pkg-jsonkeepspublishConfig, so the release flow is unaffected.Summary by CodeRabbit