Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@endo/zip

Package Overview
Dependencies
Maintainers
5
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@endo/zip - npm Package Compare versions

Comparing version 0.2.31 to 0.2.32

16

package.json
{
"name": "@endo/zip",
"version": "0.2.31",
"version": "0.2.32",
"description": "A minimal, synchronous Zip reader and writer",

@@ -40,12 +40,12 @@ "keywords": [

"devDependencies": {
"ava": "^5.2.0",
"ava": "^5.3.0",
"babel-eslint": "^10.0.3",
"c8": "^7.7.3",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^14.0.0",
"c8": "^7.14.0",
"eslint": "^8.44.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-import": "^2.27.5",
"prettier": "^2.8.5",
"typescript": "~4.9.5"
"prettier": "^3.0.0",
"typescript": "~5.1.3"
},

@@ -74,3 +74,3 @@ "files": [

},
"gitHead": "8141f58debaec420cbc2a7cb698e888566d430ba"
"gitHead": "106da55b8bcea3067f70c29c357806f3f2e55c52"
}

@@ -64,6 +64,6 @@ // @ts-check

if (offset > fields.data.byteLength) {
throw new Error('Cannot set offset beyond length of underlying data');
throw Error('Cannot set offset beyond length of underlying data');
}
if (offset < 0) {
throw new Error('Cannot set negative offset');
throw Error('Cannot set negative offset');
}

@@ -91,3 +91,3 @@ fields.offset = offset;

if (!this.canSeek(index)) {
throw new Error(
throw Error(
`End of data reached (data length = ${fields.length}, asked index ${index}`,

@@ -254,3 +254,3 @@ );

if (!this.expect(expected)) {
throw new Error(
throw Error(
`Expected ${q(expected)} at ${fields.index}, got ${this.peek(

@@ -257,0 +257,0 @@ expected.length,

@@ -21,3 +21,3 @@ // @ts-check

if (!fields) {
throw new Error('BufferWriter fields are not initialized');
throw Error('BufferWriter fields are not initialized');
}

@@ -24,0 +24,0 @@ return fields;

@@ -127,12 +127,12 @@ // @ts-check

if (headers.uncompressedLength === MAX_VALUE_32BITS) {
throw new Error('Cannot read Zip64');
throw Error('Cannot read Zip64');
}
if (headers.compressedLength === MAX_VALUE_32BITS) {
throw new Error('Cannot read Zip64');
throw Error('Cannot read Zip64');
}
if (fileStart === MAX_VALUE_32BITS) {
throw new Error('Cannot read Zip64');
throw Error('Cannot read Zip64');
}
if (diskNumberStart === MAX_VALUE_32BITS) {
throw new Error('Cannot read Zip64');
throw Error('Cannot read Zip64');
}

@@ -173,3 +173,3 @@

// This is really suspicious, as if something went wrong.
throw new Error(
throw Error(
`Corrupted zip or bug: expected ${centralDirectoryRecords} records in central dir, got ${entries.length}`,

@@ -218,3 +218,3 @@ );

if (!reader.expect(signature.CENTRAL_DIRECTORY_END)) {
throw new Error(
throw Error(
'Corrupt zip file, or zip file containing an unsupported variable-width end-of-archive comment, or an unsupported zip file with 64 bit sizes',

@@ -264,3 +264,3 @@ );

if (centralDirectoryEnd < 0) {
throw new Error('Corrupted zip: not enough content');
throw Error('Corrupted zip: not enough content');
}

@@ -288,3 +288,3 @@ reader.seek(centralDirectoryEnd);

if (zip64) {
throw new Error('Cannot read Zip64');
throw Error('Cannot read Zip64');
}

@@ -332,3 +332,3 @@

if (centralName.replace(/\\/g, '/') !== localName) {
throw new Error(
throw Error(
`Zip integrity error: central record file name ${q(

@@ -348,3 +348,3 @@ centralName,

if (!value) {
throw new Error(
throw Error(
`Zip integrity error: ${message} for file ${q(

@@ -424,3 +424,3 @@ localName,

if (file.compressionMethod !== compression.STORE) {
throw new Error(
throw Error(
`Cannot find decompressor for compression method ${q(

@@ -474,3 +474,3 @@ file.compressionMethod,

if (isEncrypted(centralRecord.bitFlag)) {
throw new Error('Encrypted zip are not supported');
throw Error('Encrypted zip are not supported');
}

@@ -477,0 +477,0 @@

@@ -26,3 +26,3 @@ // @ts-check

if (file === undefined) {
throw new Error(`Cannot find file ${name} in Zip file ${this.name}`);
throw Error(`Cannot find file ${name} in Zip file ${this.name}`);
}

@@ -29,0 +29,0 @@ return file.content;

@@ -31,3 +31,3 @@ // @ts-check

if (!content) {
throw new Error(`ZipWriter write requires content for ${name}`);
throw Error(`ZipWriter write requires content for ${name}`);
}

@@ -34,0 +34,0 @@ this.files.set(name, {

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