diff options
author | isaacs <i@izs.me> | 2010-08-03 11:58:23 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-08-03 11:58:23 +0400 |
commit | a0eb2fa9706a5d0956f8bf9797f72c01938dbc01 (patch) | |
tree | c4f3cae495e6b405ab91b60ee5dced5c75fcfd0c | |
parent | 62df3c71f8c101609230a6b1e731c5aa3d58e931 (diff) |
Rename auto-update to update-dependents, and update docs to reflect this
-rw-r--r-- | doc/config.md | 8 | ||||
-rw-r--r-- | lib/build.js | 6 | ||||
-rw-r--r-- | lib/update.js | 4 | ||||
-rw-r--r-- | lib/utils/default-config.js | 2 | ||||
-rw-r--r-- | man/config.1 | 6 |
5 files changed, 20 insertions, 6 deletions
diff --git a/doc/config.md b/doc/config.md index af6ae4749..a977644d4 100644 --- a/doc/config.md +++ b/doc/config.md @@ -79,6 +79,14 @@ Default: true Automatically activate a package after installation, if there is not an active version already. Set to "always" to always activate when installing. +### update-dependents + +Default: true + +Automatically update a package's dependencies after installation, if it is the +newest version installed. Set to "always" to update dependents when a new +version is installed, even if it's not the newest. + ### root Default: `$INSTALL_PREFIX/lib/node` diff --git a/lib/build.js b/lib/build.js index 5ccde1346..5907601e3 100644 --- a/lib/build.js +++ b/lib/build.js @@ -67,9 +67,9 @@ function buildStep (pkg, cb) { ) } function autoUpdate (pkg, cb) { - var auto = npm.config.get("auto-update") + var auto = npm.config.get("update-dependents") if (!auto) return log( - "auto-update disabled by config", "auto-update", cb) + "update-dependents disabled by config", "update-dependents", cb) pkg = pkg && pkg._data || pkg if (auto === "always") { return npm.commands["update-dependents"]([pkg], cb) @@ -79,7 +79,7 @@ function autoUpdate (pkg, cb) { var versions = Object.keys(inst).sort(semver.sort) , maxHave = versions.pop() if (semver.gt(maxHave, pkg.version)) return log( - "downgrade, not updating dependencencies", "auto-update", cb) + "downgrade, not updating dependencencies", "update-dependents", cb) npm.commands["update-dependents"]([pkg], cb) }) } diff --git a/lib/update.js b/lib/update.js index 46abdd58b..7c9fd5a1f 100644 --- a/lib/update.js +++ b/lib/update.js @@ -18,7 +18,7 @@ Does the following: If no packages are specified, then run for all installed packages. -Depending on config value, auto-update, run steps 4-5 +Depending on config value, update-dependents, run steps 4-5 after installation * always - Run an update after every install, so as to @@ -50,7 +50,7 @@ function update (args, cb) { }) } function installUpdates (updates, cb) { - npm.config.set("auto-update", true) + npm.config.set("update-dependents", true) var installList = [] , updateList = [] , preChain = [] diff --git a/lib/utils/default-config.js b/lib/utils/default-config.js index c0c98e684..69208ceef 100644 --- a/lib/utils/default-config.js +++ b/lib/utils/default-config.js @@ -12,7 +12,7 @@ if (!process.execPath) { module.exports = { "auto-activate" : "always" - , "auto-update" : true + , "update-dependents" : true , "auto-deactivate" : true , tag : "latest" , root : path.join(process.execPath, "..", "..", "lib", "node") diff --git a/man/config.1 b/man/config.1 index a920d3f0a..c97f9db15 100644 --- a/man/config.1 +++ b/man/config.1 @@ -109,6 +109,12 @@ Default: true .P Automatically activate a package after installation, if there is not an active version already\. Set to "always" to always activate when installing\. . +.SS "update\-dependents" +Default: true +. +.P +Automatically update a package\'s dependencies after installation, if it is the newest version installed\. Set to "always" to update dependents when a new version is installed, even if it\'s not the newest\. +. .SS "root" Default: \fB$INSTALL_PREFIX/lib/node\fR . |