-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(commands): Add workspace from v1 #371
Conversation
Is this actually necessary?
category: `Workspace-related commands`, | ||
description: `run a command on the specified namespace`, | ||
details: ` | ||
This command will run a given sub-command on a single workspace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be a fine place to add a note regarding the "global scripts" behavior (search for "colon" in the changelog)? I don't see it documented elsewhere at the moment 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be fair I completely misinterpreted this feature initially. I thought if I have a workspace docs
with a script start
then yarn run docs:start
would automatically work. I didn't realize I actually had to prefix every nested script which is why I would still prefer yarn workspace docs start
.
But I agree that it'd be nice to add a note about yarn docs:start
being equivalent to yarn workspace docs run docs:start
.
It seems like I broke the unit tests, I'll check this. If you also could add a test or two in |
Co-Authored-By: Maël Nison <nison.mael@gmail.com>
Object { | ||
"code": 1, | ||
"stderr": "", | ||
"stdout": "Usage Error: Couldn't find a script named \\"workspace package-a print\\". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how I tell the test to pick up the new command. I copied the .yarnrc.yml
setup from foreach.test.js
which is part of the same plugin as far as I can tell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because you used run('foo bar baz')
instead of run('foo', 'bar', 'baz')
I'm not sure if that's on purpose, but your PRs seem protected against being edited by reviewers. It's too bad because I had some changes (merge and the test fix) to push on it 😅 |
It was late and I was running the wrong command ( |
What's the problem this PR addresses?
Adds
yarn workspace some-workspace run script
from v1. Enables adding a package to a single workspace without having tocd
into it.How did you fix it?
Which packages would need a new release (if any)?
@berry/plugin-workspace-tools
Have you run
yarn version [major|minor|patch] --deferred
in those packages?