diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-06-06 08:34:31 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-06-13 23:44:43 +0400 |
commit | bb369f71a2fc4ba1c1fbfc3da41a4b1d11becca2 (patch) | |
tree | 5aa01a3635b911b6ebf671d3bec4878157373138 /node_modules/npm-registry-client/lib/upload.js | |
parent | 1c2938189122c0640b9403746a6bfed4d6142b27 (diff) |
upgrade to npm-registry-client@2.0.0
Diffstat (limited to 'node_modules/npm-registry-client/lib/upload.js')
-rw-r--r-- | node_modules/npm-registry-client/lib/upload.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/node_modules/npm-registry-client/lib/upload.js b/node_modules/npm-registry-client/lib/upload.js index 2418997b4..f624a266c 100644 --- a/node_modules/npm-registry-client/lib/upload.js +++ b/node_modules/npm-registry-client/lib/upload.js @@ -3,12 +3,12 @@ module.exports = upload var fs = require('fs') , Stream = require("stream").Stream -function upload (where, file, etag, nofollow, cb) { +function upload (uri, file, etag, nofollow, cb) { if (typeof nofollow === "function") cb = nofollow, nofollow = false if (typeof etag === "function") cb = etag, etag = null if (file instanceof Stream) { - return this.request("PUT", where, file, etag, nofollow, cb) + return this.request("PUT", uri, { body : file, etag : etag, follow : !nofollow }, cb) } fs.stat(file, function (er, stat) { @@ -17,6 +17,6 @@ function upload (where, file, etag, nofollow, cb) { s.size = stat.size s.on("error", cb) - this.request("PUT", where, s, etag, nofollow, cb) + this.request("PUT", uri, { body : s, etag : etag, follow : !nofollow }, cb) }.bind(this)) } |