@lerna/npm-dist-tag
Advanced tools
Comparing version 3.7.1 to 3.8.5
@@ -6,2 +6,13 @@ # Change Log | ||
## [3.8.5](https://github.com/lerna/lerna/compare/v3.8.4...v3.8.5) (2019-01-05) | ||
### Bug Fixes | ||
* **npm-dist-tag:** Improve robustness ([63a7a89](https://github.com/lerna/lerna/commit/63a7a89)) | ||
## [3.7.1](https://github.com/lerna/lerna/compare/v3.7.0...v3.7.1) (2018-12-20) | ||
@@ -8,0 +19,0 @@ |
@@ -43,3 +43,3 @@ "use strict"; | ||
const uri = `-/package/${opts.spec.escapedName}/dist-tags/${cleanTag}`; | ||
const uri = `/-/package/${opts.spec.escapedName}/dist-tags/${encodeURIComponent(cleanTag)}`; | ||
const payload = opts.concat({ | ||
@@ -53,2 +53,3 @@ method: "PUT", | ||
}, | ||
spec: opts.spec, | ||
}); | ||
@@ -83,3 +84,3 @@ | ||
const uri = `-/package/${opts.spec.escapedName}/dist-tags/${tag}`; | ||
const uri = `/-/package/${opts.spec.escapedName}/dist-tags/${encodeURIComponent(tag)}`; | ||
const payload = opts.concat({ | ||
@@ -110,5 +111,18 @@ method: "DELETE", | ||
function fetchTags(opts) { | ||
const uri = `-/package/${opts.spec.escapedName}/dist-tags`; | ||
return fetch | ||
.json( | ||
`/-/package/${opts.spec.escapedName}/dist-tags`, | ||
opts.concat({ | ||
"prefer-online": true, | ||
spec: opts.spec, | ||
}) | ||
) | ||
.then(data => { | ||
if (data && typeof data === "object") { | ||
// eslint-disable-next-line no-param-reassign, no-underscore-dangle | ||
delete data._etag; | ||
} | ||
return fetch.json(uri, opts); | ||
return data || {}; | ||
}); | ||
} |
{ | ||
"name": "@lerna/npm-dist-tag", | ||
"version": "3.7.1", | ||
"version": "3.8.5", | ||
"description": "An internal Lerna tool", | ||
@@ -37,3 +37,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "284aa4747dad26977790d6730ab2f640eb099cb4" | ||
"gitHead": "9f5c824b2f15119c10003dcc709f3ca0da99a5fe" | ||
} |
7861
101