diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-05-28 21:04:08 -0700 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-05-29 18:06:04 +0200 |
commit | c58cea5a163cd5d7133e00fdf257325ce3807c09 (patch) | |
tree | 1b7f97c0474f1990450a54e82b4432ec37de1956 /deps/npm/lib/utils/tar.js | |
parent | 88fe7e84e56e44a727169c07ee040cbf67f9c0a8 (diff) | |
download | android-node-v8-c58cea5a163cd5d7133e00fdf257325ce3807c09.tar.gz android-node-v8-c58cea5a163cd5d7133e00fdf257325ce3807c09.tar.bz2 android-node-v8-c58cea5a163cd5d7133e00fdf257325ce3807c09.zip |
deps: upgrade npm to 5.0.0
PR-URL: https://github.com/nodejs/node/pull/13276
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/lib/utils/tar.js')
-rw-r--r-- | deps/npm/lib/utils/tar.js | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js index 7ebc9d6875..ebbee025a2 100644 --- a/deps/npm/lib/utils/tar.js +++ b/deps/npm/lib/utils/tar.js @@ -3,8 +3,6 @@ // commands for packing and unpacking tarballs // this file is used by lib/cache.js -const BB = require('bluebird') - var fs = require('graceful-fs') var path = require('path') var writeFileAtomic = require('write-file-atomic') @@ -28,11 +26,6 @@ var moduleName = require('./module-name.js') var packageId = require('./package-id.js') var pulseTillDone = require('../utils/pulse-till-done.js') -const cacache = require('cacache') -const packAsync = BB.promisify(pack) -const PassThrough = require('stream').PassThrough -const pipe = BB.promisify(require('mississippi').pipe) - if (process.env.SUDO_UID && myUid === 0) { if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID if (!isNaN(process.env.SUDO_GID)) myGid = +process.env.SUDO_GID @@ -41,18 +34,6 @@ if (process.env.SUDO_UID && myUid === 0) { exports.pack = pack exports.unpack = unpack -module.exports.packToStream = packToStream -function packToStream (mani, dir) { - const stream = new PassThrough() - cacache.tmp.withTmp(npm.tmp, (tmp) => { - const tmpTarget = path.join(tmp, 'package.tgz') - return packAsync(tmpTarget, dir, mani).then(() => { - return pipe(fs.createReadStream(tmpTarget), stream) - }) - }).catch((err) => stream.emit('error', err)) - return stream -} - function pack (tarball, folder, pkg, cb) { log.verbose('tar pack', [tarball, folder]) |