diff options
author | isaacs <i@izs.me> | 2011-02-19 09:04:23 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-02-19 09:04:23 +0300 |
commit | d82850982cd9f3f35e2627c026a8cf6e372e39cf (patch) | |
tree | a58b33adc6fa42d066449cf7fa15ca0b788f1b7b | |
parent | 9cc1363666cffe450431fa565ee2a3163ccf4da9 (diff) |
Closes GH-575 Add the --pre flag
This allows publishing pre-release versions of a package,
by telling the registry to suppress the auto-tagging
feature.
-rw-r--r-- | lib/utils/default-config.js | 1 | ||||
-rw-r--r-- | lib/utils/parse-args.js | 1 | ||||
-rw-r--r-- | lib/utils/registry/publish.js | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/default-config.js b/lib/utils/default-config.js index 21a0b3818..210f83496 100644 --- a/lib/utils/default-config.js +++ b/lib/utils/default-config.js @@ -37,6 +37,7 @@ module.exports = , "node-version" : process.version , "onload-script" : false , outfd : stdio.stdoutFD + , pre: false , proxy : process.env.HTTP_PROXY || process.env.http_proxy || null , prune : undefined // if set to boolean false, then that means "never" , "rebuild-bundle" : true diff --git a/lib/utils/parse-args.js b/lib/utils/parse-args.js index 9a6b7f510..a316d05cf 100644 --- a/lib/utils/parse-args.js +++ b/lib/utils/parse-args.js @@ -38,6 +38,7 @@ exports.types = , "node-version" : String , "onload-script" : [false, String] , outfd : [Number, Stream] + , pre: Boolean , proxy : url , prune : Boolean , "rebuild-bundle" : Boolean diff --git a/lib/utils/registry/publish.js b/lib/utils/registry/publish.js index 19610c7f5..3f0c86147 100644 --- a/lib/utils/registry/publish.js +++ b/lib/utils/registry/publish.js @@ -59,6 +59,7 @@ function publish (data, cb) { return log.er(cb, "Failed PUT response "+(response && response.statusCode))(er) } var dataURI = encodeURIComponent(data.name)+"/"+encodeURIComponent(data.version) + if (npm.config.get("pre")) dataURI += "/-pre/true" PUT(dataURI, data, function (er) { if (er) { if (er.message.indexOf("conflict Document update conflict.") === 0) { |