Fix behavior of group exclude option (v3)#1239
Open
ecraig12345 wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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
excludematching so any path matching anexcludepattern is excluded (no leading!required). - Remove
ChangelogGroupOptions.masterPackageNameand requiremainPackageNamein validation and usage. - Expand
beachball migrateto detect and report legacy negatedexcludepatterns andmasterPackageName.
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.
e7787a0 to
77c025e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove the requirement for
VersionGroupOptions.excludeandChangelogGroupOptions.excludepatterns to be negated (leading!).Also remove the deprecated
ChangelogGroupOptions.masterPackageNamein favor ofmainPackageName.Update
beachball migrateto detect both of these issues.Fixes #916