Skip to content

yarn workspaces run in v2? #546

Closed
Closed

Description

@thealjey

Does Yarn 2 not have any other workspace related commands except "workspaces list"?
How do I run a command on all workspaces?

Activity

  1. added
    bug
    on Oct 22, 2019
  2. deini commented on Oct 22, 2019

    @deini
    Member
  3. thealjey commented on Oct 22, 2019

    @thealjey
    Author

    aha, thanks! Then, I guess, the issue is that "yarn -h" fails to mention it :)

  4. thealjey commented on Oct 22, 2019

    @thealjey
    Author
    $ yarn workspaces foreach -p run api-extractor
    Unknown Syntax Error: Command not found; did you mean:
    
    $ yarn workspaces list [-v,--verbose] [--json]
    

    actually, even "yarn outdated" is not working

    $ yarn outdated
    Usage Error: Couldn't find a script named "outdated".
    
    $ yarn run <scriptName> ...
    
    $ yarn -v
    2.0.0-rc.6
    
  5. deini commented on Oct 22, 2019

    @deini
    Member

    Did you add it to your plugins?

    From the docs link I shared:

    In order to use this command you need to add @yarnpkg/plugin-workspace-tools to your plugins.

  6. thealjey commented on Oct 22, 2019

    @thealjey
    Author

    d'oh :)
    that does not explain the absence of "yarn outdated" though
    or, does that also need to be installed as a package now?

  7. deini commented on Oct 22, 2019

    @deini
    Member

    There is nothing like yarn outdated yet, you can see the list of available commands in the docs.

    Not exactly what you are looking for but you could use https://next.yarnpkg.com/cli/up in interactive mode (1-dep at a time tho).

    You could also write a plugin and submit a PR 🕺

  8. arcanis commented on Oct 22, 2019

    @arcanis
    Member

    If not in the documentation, it hasn't been implemented 🙂 Outdated and upgrade-interactive are the two main commands that are currently missing (they would probably be stored in their own optional plugin, though). Contributions welcome!

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions