Skip to content
Browse files

Rename auto-update to update-dependents, and update docs to reflect this

  • Loading branch information...
1 parent 62df3c7 commit a0eb2fa9706a5d0956f8bf9797f72c01938dbc01 @isaacs isaacs committed
Showing with 20 additions and 6 deletions.
  1. +8 −0 doc/config.md
  2. +3 −3 lib/build.js
  3. +2 −2 lib/update.js
  4. +1 −1 lib/utils/default-config.js
  5. +6 −0 man/config.1
View
8 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`
View
6 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)
})
}
View
4 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 = []
View
2 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")
View
6 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
.

0 comments on commit a0eb2fa

Please sign in to comment.
Something went wrong with that request. Please try again.