summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/tar
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-05-05 22:33:06 -0700
committerisaacs <i@izs.me>2012-05-05 22:33:12 -0700
commit33a9ac6087732da48e7d12ea7f7fbb41926fe46c (patch)
treea914e333e80a3401ce8726355b38f1d636500cb5 /deps/npm/node_modules/tar
parent1858d1c340ca2631e28a32eb542c85ee8f725cac (diff)
downloadnode-new-33a9ac6087732da48e7d12ea7f7fbb41926fe46c.tar.gz
Upgrade npm to 1.1.21
Somehow this got downgraded in the last v0.6 merge. Very strange.
Diffstat (limited to 'deps/npm/node_modules/tar')
-rw-r--r--deps/npm/node_modules/tar/lib/extract.js14
-rw-r--r--deps/npm/node_modules/tar/package.json24
2 files changed, 35 insertions, 3 deletions
diff --git a/deps/npm/node_modules/tar/lib/extract.js b/deps/npm/node_modules/tar/lib/extract.js
index e45974c723..c34a81e21f 100644
--- a/deps/npm/node_modules/tar/lib/extract.js
+++ b/deps/npm/node_modules/tar/lib/extract.js
@@ -24,6 +24,10 @@ function Extract (opts) {
opts.type = "Directory"
opts.Directory = true
+ // similar to --strip or --strip-components
+ opts.strip = +opts.strip
+ if (!opts.strip || opts.strip <= 0) opts.strip = 0
+
this._fst = fstream.Writer(opts)
this.pause()
@@ -33,6 +37,16 @@ function Extract (opts) {
// of the tarball. So, they need to be resolved against
// the target directory in order to be created properly.
me.on("entry", function (entry) {
+ // if there's a "strip" argument, then strip off that many
+ // path components.
+ if (opts.strip) {
+ var p = entry.path.split("/").slice(opts.strip).join("/")
+ entry.path = entry.props.path = p
+ if (entry.linkpath) {
+ var lp = entry.linkpath.split("/").slice(opts.strip).join("/")
+ entry.linkpath = entry.props.linkpath = lp
+ }
+ }
if (entry.type !== "Link") return
entry.linkpath = entry.props.linkpath =
path.join(opts.path, path.join("/", entry.props.linkpath))
diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json
index aa53022c64..849d0d6918 100644
--- a/deps/npm/node_modules/tar/package.json
+++ b/deps/npm/node_modules/tar/package.json
@@ -1,8 +1,12 @@
{
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
"name": "tar",
"description": "tar for node",
- "version": "0.1.12",
+ "version": "0.1.13",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-tar.git"
@@ -22,5 +26,19 @@
"devDependencies": {
"tap": "0.x",
"rimraf": "1.x"
- }
+ },
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "_id": "tar@0.1.13",
+ "optionalDependencies": {},
+ "_engineSupported": true,
+ "_npmVersion": "1.1.4",
+ "_nodeVersion": "v0.7.6-pre",
+ "_defaultsLoaded": true,
+ "dist": {
+ "shasum": "804bdaaacaab928ec1c9bbd8b848a042c3adacb2"
+ },
+ "_from": "tar@0.1.13"
}