@zip.js/zip.js 2.16.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deno.json +1 -1
- package/dist/zip-core-external.js +429 -274
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +230 -151
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +580 -283
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +383 -160
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +580 -283
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +386 -163
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +583 -283
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +232 -153
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +233 -154
- package/dist/zip-native.min.js +1 -1
- package/dist/zip-web-worker-native.js +1 -1
- package/dist/zip-web-worker.js +1 -1
- package/dist/zip.js +430 -274
- package/dist/zip.min.js +1 -1
- package/eslint.config.mjs +1 -1
- package/index-native.cjs +386 -163
- package/index-native.min.js +1 -1
- package/index.cjs +583 -283
- package/index.d.cts +168 -29
- package/index.d.ts +168 -29
- package/index.min.js +1 -1
- package/lib/core/codec-pool.js +2 -0
- package/lib/core/codec-worker-web.js +11 -3
- package/lib/core/codec-worker.js +2 -1
- package/lib/core/streams/aes-crypto-stream.js +60 -17
- package/lib/core/streams/codec-stream.js +2 -0
- package/lib/core/streams/zip-crypto-stream.js +7 -7
- package/lib/core/streams/zip-entry-stream.js +130 -113
- package/lib/core/streams/zlib-js/zlib-streams.min.js +1 -1
- package/lib/core/streams/zlib-wasm/zlib-streams.js +199 -122
- package/lib/core/util/compatible-streams.js +10 -5
- package/lib/core/version.js +1 -1
- package/lib/core/web-worker-base.js +1 -1
- package/lib/core/web-worker-inline-native.js +1 -1
- package/lib/core/web-worker-inline-wasm.js +1 -1
- package/lib/core/zip-fs.js +157 -10
- package/lib/core/zip-reader.js +8 -5
- package/lib/core/zip-writer.js +5 -2
- package/lib/zip-core-reader.js +1 -0
- package/package.json +3 -2
package/lib/core/zip-writer.js
CHANGED
|
@@ -1052,9 +1052,11 @@ function resolveMetadata(zipWriter, name, options) {
|
|
|
1052
1052
|
const passThrough = checkPassThroughOption(getOptionValue(zipWriter, options, OPTION_PASS_THROUGH));
|
|
1053
1053
|
const passThroughCompression = Boolean(passThrough);
|
|
1054
1054
|
const passThroughEncryption = passThrough === true;
|
|
1055
|
-
|
|
1056
|
-
|
|
1055
|
+
let password = getOptionValue(zipWriter, options, OPTION_PASSWORD);
|
|
1056
|
+
let rawPassword = getOptionValue(zipWriter, options, OPTION_RAW_PASSWORD);
|
|
1057
1057
|
checkPasswordOption(password, rawPassword);
|
|
1058
|
+
password = password && password.length ? password : UNDEFINED_VALUE;
|
|
1059
|
+
rawPassword = rawPassword && rawPassword.length ? rawPassword : UNDEFINED_VALUE;
|
|
1058
1060
|
const encryptionStrength = getNumberOptionValue(zipWriter, options, OPTION_ENCRYPTION_STRENGTH, 3);
|
|
1059
1061
|
const zipCrypto = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIPCRYPTO);
|
|
1060
1062
|
const extendedTimestamp = getOptionValue(zipWriter, options, OPTION_EXTENDED_TIMESTAMP, true);
|
|
@@ -1671,6 +1673,7 @@ async function createFileEntry(reader, writer, { diskNumberStart, lockFileEntry
|
|
|
1671
1673
|
const result = await runWorker({ readable, writable }, workerOptions);
|
|
1672
1674
|
compressedSize = result.outputSize;
|
|
1673
1675
|
writer.size += compressedSize;
|
|
1676
|
+
throwIfAborted(signal);
|
|
1674
1677
|
if (!passThroughCompression) {
|
|
1675
1678
|
uncompressedSize = result.inputSize;
|
|
1676
1679
|
if (!encrypted || zipCrypto) {
|
package/lib/zip-core-reader.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "A JavaScript library to zip and unzip files in the browser, Deno and Node.js",
|
|
4
4
|
"author": "Gildas Lormeau",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.17.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"zip",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"release": "sh ./release.sh",
|
|
43
43
|
"lint": "npx eslint . && deno lint",
|
|
44
44
|
"test": "npm run test-ci && npm run test-bun && npm run test-bun-dist",
|
|
45
|
-
"test-ci": "npm run test-registration && npm run test-node && npm run test-deno && npm run test-node-dist && npm run test-deno-dist && npm run test-web-streams-polyfill && npm run test-fidelity && npm run test-types && npm run test-api-symmetry && npm run test-api-shape && npm run test-api-mangling && npm run test-api-exports",
|
|
45
|
+
"test-ci": "npm run test-registration && npm run test-node && npm run test-deno && npm run test-node-dist && npm run test-deno-dist && npm run test-web-streams-polyfill && npm run test-deno-polyfill && npm run test-fidelity && npm run test-types && npm run test-api-symmetry && npm run test-api-shape && npm run test-api-mangling && npm run test-api-exports",
|
|
46
46
|
"test-browsers": "npm run test-chrome && npm run test-firefox && npm run test-safari",
|
|
47
47
|
"serve-tests": "http-server -p 8888 -c-1 .",
|
|
48
48
|
"test-all": "npm run lint && npm run test && npm run test-browsers",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"build-doc-markdown": "npx typedoc --plugin typedoc-plugin-markdown --disableSources --out ./docs",
|
|
53
53
|
"test-deno": "cd ./tests && deno test --allow-read ./deno-runner.js",
|
|
54
54
|
"test-web-streams-polyfill": "cd ./tests && deno run --allow-read ./web-streams-polyfill-runner.js",
|
|
55
|
+
"test-deno-polyfill": "cd ./tests && deno test --allow-read ./deno-polyfill-runner.js",
|
|
55
56
|
"test-node": "cd ./tests && node ./node-runner.js",
|
|
56
57
|
"test-bun": "cd ./tests && bun test ./bun-runner.js",
|
|
57
58
|
"test-deno-dist": "./tests/dist-runner.sh deno",
|