Skip to content

changeset publish ignoring ignore config #600

Closed

Description

@drwpow

Affected Packages

  • @changesets/cli

Problem

Adding packages to the ignore option in the config isn’t respected when running changeset publish. For example, we have an internal www package which we have added to ignore. But running changeset publish you see in the logs:

npm info www

At first I just assumed that the CLI doesn’t use the config file. So I added a fake package to ignore. But in that instance, the command threw an error to tell me that package foo wasn’t in the project, and it exited. So it seems the config file is being loaded, but not passed to changeset publish.

Perhaps this is intended behavior? If so, please feel to close this issue.

Proposed solution

It seems that getPackages() isn’t loading the config while it’s scanning for packages. If that passed in the config there (as well as CLI flags), it could possibly ignore packages as it’s scanning.

Activity

  1. bjoluc commented on Oct 2, 2021

    @bjoluc

    I'd like to second this. This is our ignore property in .changesets/config.json, and this is what changeset publish decides to do with it. I'm also wondering if this is intended? Thanks in advance!

    (cc @jodeleeuw, @becky-gilbert)

  2. Andarist commented on Oct 2, 2021

    @Andarist
    Member

    @bjoluc thank you for providing a repro case for this - I will try to look into this

  3. Andarist commented on Oct 2, 2021

    @Andarist
    Member

    ignore is not well-documented - as far as I can see. It has this description in the schema though:

    Packages that should not be released.

    So it's totally understandable that you would make an assumption that a package in this list would not be released. It was not necessarily the primary motivation when it was introduced though - the main reason was to "mute" a package, somewhat temporarily. You can check out the original changeset added alongside this feature here:
    https://github.com/atlassian/changesets/pull/371/files#diff-9acd1c6d8a0a10807e1ed227b8c0ec925fd9ce137d25f22dfb9203f443b1571b

    To skip over releasing a package permanently I would advise using package.json#private. Given the schema description and how confusing this can be either way - I'm in favor of extending this to prevent changeset publish from releasing those to match your expectations. @mitchellhamilton wdyt?

  4. bjoluc commented on Oct 3, 2021

    @bjoluc

    Thanks for the clarification, @Andarist! We switched to package.json#private for now. Since the private packages are templates for inexperienced contributors, we would indeed very much welcome an extension to this, so we/contributors do not have to remove the private field for every new package. Low priority though. Thanks again!

  5. grtan commented on Sep 14, 2024

    @grtan

    @Andarist I think that the packages in ignore should also be ignored when publishing, because sometimes some packages in monorepo are managed by changeset, while others are not managed by changeset, and these packages are not private. At this time, when using changeset to publish, those packages not managed by changeset will also be published.

    And the packages in ignore will not have version bump, so these is definitely no need to publish. When need to publish, there will definitely be version bump first, so the package will definitely be removed from ignore.

    There should be no package that does not need a bump version but needs to be published, and even if you want to publish it, it will not succeed because the same version already exists in the registry.

  6. radiorz commented on Jun 9, 2025

    @radiorz

    any update?

  7. bluwy commented on Aug 26, 2026

    @bluwy
    Member

    This should be fixed now as we check for the ignores before checking the publish info:

    packages.packages
    .filter(
    (pkg) => !pkg.packageJson.private && !shouldSkipPackage(pkg, options),
    )
    .map(async (pkg) => {
    const response = await npmRequestQueue.add(() =>
    publishTool.info({

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions