-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[BUG] Workspaces are not documented, don't appear to work #2036
Comments
hi @justinfagnani thanks for the feedback 😊 Let me try my best to clarify a few things:
It's there in the documentation bundled with npm v7, to read it you can run:
While we strive to build perfect software, there are sometimes unintended bugs and/or adjustments to be made and we'll continue to tackle those in our weekly patch releases.
The workspaces support shipped with Personally, one of my main design goals while implementing the workspaces support was to make sure it is still extensible and catering the rich ecosystem of existing tooling - that said, if you need a more feature-rich experience in We do have a follow-up RFC that extends the set of features provided out of the box by the npm cli and you can keep an eye for that landing in a future semver-minor release of v7.
As I mentioned before they are a part of the public docs shipped within the npm cli but I also understand you might be referring to the https://docs.npmjs.com/ website. In that case we have a team that is hard at work to getting it up-to-date soon. Alright, I'm sorry the reply got this long but I feel it was worth the extra details 😊 I really appreciate your input as it's a very valuable external feedback that will help us shape the communications moving forward - for one, I do have speaking engagements and more blog posting lined up and I'll make sure to translate better what the description in the RFC really means in plain text. Thanks again and please let me know if there are still any questions! 😄 |
Hi @ruyadorno, thank for the helpful clarification. Could you please also elaborate on the following workspace-related questions:
|
Yep, there should be just one single
For
hmmm 🤔 might be a legit bug - from your specific example it would be nice to validate that both
Same as for adding a new dep, the vanilla workflow for now is to manually edit the |
Thanks for the response @ruyadorno. I didn't mean to imply that I think npm should make perfect software. I just really could tell what the status of the feature was given its absence from the docs site, and my inability to get it working beyond the initial install. I'll check out |
btw new docs are up 😍 https://docs.npmjs.com/cli/v7/using-npm/workspaces - thanks @ethomson ❤️ |
Any plans to support "nohoist"? Required for react-native work |
hi @acates-happymoney I think it might be better to track that in a separate issue, would be awesome if you could provide a reproduction case so that it's easier for us to know better how to act on it 😊 |
Using yarn as an example to contrast against in regard to noHoist. Using the workspaces feature, yarn does not add dependencies to node_modules directories in your packages – only at the root level, i.e., yarn hoists all dependencies to the root level. yarn leverages symlinks to point to the different packages. Thereby, yarn includes the dependencies only once in the project. Note, this is on par with npm now. You have to utilize yarn workspaces’ noHoist feature to use otherwise incompatible 3rd party dependencies working in the monorepo environment. You have to specify this in the project root package.json. For more information take a look at the demo project of ConnectDotz. In either event, thanks in advance for the quick response. It sounds like it wont be anytime soon so that was the answer I was looking for!! Cheers and great work on npm7. |
npm workspaces should have just one single package-lock.json refs: npm/cli#2036 (comment)
What is the status of workspaces? Have they actually launched with npm 7? And should anyone actually be trying them yet?
I feel like if the feature really launched that it would be documented somewhere besides an RFC. They're mentioned in the release post, but essentially no where else. I'm very confused about whether we should be able to use them or not.
Could something about their status be added to the public docs?
The text was updated successfully, but these errors were encountered: