Skip to content

Skip ignored and private packages in the add-changeset link - #135

Open
JounQin wants to merge 1 commit into
changesets:mainfrom
JounQin:fix/should-skip-package
Open

JounQin wants to merge 1 commit into
changesets:mainfrom
JounQin:fix/should-skip-package

Conversation

@JounQin

@JounQin JounQin commented Sep 19, 2026

Copy link
Copy Markdown

Fixes #44

Problem

The maintainer "add a changeset if you're a maintainer" link listed every changed workspace package, including ignored and private ones. Adding a changeset from that link then fails with:

Mixed changesets that contain both ignored and not ignored packages are not allowed

This is especially confusing for external contributors who aren't familiar with the repo's changesets config.

Solution

Filter the changed packages with @changesets/should-skip-package, which is the same helper used by @changesets/cli add. A package is no longer suggested when it is:

  • listed in the ignore config, or
  • private without privatePackages.version enabled, or
  • missing a version field (it cannot be versioned).

Tests

  • does not include private packages in the add-changeset link
  • includes private packages in the add-changeset link when opted in
  • does not include ignored packages in the add-changeset link
  • does not include packages without a version in the add-changeset link

Existing fixtures used unversioned packages; they now declare a version so they remain versionable.

The maintainer "add a changeset" link listed every changed workspace
package, including ignored and private ones. Adding such a changeset
then fails with "Mixed changesets that contain both ignored and not
ignored packages are not allowed".

Filter the changed packages with `@changesets/should-skip-package`,
matching what `@changesets/cli add` does, so ignored packages, private
packages (unless `privatePackages.version` is enabled) and packages
without a `version` are no longer suggested.
Copilot AI lite review requested due to automatic review settings September 19, 2026 05:05
@vercel

vercel Bot commented Sep 19, 2026

Copy link
Copy Markdown

@JounQin is attempting to deploy a commit to the Changesets Team on Vercel.

A member of the Team first needs to authorize it.

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 review overview

🟢 Approval recommended

The reviewed changes are covered by tests with no blocking issues identified.

Review effort: Lite
Findings: None

What changed in this PR

Updates the maintainer changeset link to include only versionable changed workspace packages.

Changes:

  • Filters ignored, private, and unversioned packages.
  • Adds the Changesets helper dependency and lockfile entry.
  • Adds regression tests and updates fixtures.
File Description
test/​index.test.ts Adds filtering tests and fixture versions.
pnpm-lock.yaml Locks the new dependency.
package.json Adds the filtering dependency.
get-changed-packages.ts Applies package filtering.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

Remove ignored/private packages on "add a changeset if you're a maintainer" link

2 participants