aboutsummaryrefslogtreecommitdiff
path: root/node_modules/yazl
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/yazl')
-rw-r--r--node_modules/yazl/README.md16
-rw-r--r--node_modules/yazl/index.js5
-rw-r--r--node_modules/yazl/package.json99
3 files changed, 32 insertions, 88 deletions
diff --git a/node_modules/yazl/README.md b/node_modules/yazl/README.md
index 1ff27db78..ef99f4dc7 100644
--- a/node_modules/yazl/README.md
+++ b/node_modules/yazl/README.md
@@ -29,11 +29,11 @@ zipfile.outputStream.pipe(fs.createWriteStream("output.zip")).on("close", functi
// alternate apis for adding files:
zipfile.addReadStream(process.stdin, "stdin.txt", {
mtime: new Date(),
- mode: 0100664, // -rw-rw-r--
+ mode: parseInt("0100664", 8), // -rw-rw-r--
});
zipfile.addBuffer(new Buffer("hello"), "hello.txt", {
mtime: new Date(),
- mode: 0100664, // -rw-rw-r--
+ mode: parseInt("0100664", 8), // -rw-rw-r--
});
// call end() after all the files have been added
zipfile.end();
@@ -100,7 +100,7 @@ See `addFile()` for info about the `metadataPath` parameter.
```js
{
mtime: new Date(),
- mode: 0100664,
+ mode: parseInt("0100664", 8),
compress: true,
forceZip64Format: false,
size: 12345, // example value
@@ -124,7 +124,7 @@ See `addFile()` for info about the `metadataPath` parameter.
```js
{
mtime: new Date(),
- mode: 0100664,
+ mode: parseInt("0100664", 8),
compress: true,
forceZip64Format: false,
}
@@ -270,8 +270,10 @@ Note that the "UNIX" and has implications in the External File Attributes.
### Version Needed to Extract
-Always `45`, meaning 4.5.
-This enables the ZIP64 format.
+Usually `20`, meaning 2.0. This allows filenames to be UTF-8 encoded.
+
+When ZIP64 format is used, some of the Version Needed to Extract values will be `45`, meaning 4.5.
+When this happens, there may be a mix of `20` and `45` values throughout the zipfile.
### General Purpose Bit Flag
@@ -322,6 +324,8 @@ In order to create empty directories, use `addEmptyDirectory()`.
## Change History
+ * 2.4.2
+ * Remove octal literals to make yazl compatible with strict mode. [pull #28](https://github.com/thejoshwolfe/yazl/pull/28)
* 2.4.1
* Fix Mac Archive Utility compatibility issue. [issue #24](https://github.com/thejoshwolfe/yazl/issues/24)
* 2.4.0
diff --git a/node_modules/yazl/index.js b/node_modules/yazl/index.js
index b9338fabd..3328732f6 100644
--- a/node_modules/yazl/index.js
+++ b/node_modules/yazl/index.js
@@ -360,6 +360,9 @@ function validateMetadataPath(metadataPath, isDirectory) {
return metadataPath;
}
+var defaultFileMode = parseInt("0100664", 8);
+var defaultDirectoryMode = parseInt("040775", 8);
+
// this class is not part of the public API
function Entry(metadataPath, isDirectory, options) {
this.utf8FileName = new Buffer(metadataPath);
@@ -370,7 +373,7 @@ function Entry(metadataPath, isDirectory, options) {
if (options.mode != null) {
this.setFileAttributesMode(options.mode);
} else {
- this.setFileAttributesMode(isDirectory ? 040775 : 0100664);
+ this.setFileAttributesMode(isDirectory ? defaultDirectoryMode : defaultFileMode);
}
if (isDirectory) {
this.crcAndFileSizeKnown = true;
diff --git a/node_modules/yazl/package.json b/node_modules/yazl/package.json
index 103948bf2..5fb68f9cc 100644
--- a/node_modules/yazl/package.json
+++ b/node_modules/yazl/package.json
@@ -1,98 +1,35 @@
{
- "_args": [
- [
- {
- "raw": "yazl@^2.1.0",
- "scope": null,
- "escapedName": "yazl",
- "name": "yazl",
- "rawSpec": "^2.1.0",
- "spec": ">=2.1.0 <3.0.0",
- "type": "range"
- },
- "/home/dold/repos/taler/wallet-webex/node_modules/gulp-zip"
- ]
- ],
- "_from": "yazl@>=2.1.0 <3.0.0",
- "_id": "yazl@2.4.1",
- "_inCache": true,
- "_location": "/yazl",
- "_nodeVersion": "4.2.6",
- "_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/yazl-2.4.1.tgz_1467311328186_0.7062251013703644"
- },
- "_npmUser": {
- "name": "thejoshwolfe",
- "email": "thejoshwolfe@gmail.com"
+ "name": "yazl",
+ "version": "2.4.2",
+ "description": "yet another zip library for node",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test/test.js"
},
- "_npmVersion": "3.5.2",
- "_phantomChildren": {},
- "_requested": {
- "raw": "yazl@^2.1.0",
- "scope": null,
- "escapedName": "yazl",
- "name": "yazl",
- "rawSpec": "^2.1.0",
- "spec": ">=2.1.0 <3.0.0",
- "type": "range"
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/thejoshwolfe/yazl.git"
},
- "_requiredBy": [
- "/gulp-zip"
+ "keywords": [
+ "zip",
+ "stream",
+ "archive",
+ "file"
],
- "_resolved": "https://registry.npmjs.org/yazl/-/yazl-2.4.1.tgz",
- "_shasum": "2bc98ebdfeccf0c2b47cc36f82214bcb6d54484c",
- "_shrinkwrap": null,
- "_spec": "yazl@^2.1.0",
- "_where": "/home/dold/repos/taler/wallet-webex/node_modules/gulp-zip",
- "author": {
- "name": "Josh Wolfe",
- "email": "thejoshwolfe@gmail.com"
- },
+ "author": "Josh Wolfe <thejoshwolfe@gmail.com>",
+ "license": "MIT",
"bugs": {
"url": "https://github.com/thejoshwolfe/yazl/issues"
},
+ "homepage": "https://github.com/thejoshwolfe/yazl",
"dependencies": {
"buffer-crc32": "~0.2.3"
},
- "description": "yet another zip library for node",
"devDependencies": {
"bl": "~0.9.3",
"yauzl": "~2.3.1"
},
- "directories": {},
- "dist": {
- "shasum": "2bc98ebdfeccf0c2b47cc36f82214bcb6d54484c",
- "tarball": "https://registry.npmjs.org/yazl/-/yazl-2.4.1.tgz"
- },
"files": [
"index.js"
- ],
- "gitHead": "8d25332df007a514b0b0d5c94a640984991d93e7",
- "homepage": "https://github.com/thejoshwolfe/yazl",
- "keywords": [
- "zip",
- "stream",
- "archive",
- "file"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "thejoshwolfe",
- "email": "thejoshwolfe@gmail.com"
- }
- ],
- "name": "yazl",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/thejoshwolfe/yazl.git"
- },
- "scripts": {
- "test": "node test/test.js"
- },
- "version": "2.4.1"
+ ]
}