-
Notifications
You must be signed in to change notification settings - Fork 239
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
RFC: npm workspaces - Config management #273
base: main
Are you sure you want to change the base?
Conversation
Per discussion on the call today, i have questions about how “add” works with a glob, or how “rm” works when the package to be removed is already included in a glob. |
To elaborate a bit more the confusion comes from the fact that supporting globs can get confusing really fast, one of the examples mentioned during the weekly meeting was trying to add negative globs, e.g: So the tricky question is what is a behavior that would be reasonable and actually helpful for the majority of users with regards to
|
I am generally in favor of adding some commands to make working with workspaces easy. I generally like how
|
@ruyadorno you had mentioned on the call there have been talks with the team behind lerna, so it might be cool to add that as a kind of context. Additionally. a link to I think workspaces v2 is what it is called would be nice here too, so people can follow up with the previous discussion. |
@Christian24 I mentioned that in the context of the RFC for running commands: #117 we do have a bunch of the conversations documented there 😊 |
|
||
$ npm workspaces ls | ||
|
||
$ npm workspaces add ./packages/dep-a |
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.
Reading npm workspaces add <package>
I would not expect it to mutate the root config. I would expect it to mirror npm workspaces install <package>
in #117 since npm add/rm
are already aliases to install/uninstall dependencies.
I think npm workspaces <subcommand>
can either be a command that operates on package.json#workspaces
or every <workspaces>/package.json
mixing and matching is confusing.
One thing we did in Bolt was have a bolt project/p
command that allowed you to run commands on the root package containing all the workspaces.
Alternatives:
npm workspaces-config add/rm
npm project workspaces add/rm
npm workspaces add-workspace/rm-workspace
Adds a workspaces config management workflow.
See RFC