-
Notifications
You must be signed in to change notification settings - Fork 3k
nuke "using npm programmatically" section #11130
Conversation
The programmatic `npm` API is unsupported, and is not guaranteed not to break in non-major versions. Removing this section so newcomers aren't encouraged to discover or use it.
This only really needs to be on |
This was merged to 3.5.5 & 2.14.16! =) |
Thanks! |
So just out of curiosity, if you need to use npm programmatically, what is the current recommendation? To run it through the command line in a child process? |
@Jenius Yes. Eventually we'd like to have the CLI reduced to components that are independently usable to do all of the CLI's various tasks, but that's a very long-term project blocked on reworking how configuration is bootstrapped and managed within the current CLI implementation. Funnily enough, this is also part of what makes the current API unsuitable for third-party use. |
@othiym23 Totally understand how that would be a pretty large challenge. I'm sure whenever that does happen, the organization of the API will be much better, looking forward to it! Child process it is for now then. Thanks for the quick response 🙌 |
The programmatic
npm
API is unsupported, and is not guaranteed not to break in non-major versions.Removing this section so newcomers aren't encouraged to discover or use it.