Socket
Socket
Sign inDemoInstall

zip-stream

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zip-stream - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

8

CHANGELOG.md
## Changelog
**1.1.1** — <small>_January 12, 2016_</small> — [Diff](https://github.com/archiverjs/node-zip-stream/compare/1.1.0...1.1.1)
**1.2.0** — <small> June 16, 2017 </small> — [Diff](https://github.com/archiverjs/node-zip-stream/compare/1.1.1...1.2.0)
- groundwork for symlinks support.
*NOTE: this will be the last release for node v0.10 and v0.12. node v4 will become the minimum and a version bump to 2.0.0 will take place.*
**1.1.1** — <small>_January 17, 2017_</small> — [Diff](https://github.com/archiverjs/node-zip-stream/compare/1.1.0...1.1.1)
- actually use STORE method if level is 0 (GH #21)

@@ -6,0 +12,0 @@ - bump deps to ensure latest versions are used.

@@ -63,2 +63,3 @@ /**

name: null,
linkname: null,
date: null,

@@ -71,2 +72,3 @@ mode: null,

var isDir = data.type === 'directory';
var isSymlink = data.type === 'symlink';

@@ -76,3 +78,3 @@ if (data.name) {

if (data.name.slice(-1) === '/') {
if (!isSymlink && data.name.slice(-1) === '/') {
isDir = true;

@@ -85,3 +87,3 @@ data.type = 'directory';

if (isDir) {
if (isDir || isSymlink) {
data.store = true;

@@ -117,3 +119,3 @@ }

if (data.type !== 'file' && data.type !== 'directory') {
if (data.type !== 'file' && data.type !== 'directory' && data.type !== 'symlink') {
callback(new Error(data.type + ' entries not currently supported'));

@@ -128,2 +130,7 @@ return;

if (data.type === 'symlink' && typeof data.linkname !== 'string') {
callback(new Error('entry linkname must be a non-empty string value when type equals symlink'));
return;
}
var entry = new ZipArchiveEntry(data.name);

@@ -140,6 +147,18 @@ entry.setTime(data.date);

if (data.type === 'symlink' && typeof data.mode !== 'number') {
data.mode = 40960; // 0120000
}
if (typeof data.mode === 'number') {
if (data.type === 'symlink') {
data.mode |= 40960;
}
entry.setUnixMode(data.mode);
}
if (data.type === 'symlink' && typeof data.linkname === 'string') {
source = new Buffer(data.linkname);
}
return ZipArchiveOutputStream.prototype.entry.call(this, entry, source, callback);

@@ -146,0 +165,0 @@ };

6

package.json
{
"name": "zip-stream",
"version": "1.1.1",
"version": "1.2.0",
"description": "a streaming zip archive generator.",

@@ -31,3 +31,3 @@ "homepage": "https://github.com/archiverjs/node-zip-stream",

"archiver-utils": "^1.3.0",
"compress-commons": "^1.1.0",
"compress-commons": "^1.2.0",
"lodash": "^4.8.0",

@@ -39,3 +39,3 @@ "readable-stream": "^2.0.0"

"jsdoc": "~3.4.0",
"chai": "^3.4.0",
"chai": "^4.0.0",
"minami": "^1.1.0",

@@ -42,0 +42,0 @@ "mocha": "^3.2.0",

@@ -1,2 +0,2 @@

# ZipStream v1.1.1 [![Build Status](https://travis-ci.org/archiverjs/node-zip-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-zip-stream) [![Build status](https://ci.appveyor.com/api/projects/status/2sraarbaadwbtti2/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-zip-stream/branch/master)
# ZipStream v1.2.0 [![Build Status](https://travis-ci.org/archiverjs/node-zip-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-zip-stream) [![Build status](https://ci.appveyor.com/api/projects/status/2sraarbaadwbtti2/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-zip-stream/branch/master)

@@ -3,0 +3,0 @@ zip-stream is a streaming zip archive generator based on the `ZipArchiveOutputStream` prototype found in the [compress-commons](https://www.npmjs.org/package/compress-commons) project.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc