Skip to content

Add support for pluggable npm clients#605

Merged
hzoo merged 2 commits intolerna:masterfrom
gigabo:plug-npm
Feb 28, 2017
Merged

Add support for pluggable npm clients#605
hzoo merged 2 commits intolerna:masterfrom
gigabo:plug-npm

Conversation

@gigabo
Copy link
Copy Markdown
Contributor

@gigabo gigabo commented Feb 17, 2017

Allows bootstrap to use yarn (for example).

Command-line: lerna bootstrap --npm-client=yarn

In lerna.json: "npmClient": "yarn"

Relates to #371.

Pretty small change with the groundwork laid by #576.

Allows bootstrap to use `yarn` (for example).

Command-line: `lerna bootstrap --npm-client=yarn`

In lerna.json: `"npmClient": "yarn"`
@wtgtybhertgeghgtwtg
Copy link
Copy Markdown
Contributor

Shouldn't it be called package-manager instead of npm-client or something?

Copy link
Copy Markdown
Contributor

@doug-wade doug-wade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread README.md
#### --npm-client [client]

Install external dependencies using `[client] install`. Must be an executable
that knows how to install npm dependencies.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why only install?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because that's the only command it's used for. 😁

Maybe better to say "Must be a compatible npm registry client"?

@gigabo
Copy link
Copy Markdown
Contributor Author

gigabo commented Feb 17, 2017

Shouldn't it be called package-manager instead of npm-client or something?

It's the client that Lerna uses to connect to the npm registry.

NPM calls yarn and the like "third-party registry clients".

@wtgtybhertgeghgtwtg
Copy link
Copy Markdown
Contributor

Does lerna specify the npm registry? I think yarn tries to pull from its own registry, first.

@timdp
Copy link
Copy Markdown

timdp commented Feb 20, 2017

Wasn't there talk of folding monorepo functionality into yarn at one point? That'd make this PR obsolete, right?

@karlhorky
Copy link
Copy Markdown

Wasn't there talk of folding monorepo functionality into yarn at one point?

Yep, here #371 (comment)

@hzoo
Copy link
Copy Markdown
Contributor

hzoo commented Feb 20, 2017

@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

@timdp
Copy link
Copy Markdown

timdp commented Feb 20, 2017

Interesting, thanks! 👍

@rexxars
Copy link
Copy Markdown

rexxars commented Feb 21, 2017

Want. What's the blocker for getting this merged?

@neeschit
Copy link
Copy Markdown

This is awesome!! Thanks a ton!

Copy link
Copy Markdown
Member

@evocateur evocateur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hulkish
Copy link
Copy Markdown

hulkish commented Feb 28, 2017

+1

@lock
Copy link
Copy Markdown

lock Bot commented Dec 27, 2018

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.

@lock lock Bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants