tar@0.1.19

This commit is contained in:
isaacs
2013-12-11 09:29:03 -08:00
parent f1baf8fc9d
commit ac8adbc4b4
3 changed files with 38 additions and 34 deletions

57
node_modules/tar/README.md generated vendored
View File

@@ -2,46 +2,45 @@
Tar for Node.js.
## Goals of this project
[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)
1. Be able to parse and reasonably extract the contents of any tar file
created by any program that creates tar files, period.
## API
At least, this includes every version of:
See `examples/` for usage examples.
* bsdtar
* gnutar
* solaris posix tar
* Joerg Schilling's star ("Schilly tar")
### var tar = require('tar')
2. Create tar files that can be extracted by any of the following tar programs:
Returns an object with `.Pack`, `.Extract` and `.Parse` methods.
* bsdtar/libarchive version 2.6.2
* gnutar 1.15 and above
* SunOS Posix tar
* Joerg Schilling's star ("Schilly tar")
### tar.Pack([properties])
3. 100% test coverage. Speed is important. Correctness is slightly more important.
Returns a through stream. Use
[fstream](https://npmjs.org/package/fstream) to write files into the
pack stream and you will receive tar archive data from the pack
stream.
4. Create the kind of tar interface that Node users would want to use.
The optional `properties` object are used to set properties in the tar
'Global Extended Header'.
5. Satisfy npm's needs for a portable tar implementation with a JavaScript interface.
### tar.Extract([options])
6. No excuses. No complaining. No tolerance for failure.
Returns a through stream. Write tar data to the stream and the files
in the tarball will be extracted onto the filesystem.
## But isn't there already a tar.js?
`options` can be:
Yes, there are a few. This one is going to be better, and it will be
fanatically maintained, because npm will depend on it.
```js
{
path: '/path/to/extract/tar/into',
strip: 0, // how many path segments to strip from the root when extracting
}
```
That's why I need to write it from scratch. Creating and extracting
tarballs is such a large part of what npm does, I simply can't have it
be a black box any longer.
`options` also get passed to the `fstream.Writer` instance that `tar`
uses internally.
## Didn't you have something already? Where'd it go?
### tar.Parse()
It's in the "old" folder. It's not functional. Don't use it.
It was a useful exploration to learn the issues involved, but like most
software of any reasonable complexity, node-tar won't be useful until
it's been written at least 3 times.
Returns a writable stream. Write tar data to it and it will emit
`entry` events for each entry parsed from the tarball. This is used by
`tar.Extract`.

13
node_modules/tar/package.json generated vendored
View File

@@ -6,7 +6,7 @@
},
"name": "tar",
"description": "tar for node",
"version": "0.1.18",
"version": "0.1.19",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-tar.git"
@@ -25,11 +25,16 @@
"rimraf": "1.x"
},
"license": "BSD",
"readme": "# node-tar\n\nTar for Node.js.\n\n## Goals of this project\n\n1. Be able to parse and reasonably extract the contents of any tar file\n created by any program that creates tar files, period.\n\n At least, this includes every version of:\n\n * bsdtar\n * gnutar\n * solaris posix tar\n * Joerg Schilling's star (\"Schilly tar\")\n\n2. Create tar files that can be extracted by any of the following tar programs:\n\n * bsdtar/libarchive version 2.6.2\n * gnutar 1.15 and above\n * SunOS Posix tar\n * Joerg Schilling's star (\"Schilly tar\")\n\n3. 100% test coverage. Speed is important. Correctness is slightly more important.\n\n4. Create the kind of tar interface that Node users would want to use.\n\n5. Satisfy npm's needs for a portable tar implementation with a JavaScript interface.\n\n6. No excuses. No complaining. No tolerance for failure.\n\n## But isn't there already a tar.js?\n\nYes, there are a few. This one is going to be better, and it will be\nfanatically maintained, because npm will depend on it.\n\nThat's why I need to write it from scratch. Creating and extracting\ntarballs is such a large part of what npm does, I simply can't have it\nbe a black box any longer.\n\n## Didn't you have something already? Where'd it go?\n\nIt's in the \"old\" folder. It's not functional. Don't use it.\n\nIt was a useful exploration to learn the issues involved, but like most\nsoftware of any reasonable complexity, node-tar won't be useful until\nit's been written at least 3 times.\n",
"readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/node-tar/issues"
},
"_id": "tar@0.1.18",
"_from": "tar@latest"
"homepage": "https://github.com/isaacs/node-tar",
"_id": "tar@0.1.19",
"dist": {
"shasum": "fe45941799e660ce1ea52d875d37481b4bf13eac"
},
"_from": "tar@0.1.19",
"_resolved": "https://registry.npmjs.org/tar/-/tar-0.1.19.tgz"
}

View File

@@ -44,7 +44,7 @@
"rimraf": "~2.2.5",
"request": "~2.29.0",
"which": "1",
"tar": "~0.1.18",
"tar": "~0.1.19",
"fstream": "~0.1.25",
"block-stream": "0.0.7",
"mkdirp": "~0.3.5",