Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Filter packages shown in CLI when writing a changeset #1325

Open
quantizor opened this issue Mar 12, 2024 · 2 comments
Open

[Request] Filter packages shown in CLI when writing a changeset #1325

quantizor opened this issue Mar 12, 2024 · 2 comments

Comments

@quantizor
Copy link

Affected Packages

@changesets/cli

Problem

I have three packages in a monorepo, and only one of them is actually publishable (the others have private: true.) When I run yarn changeset, it asks me which ones I want to write changesets for, including private packages. I very rarely change these other packages and dislike that the CLI forces me to choose which package to bump every time when the others are never relevant.

Proposed solution

  1. Allow config to focus the CLI, specifically changeset add to a specific package or list of packages, or
  2. Add a flag to changeset add to omit unpublishable packages
@quantizor quantizor changed the title [Bug] Ignored packages shown in CLI when writing a changeset [Request] Filter packages shown in CLI when writing a changeset Mar 12, 2024
@quantizor
Copy link
Author

Digging into the code, I noticed that there is an explicit check to ensure that version is not set for packages marked as private: true, why is that? Would it be OK if I removed that limitation?

@altano
Copy link

altano commented Apr 1, 2024

Are you referring to this check?:

if (!config.privatePackages.version && packageJson.private) {

That's actually reading out of the config. So if you set "privatePackages": false in your config.json, it will ignore private packages (whether they have a version or not).

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

No branches or pull requests

2 participants