pacote 9.5.3 → 9.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # pacote [![npm version](https://img.shields.io/npm/v/pacote.svg)](https://npm.im/pacote) [![license](https://img.shields.io/npm/l/pacote.svg)](https://npm.im/pacote) [![Travis](https://img.shields.io/travis/zkat/pacote.svg)](https://travis-ci.org/zkat/pacote) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/pacote?svg=true)](https://ci.appveyor.com/project/zkat/pacote) [![Coverage Status](https://coveralls.io/repos/github/zkat/pacote/badge.svg?branch=latest)](https://coveralls.io/github/zkat/pacote?branch=latest)
1
+ # pacote [![npm version](https://img.shields.io/npm/v/pacote.svg)](https://npm.im/pacote) [![license](https://img.shields.io/npm/l/pacote.svg)](https://npm.im/pacote) [![Travis](https://img.shields.io/travis/npm/pacote.svg)](https://travis-ci.org/npm/pacote) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/pacote?svg=true)](https://ci.appveyor.com/project/npm/pacote) [![Coverage Status](https://coveralls.io/repos/github/npm/pacote/badge.svg?branch=latest)](https://coveralls.io/github/npm/pacote?branch=latest)
2
2
 
3
- [`pacote`](https://github.com/zkat/pacote) is a Node.js library for downloading
3
+ [`pacote`](https://github.com/npm/pacote) is a Node.js library for downloading
4
4
  [npm](https://npmjs.org)-compatible packages. It supports all package specifier
5
5
  syntax that `npm install` and its ilk support. It transparently caches anything
6
6
  needed to reduce excess operations, using [`cacache`](https://npm.im/cacache).
package/extract.js CHANGED
@@ -50,21 +50,22 @@ function extract (spec, dest, opts) {
50
50
  function tryExtract (spec, tarStream, dest, opts) {
51
51
  return new BB((resolve, reject) => {
52
52
  tarStream.on('error', reject)
53
- setImmediate(resolve)
53
+
54
+ rimraf(dest)
55
+ .then(() => mkdirp(dest))
56
+ .then(() => {
57
+ const xtractor = extractStream(spec, dest, opts)
58
+ xtractor.on('error', reject)
59
+ xtractor.on('close', resolve)
60
+ tarStream.pipe(xtractor)
61
+ })
62
+ .catch(reject)
54
63
  })
55
- .then(() => rimraf(dest))
56
- .then(() => mkdirp(dest))
57
- .then(() => new BB((resolve, reject) => {
58
- const xtractor = extractStream(spec, dest, opts)
59
- tarStream.on('error', reject)
60
- xtractor.on('error', reject)
61
- xtractor.on('close', resolve)
62
- tarStream.pipe(xtractor)
63
- }))
64
64
  .catch(err => {
65
65
  if (err.code === 'EINTEGRITY') {
66
66
  err.message = `Verification failed while extracting ${spec}:\n${err.message}`
67
67
  }
68
+
68
69
  throw err
69
70
  })
70
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacote",
3
- "version": "9.5.3",
3
+ "version": "9.5.4",
4
4
  "description": "JavaScript package downloader",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -17,7 +17,7 @@
17
17
  "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
18
18
  "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
19
19
  },
20
- "repository": "https://github.com/zkat/pacote",
20
+ "repository": "https://github.com/npm/pacote",
21
21
  "keywords": [
22
22
  "packages",
23
23
  "npm",