diff options
author | isaacs <i@izs.me> | 2013-07-06 21:13:33 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-07-06 21:15:57 +0400 |
commit | e99d4141ae36f539aac14231ad4648ec3c7caa2c (patch) | |
tree | fc3201d96d5787ad1f555a2fb04a8136d514675e | |
parent | 8aab34a29e7363e4c4b044fd8de9ee65c5b9dda2 (diff) |
npm-registry-client@0.2.26
-rw-r--r-- | node_modules/npm-registry-client/lib/get.js | 6 | ||||
-rw-r--r-- | node_modules/npm-registry-client/lib/request.js | 4 | ||||
-rw-r--r-- | node_modules/npm-registry-client/node_modules/couch-login/package.json | 6 | ||||
-rw-r--r-- | node_modules/npm-registry-client/package.json | 4 | ||||
-rw-r--r-- | package.json | 2 |
5 files changed, 16 insertions, 6 deletions
diff --git a/node_modules/npm-registry-client/lib/get.js b/node_modules/npm-registry-client/lib/get.js index 398c309d7..eeb716e85 100644 --- a/node_modules/npm-registry-client/lib/get.js +++ b/node_modules/npm-registry-client/lib/get.js @@ -29,7 +29,11 @@ function get (uri, timeout, nofollow, staleOk, cb) { return requestAll.call(this, cb) } - var cache = path.join(this.conf.get('cache'), uri, ".cache.json") + var cacheUri = uri + // on windows ":" is not an allowed character in a foldername + cacheUri = cacheUri.replace(/:/g, '_') + var cache = path.join(this.conf.get('cache'), cacheUri, ".cache.json") + fs.stat(cache, function (er, stat) { if (!er) fs.readFile(cache, function (er, data) { try { data = JSON.parse(data) } diff --git a/node_modules/npm-registry-client/lib/request.js b/node_modules/npm-registry-client/lib/request.js index 9b72bc457..ff45e0e8e 100644 --- a/node_modules/npm-registry-client/lib/request.js +++ b/node_modules/npm-registry-client/lib/request.js @@ -283,6 +283,7 @@ function requestDone (method, where, cb) { , p = url.parse(where).pathname.split("/") , _ = "/" , caches = p.map(function (part) { + part = part.replace(/:/g, "_") return _ = path.join(_, part) }).map(function (cache) { return path.join(this.conf.get('cache'), cache, ".cache.json") @@ -293,7 +294,8 @@ function requestDone (method, where, cb) { // That's what you get for deleting stuff. Don't do that. if (method === "DELETE") { p = p.slice(0, p.indexOf("-rev")) - caches.push(path.join(this.conf.get('cache'), p.join("/"))) + p = p.join("/").replace(/:/g, "_") + caches.push(path.join(this.conf.get('cache'), p)) } asyncMap(caches, rm, function () {}) diff --git a/node_modules/npm-registry-client/node_modules/couch-login/package.json b/node_modules/npm-registry-client/node_modules/couch-login/package.json index b65ced071..c04000727 100644 --- a/node_modules/npm-registry-client/node_modules/couch-login/package.json +++ b/node_modules/npm-registry-client/node_modules/couch-login/package.json @@ -27,5 +27,9 @@ "url": "https://github.com/isaacs/couch-login/issues" }, "_id": "couch-login@0.1.17", - "_from": "couch-login@~0.1.15" + "dist": { + "shasum": "ab3ac31dd56e1061ea5f7faa838c7bda32a2b2ed" + }, + "_from": "couch-login@~0.1.15", + "_resolved": "https://registry.npmjs.org/couch-login/-/couch-login-0.1.17.tgz" } diff --git a/node_modules/npm-registry-client/package.json b/node_modules/npm-registry-client/package.json index 57941a57b..37491a701 100644 --- a/node_modules/npm-registry-client/package.json +++ b/node_modules/npm-registry-client/package.json @@ -6,7 +6,7 @@ }, "name": "npm-registry-client", "description": "Client for the npm registry", - "version": "0.2.25", + "version": "0.2.26", "repository": { "url": "git://github.com/isaacs/npm-registry-client" }, @@ -38,6 +38,6 @@ "bugs": { "url": "https://github.com/isaacs/npm-registry-client/issues" }, - "_id": "npm-registry-client@0.2.25", + "_id": "npm-registry-client@0.2.26", "_from": "npm-registry-client@latest" } diff --git a/package.json b/package.json index 166a289a4..09e3c42b0 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "chownr": "0", "npmlog": "0.0.3", "ansi": "~0.1.2", - "npm-registry-client": "~0.2.25", + "npm-registry-client": "~0.2.26", "read-package-json": "~1.1.0", "read-installed": "~0.2.2", "glob": "~3.2.1", |