Skip to content

Fix behavior of group exclude option (v3)#1239

Open
ecraig12345 wants to merge 2 commits into
mainfrom
v3-version-group
Open

Fix behavior of group exclude option (v3)#1239
ecraig12345 wants to merge 2 commits into
mainfrom
v3-version-group

Conversation

@ecraig12345

Copy link
Copy Markdown
Member

Remove the requirement for VersionGroupOptions.exclude and ChangelogGroupOptions.exclude patterns to be negated (leading !).

Also remove the deprecated ChangelogGroupOptions.masterPackageName in favor of mainPackageName.

Update beachball migrate to detect both of these issues.

Fixes #916

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates beachball v3 configuration behavior to make group exclude patterns intuitive (non-negated globs) and completes the removal of deprecated changelog.groups[*].masterPackageName in favor of mainPackageName, with corresponding migration guidance and checks.

Changes:

  • Fix exclude matching so any path matching an exclude pattern is excluded (no leading ! required).
  • Remove ChangelogGroupOptions.masterPackageName and require mainPackageName in validation and usage.
  • Expand beachball migrate to detect and report legacy negated exclude patterns and masterPackageName.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/beachball/src/validation/isValidChangelogOptions.ts Tightens changelog group validation to require mainPackageName.
packages/beachball/src/types/ChangelogOptions.ts Updates docs for exclude semantics; removes deprecated masterPackageName.
packages/beachball/src/types/BeachballOptions.ts Updates docs for version group exclude semantics.
packages/beachball/src/monorepo/isPathIncluded.ts Implements new non-negated exclude behavior and updates function signature.
packages/beachball/src/monorepo/getScopedPackages.ts Adapts scoping logic to new isPathIncluded API and strips ! for excludes.
packages/beachball/src/monorepo/getPackageGroups.ts Updates group membership checks to use new isPathIncluded API.
packages/beachball/src/commands/migrate.ts Adds v3 migration checks for negated excludes and masterPackageName; throws on required updates.
packages/beachball/src/changelog/writeChangelog.ts Removes masterPackageName fallback; updates isPathIncluded call.
packages/beachball/src/tests/validate/isValidChangelogOptions.test.ts Updates validation tests for removal of masterPackageName.
packages/beachball/src/tests/monorepo/isPathIncluded.test.ts Updates tests for new isPathIncluded signature and exclude semantics.
packages/beachball/src/tests/monorepo/getPackageGroups.test.ts Updates tests to use non-negated exclude patterns.
packages/beachball/src/functional/commands/migrate.test.ts Adds functional coverage for new migrate checks and error output.
docs/overview/v3-migration.md Documents migration flow and adds a breaking change note for exclude behavior.
docs/concepts/groups.md Updates examples/tables for new exclude semantics and mainPackageName.
change/change-085686e8-22a7-4276-be7f-2335a0f8f8e5.json Records major change for removing masterPackageName.
change/beachball-9c18f781-7c73-4b14-adb7-a5fc6930628a.json Records major change for corrected exclude behavior.
.vscode/launch.json Minor launch config tweak/comment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/beachball/src/monorepo/isPathIncluded.ts
Comment thread docs/concepts/groups.md Outdated
Comment thread docs/concepts/groups.md Outdated
Comment thread docs/concepts/groups.md Outdated
Comment thread docs/overview/v3-migration.md
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.

Fix behavior of group "exclude" options

2 participants