Skip to content

ci: enable npm publish provenance for changesets v3 - #807

Merged
JounQin merged 1 commit into
mainfrom
chore/npm-publish-provenance
Oct 13, 2026
Merged

JounQin merged 1 commit into
mainfrom
chore/npm-publish-provenance

Conversation

@JounQin

@JounQin JounQin commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Set publishConfig.provenance: true in package.json.

Why

Changesets v3 publishes Yarn projects via yarn npm publish, which only writes a provenance statement when npmPublishProvenance or publishConfig.provenance is enabled. The release workflow already has the required id-token: write permission.

publishConfig.provenance is 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 the npmPublishProvenance setting in .yarnrc.yml but ignores the manifest field. clean-pkg-json keeps publishConfig, so the release flow is unaffected.

Summary by CodeRabbit

  • Chores
    • Published packages now include provenance information, helping recipients verify their origin.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 11:34
@changeset-bot

changeset-bot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d0be3ac

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4467edcb-f57b-4c4e-9c44-1bdadf1532b5
📥 Commits

Reviewing files that changed from the base of the PR and between 7c923c4 and d0be3ac.

📒 Files selected for processing (1)
  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

📝 Walkthrough

The package configuration now enables provenance for publishing.

Changes: Release publishing

Layer / File(s) Summary
Configure package provenance
package.json
publishConfig.provenance is set to true.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to d0be3

The release configuration supports provenance publishing; no actionable merge risk remains after normal checks.

Pre-merge checks · Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the main change: enabling npm publish provenance for Changesets v3.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-prettier@807

commit: d0be3ac

@JounQin
JounQin force-pushed the chore/npm-publish-provenance branch 2 times, most recently from 592865e to 285cb38 Compare October 13, 2026 11:41
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`.
@JounQin
JounQin force-pushed the chore/npm-publish-provenance branch from 285cb38 to d0be3ac Compare October 13, 2026 11:44
@JounQin
JounQin merged commit e3e5238 into main Oct 13, 2026
21 checks passed
@JounQin
JounQin deleted the chore/npm-publish-provenance branch October 13, 2026 11:59
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.

2 participants