Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/man/man5/npm-json.5')
-rw-r--r--deps/npm/man/man5/npm-json.556
1 files changed, 55 insertions, 1 deletions
diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5
index a0cd2c9b6fc..89083280de1 100644
--- a/deps/npm/man/man5/npm-json.5
+++ b/deps/npm/man/man5/npm-json.5
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "PACKAGE\.JSON" "5" "March 2014" "" ""
+.TH "PACKAGE\.JSON" "5" "May 2014" "" ""
.
.SH "NAME"
\fBpackage.json\fR \-\- Specifics of npm\'s package\.json handling
@@ -427,6 +427,9 @@ npm help See semver for more details about specifying version ranges\.
npm help \fB~version\fR "Approximately equivalent to version" See semver
.
.IP "\(bu" 4
+npm help \fB^version\fR "Compatible with version" See semver
+.
+.IP "\(bu" 4
\fB1\.2\.x\fR 1\.2\.0, 1\.2\.1, etc\., but not 1\.3\.0
.
.IP "\(bu" 4
@@ -567,6 +570,57 @@ can consume the functionality without requiring them to compile it
themselves\. In dev mode (ie, locally running \fBnpm install\fR), it\'ll
run this script as well, so that you can test it easily\.
.
+.SH "peerDependencies"
+In some cases, you want to express the compatibility of your package with an
+host tool or library, while not necessarily doing a \fBrequire\fR of this host\.
+This is usually refered to as a \fIplugin\fR\|\. Notably, your module may be exposing
+a specific interface, expected and specified by the host documentation\.
+.
+.P
+For example:
+.
+.IP "" 4
+.
+.nf
+{
+ "name": "tea\-latte",
+ "version": "1\.3\.5"
+ "peerDependencies": {
+ "tea": "2\.x"
+ }
+}
+.
+.fi
+.
+.IP "" 0
+.
+.P
+This ensures your package \fBtea\-latte\fR can be installed \fIalong\fR with the second
+major version of the host package \fBtea\fR only\. The host package is automatically
+installed if needed\. \fBnpm install tea\-latte\fR could possibly yield the following
+dependency graph:
+.
+.IP "" 4
+.
+.nf
+├── tea\-latte@1\.3\.5
+└── tea@2\.2\.0
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Trying to install another plugin with a conflicting requirement will cause an
+error\. For this reason, make sure your plugin requirement is as broad as
+possible, and not to lock it down to specific patch versions\.
+.
+.P
+Assuming the host complies with semver \fIhttp://semver\.org/\fR, only changes in
+the host package\'s major version will break your plugin\. Thus, if you\'ve worked
+with every 1\.x version of the host package, use \fB"^1\.0"\fR or \fB"1\.x"\fR to express
+this\. If you depend on features introduced in 1\.5\.2, use \fB">= 1\.5\.2 < 2"\fR\|\.
+.
.SH "bundledDependencies"
Array of package names that will be bundled when publishing the package\.
.