X Tutup
Skip to content

fix(config): do not error on unmatched ignore patterns#1885

Open
mixelburg wants to merge 1 commit intochangesets:mainfrom
mixelburg:fix/ignore-pattern-unmatched-no-error
Open

fix(config): do not error on unmatched ignore patterns#1885
mixelburg wants to merge 1 commit intochangesets:mainfrom
mixelburg:fix/ignore-pattern-unmatched-no-error

Conversation

@mixelburg
Copy link
Contributor

Problem

When specifying a package name or glob expression in the ignore config option that doesn't match any workspace package, changesets throws a validation error:

The package or glob expression "generated-package-*" is specified in the `ignore` option but it is not found in the project.

This makes it impossible to use ignore patterns for packages that may not always be present, such as:

  • Dynamically generated packages (e.g. Prisma client packages that only exist after prisma generate)
  • Conditionally installed packages (present in some environments but not others)
  • Future packages not yet created but already listed in config

Solution

Remove the unmatched-pattern validation for the ignore option. Unlike fixed and linked groups — where all packages must exist to form a valid constraint group — ignoring a non-existent package is a safe no-op: the pattern simply matches nothing and has no effect on the release plan.

The fixed and linked group validations are unchanged, since those do require all referenced packages to exist.

Changes

  • Removes the unmatched-pattern error check in @changesets/config
  • Updates tests: the two tests that previously expected errors for non-existent ignore packages now verify the config parses successfully with an empty ignore array

Related

Closes #1794

Previously, listing a package name or glob expression in the 'ignore'
config option that did not match any workspace package would throw a
validation error. This made it impossible to use ignore patterns for
packages that may not always be present (e.g. dynamically generated
packages, conditionally-installed packages, or future packages not yet
created).

This change removes the unmatched-pattern validation specifically for
the 'ignore' option. Unlike 'fixed' and 'linked' groups -- where all
packages must exist to form a valid constraint group -- ignoring a
non-existent package is a safe no-op: the pattern simply matches nothing
and has no effect on the release plan.

Fixes changesets#1794
@changeset-bot
Copy link

changeset-bot bot commented Mar 9, 2026

⚠️ No Changeset found

Latest commit: 9e3f7a2

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

@Andarist
Copy link
Member

Andarist commented Mar 9, 2026

why we'd only do this for ignore but not for fixed and linked?

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.82%. Comparing base (3ab4d89) to head (9e3f7a2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1885      +/-   ##
==========================================
- Coverage   81.84%   81.82%   -0.03%     
==========================================
  Files          55       55              
  Lines        2396     2393       -3     
  Branches      725      723       -2     
==========================================
- Hits         1961     1958       -3     
  Misses        429      429              
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Changeset fails on ignore pattern when there's no matches

2 participants

X Tutup