Skip to content

Feat: Support glob for -w **/* monorepo workspaces #5869

Closed

Description

@1aron

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

package.json

{
    "workspaces": [
        "packages/*",
        "examples/*"
    ]
}
npm version -w packages/a -w packages/b -w packages/c ...
npm publish -w packages/a -w packages/b -w packages/c ...

Expected Behavior

package.json

npm version -w packages/*
npm publish -w packages/*

even filter some workspaces:

npm version --filter-workspace examples/*
npm publish --filter-workspace examples/*

Activity

  1. added
    Bugthing that needs fixing
    Needs Triageneeds review for next steps
    Release 8.xwork is associated with a specific npm 8 release
    on Nov 18, 2022
  2. changed the title [-]Feat: Support Glob for `-w **/*` monorepo[/-] [+]Feat: Support glob for `-w **/*` monorepo[/+] on Nov 18, 2022
  3. changed the title [-]Feat: Support glob for `-w **/*` monorepo[/-] [+]Feat: Support glob for `-w **/*` monorepo workspaces[/+] on Nov 18, 2022
  4. ljharb commented on Nov 18, 2022

    @ljharb
    Contributor

    Try quoting the string that contains asterisks - otherwise the shell expands it before npm sees it.

  5. 1aron commented on Nov 21, 2022

    @1aron
    ContributorAuthor

    Now it works with commands like this npm version 2.0.0-beta.100 --workspace packages.

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

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 8.xwork is associated with a specific npm 8 release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions