diff options
author | Clay Carpenter <claycarpenter@gmail.com> | 2015-05-21 04:52:39 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-05-22 04:04:57 +0300 |
commit | f62ee05333b141539a8e851c620dd2e82ff06860 (patch) | |
tree | 71c8f04e59b804ccdef5119765b247970790448f /README.md | |
parent | c21e8a8d94bcf0ad79dc583ddc53f8366d4813b3 (diff) |
doc: warn about the use of the API
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -129,8 +129,11 @@ you have chosen. ## Using npm Programmatically -If you would like to use npm programmatically, you can do that. -It's not very well documented, but it *is* rather simple. +Although npm can be used programmatically, the CLI's API is meant for use by the CLI *only*, and no guarantees are made regarding its fitness for any other purpose. The semantic version of npm refers the the CLI itself, rather than the underlying API. The CLI API will not necessarily remain stable even though the NPM semver indicates no breaking changes have been made. + +If you want to use npm to reliably perform some task, the safest thing to do is to invoke the `npm` command with appropriate arguments. + +If you still would like to use npm programmatically, it is possible. The API is neither very well documented nor guaranteed to be stable, but it *is* rather simple. Most of the time, unless you actually want to do all the things that npm does, you should try using one of npm's dependencies rather than |