compress-commons
Advanced tools
Comparing version 1.2.2 to 2.0.0
@@ -11,3 +11,3 @@ /** | ||
DWORD: 8, | ||
EMPTY: new Buffer(0), | ||
EMPTY: Buffer.alloc(0), | ||
@@ -17,5 +17,5 @@ SHORT: 2, | ||
SHORT_SHIFT: 16, | ||
SHORT_ZERO: new Buffer(Array(2)), | ||
SHORT_ZERO: Buffer.from(Array(2)), | ||
LONG: 4, | ||
LONG_ZERO: new Buffer(Array(4)), | ||
LONG_ZERO: Buffer.from(Array(4)), | ||
@@ -22,0 +22,0 @@ MIN_VERSION_INITIAL: 10, |
@@ -39,7 +39,7 @@ /** | ||
util.fromDosTime = function(buf) { | ||
return util.dosToDate(buf.readUInt32LE()); | ||
return util.dosToDate(buf.readUInt32LE(0)); | ||
}; | ||
util.getEightBytes = function(v) { | ||
var buf = new Buffer(8); | ||
var buf = Buffer.alloc(8); | ||
buf.writeUInt32LE(v % 0x0100000000, 0); | ||
@@ -52,3 +52,3 @@ buf.writeUInt32LE((v / 0x0100000000) | 0, 4); | ||
util.getShortBytes = function(v) { | ||
var buf = new Buffer(2); | ||
var buf = Buffer.alloc(2); | ||
buf.writeUInt16LE((v & 0xFFFF) >>> 0, 0); | ||
@@ -64,3 +64,3 @@ | ||
util.getLongBytes = function(v) { | ||
var buf = new Buffer(4); | ||
var buf = Buffer.alloc(4); | ||
buf.writeUInt32LE((v & 0xFFFFFFFF) >>> 0, 0); | ||
@@ -67,0 +67,0 @@ |
@@ -316,4 +316,4 @@ /** | ||
if (gpb.usesUTF8ForNames()) { | ||
name = new Buffer(name); | ||
comment = new Buffer(comment); | ||
name = Buffer.from(name); | ||
comment = Buffer.from(comment); | ||
} | ||
@@ -385,3 +385,3 @@ | ||
if (gpb.usesUTF8ForNames()) { | ||
name = new Buffer(name); | ||
name = Buffer.from(name); | ||
} | ||
@@ -388,0 +388,0 @@ |
@@ -19,5 +19,5 @@ /** | ||
if (source === null) { | ||
return new Buffer(0); | ||
return Buffer.alloc(0); | ||
} else if (typeof source === 'string') { | ||
return new Buffer(source); | ||
return Buffer.from(source); | ||
} else if (util.isStream(source) && !source._readableState) { | ||
@@ -24,0 +24,0 @@ var normalized = new PassThrough(); |
{ | ||
"name": "compress-commons", | ||
"version": "1.2.2", | ||
"version": "2.0.0", | ||
"description": "a library that defines a common interface for working with archive formats within node", | ||
@@ -23,3 +23,3 @@ "homepage": "https://github.com/archiverjs/node-compress-commons", | ||
"engines": { | ||
"node": ">= 0.10.0" | ||
"node": ">= 6" | ||
}, | ||
@@ -30,10 +30,10 @@ "scripts": { | ||
"dependencies": { | ||
"buffer-crc32": "^0.2.1", | ||
"buffer-crc32": "^0.2.13", | ||
"crc32-stream": "^2.0.0", | ||
"normalize-path": "^2.0.0", | ||
"readable-stream": "^2.0.0" | ||
"normalize-path": "^3.0.0", | ||
"readable-stream": "^2.3.6" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.4.0", | ||
"mocha": "^3.2.0", | ||
"chai": "^4.0.0", | ||
"mocha": "^5.0.0", | ||
"rimraf": "^2.4.3", | ||
@@ -50,2 +50,2 @@ "mkdirp": "^0.5.0" | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# Compress Commons v1.2.1 [![Build Status](https://travis-ci.org/archiverjs/node-compress-commons.svg?branch=master)](https://travis-ci.org/archiverjs/node-compress-commons) [![Build status](https://ci.appveyor.com/api/projects/status/fx3066dufdpar0it/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-compress-commons/branch/master) | ||
# Compress Commons [![Build Status](https://travis-ci.org/archiverjs/node-compress-commons.svg?branch=master)](https://travis-ci.org/archiverjs/node-compress-commons) [![Build status](https://ci.appveyor.com/api/projects/status/fx3066dufdpar0it/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-compress-commons/branch/master) | ||
@@ -3,0 +3,0 @@ Compress Commons is a library that defines a common interface for working with archive formats within node. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37952
14
+ Addednormalize-path@3.0.0(transitive)
- Removednormalize-path@2.1.1(transitive)
- Removedremove-trailing-separator@1.1.0(transitive)
Updatedbuffer-crc32@^0.2.13
Updatednormalize-path@^3.0.0
Updatedreadable-stream@^2.3.6