Add support for pluggable npm clients#605
Conversation
Allows bootstrap to use `yarn` (for example). Command-line: `lerna bootstrap --npm-client=yarn` In lerna.json: `"npmClient": "yarn"`
|
Shouldn't it be called |
doug-wade
left a comment
There was a problem hiding this comment.
the other thing I wonder about is: the generated lockfile will reveal to users the handwaving we're doing as part of hoisting, right? Does this jive with our value of making it so that each module should function on its own as-is if ejected from the repository, or if users use npm directly? Iirc, yarn ignores package.json in favor of yarn.lockfile if one exists, which would mean a clean install would lead to a module that doesn't build, right?
| #### --npm-client [client] | ||
|
|
||
| Install external dependencies using `[client] install`. Must be an executable | ||
| that knows how to install npm dependencies. |
There was a problem hiding this comment.
Because that's the only command it's used for. 😁
Maybe better to say "Must be a compatible npm registry client"?
It's the client that Lerna uses to connect to the npm registry. NPM calls yarn and the like "third-party registry clients". |
|
Does |
|
Wasn't there talk of folding monorepo functionality into yarn at one point? That'd make this PR obsolete, right? |
Yep, here #371 (comment) |
|
@timdp Yep! That requires a rewrite of Lerna into Yarn and would likely take more than a little while. For everyone that wants to continue using Lerna in the meantime there's is and why we continue to work on in the first place |
|
Interesting, thanks! 👍 |
|
Want. What's the blocker for getting this merged? |
|
This is awesome!! Thanks a ton! |
|
+1 |
|
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Allows bootstrap to use
yarn(for example).Command-line:
lerna bootstrap --npm-client=yarnIn lerna.json:
"npmClient": "yarn"Relates to #371.
Pretty small change with the groundwork laid by #576.