feat(cli): allow comma-separated packages in --major/--minor/--patch by youdie006 · Pull Request #2135 · changesets/changesets · GitHub
Skip to content

feat(cli): allow comma-separated packages in --major/--minor/--patch - #2135

Merged
Andarist merged 3 commits into
changesets:mainfrom
youdie006:feat/comma-separated-bump-packages
Jul 28, 2026
Merged

Andarist merged 3 commits into
changesets:mainfrom
youdie006:feat/comma-separated-bump-packages

Conversation

@youdie006

Copy link
Copy Markdown
Contributor

Summary

Implements #2134 — allow comma-separated package lists in --major, --minor, and --patch.

changeset add --minor pkg1,pkg2 --patch pkg3 now expands the comma-separated values, equivalent to --minor pkg1 --minor pkg2 --patch pkg3. Whitespace around names is trimmed and empty entries are dropped; single packages and repeated flags keep working as before.

  • normalizeOptions in packages/cli/src/cli.ts flatMaps each value on commas.
  • Updated the three option help strings to note (comma-separated).
  • Added a cli.test.ts case covering comma-split, whitespace-trim, and repeated-flag merge.

Fixes #2134

changeset add --minor pkg1,pkg2 now expands to per-package entries,
equivalent to --minor pkg1 --minor pkg2. Whitespace is trimmed and empty
entries dropped; single packages and repeated flags are unchanged.
@changeset-bot

changeset-bot Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.59%. Comparing base (3910adf) to head (20ca721).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2135      +/-   ##
==========================================
+ Coverage   84.57%   84.59%   +0.01%     
==========================================
  Files          80       80              
  Lines        3125     3128       +3     
  Branches      878      878              
==========================================
+ Hits         2643     2646       +3     
  Misses        427      427              
  Partials       55       55              

☔ View full report in Codecov by Harness.
📢 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.

Comment thread packages/cli/src/cli.ts
Comment thread packages/cli/src/cli.test.ts
Comment thread .changeset/comma-separated-bump-packages.md Outdated
@bluwy

bluwy commented Jul 27, 2026

Copy link
Copy Markdown
Member

@youdie006 Are you still interested in updating the PR?

Address review feedback: add tests for the whitespace trimming and
.filter(Boolean) empty-entry dropping in the comma-separated flag
expansion, and cover the version command's --ignore flag which shares
the same normalizeOptions path. Note the --ignore support (and the
trim/empty behavior) in the changeset entry.
@youdie006

Copy link
Copy Markdown
Contributor Author

@bluwy bluwy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! LGTM 👍

@bluwy
bluwy enabled auto-merge July 27, 2026 16:12
@bluwy
bluwy added this pull request to the merge queue Jul 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 27, 2026
@Andarist
Andarist added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 28, 2026
@Andarist
Andarist added this pull request to the merge queue Jul 28, 2026
Merged via the queue into changesets:main with commit fd7724a Jul 28, 2026
15 checks passed
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.

Allow comma-seperated packages designation in --major, --minor, and --patch

4 participants