@zip.js/zip.js 2.11.4 → 2.12.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 +427 -110
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +437 -107
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +492 -230
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +505 -227
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +492 -230
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +507 -229
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +508 -230
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +439 -109
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +439 -109
- 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 +440 -110
- package/dist/zip.min.js +1 -1
- package/index-native.cjs +507 -229
- package/index-native.min.js +1 -1
- package/index.cjs +508 -230
- package/index.d.cts +468 -59
- package/index.d.ts +468 -59
- package/index.min.js +1 -1
- package/lib/core/codec-worker-web.js +10 -2
- package/lib/core/codec-worker.js +4 -3
- package/lib/core/configuration.js +20 -5
- package/lib/core/constants.js +2 -0
- package/lib/core/io.js +13 -5
- package/lib/core/options.js +16 -0
- package/lib/core/streams/codec-stream.js +6 -0
- package/lib/core/util/warnings.js +42 -0
- package/lib/core/version.js +1 -1
- package/lib/core/web-worker-base.js +4 -3
- package/lib/core/web-worker-inline-native.js +1 -1
- package/lib/core/web-worker-inline-wasm.js +1 -1
- package/lib/core/zip-entry.js +49 -1
- package/lib/core/zip-fs.js +43 -132
- package/lib/core/zip-reader.js +106 -48
- package/lib/core/zip-writer.js +236 -54
- package/lib/zip-core-base.js +9 -3
- package/lib/zip-core-reader.js +2 -0
- package/lib/zip-core-writer.js +6 -1
- package/lib/zip-module-wasm-base.js +2 -2
- package/package.json +5 -3
package/lib/zip-core-base.js
CHANGED
|
@@ -52,13 +52,17 @@ export {
|
|
|
52
52
|
SplitDataReader,
|
|
53
53
|
SplitDataWriter,
|
|
54
54
|
ERR_HTTP_RANGE,
|
|
55
|
+
ERR_HTTP_STATUS,
|
|
55
56
|
ERR_HTTP_RESOURCE_CHANGED,
|
|
56
57
|
ERR_ITERATOR_COMPLETED_TOO_SOON,
|
|
57
|
-
ERR_WRITER_NOT_INITIALIZED
|
|
58
|
+
ERR_WRITER_NOT_INITIALIZED,
|
|
59
|
+
ERR_WRITER_SIZE_NOT_WRITABLE
|
|
58
60
|
} from "./core/io.js";
|
|
59
61
|
export {
|
|
60
62
|
ERR_INVALID_FUNCTION_OPTION,
|
|
61
|
-
ERR_INVALID_SIGNAL
|
|
63
|
+
ERR_INVALID_SIGNAL,
|
|
64
|
+
ERR_INVALID_PASS_THROUGH_VALUE,
|
|
65
|
+
ERR_ABORTED
|
|
62
66
|
} from "./core/options.js";
|
|
63
67
|
export {
|
|
64
68
|
getMimeType
|
|
@@ -66,7 +70,9 @@ export {
|
|
|
66
70
|
export {
|
|
67
71
|
configure,
|
|
68
72
|
resetConfiguration,
|
|
69
|
-
ERR_INVALID_MAX_WORKERS
|
|
73
|
+
ERR_INVALID_MAX_WORKERS,
|
|
74
|
+
ERR_INVALID_BASE_URI,
|
|
75
|
+
ERR_INVALID_URI
|
|
70
76
|
} from "./core/configuration.js";
|
|
71
77
|
export {
|
|
72
78
|
registerCodec,
|
package/lib/zip-core-reader.js
CHANGED
|
@@ -69,6 +69,8 @@ export {
|
|
|
69
69
|
WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,
|
|
70
70
|
WARNING_DUPLICATE_FILENAME,
|
|
71
71
|
WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,
|
|
72
|
+
WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,
|
|
73
|
+
WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,
|
|
72
74
|
WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,
|
|
73
75
|
WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,
|
|
74
76
|
WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES
|
package/lib/zip-core-writer.js
CHANGED
|
@@ -50,11 +50,14 @@ export {
|
|
|
50
50
|
ERR_UNSUPPORTED_FORMAT,
|
|
51
51
|
ERR_UNDEFINED_UNCOMPRESSED_SIZE,
|
|
52
52
|
ERR_UNDEFINED_COMPRESSION_METHOD,
|
|
53
|
+
ERR_UNDEFINED_CRC32,
|
|
53
54
|
ERR_UNDETERMINED_SIZE,
|
|
54
55
|
ERR_UNDEFINED_READER,
|
|
55
56
|
ERR_INVALID_READER,
|
|
56
57
|
ERR_ZIP_NOT_EMPTY,
|
|
57
58
|
ERR_INVALID_SIGNATURE_DATA,
|
|
59
|
+
ERR_INVALID_ENTRY,
|
|
60
|
+
ERR_ZIP_CRYPTO_LAST_MOD_DATE,
|
|
58
61
|
ERR_INVALID_UID,
|
|
59
62
|
ERR_INVALID_GID,
|
|
60
63
|
ERR_INVALID_UNIX_MODE,
|
|
@@ -64,5 +67,7 @@ export {
|
|
|
64
67
|
ERR_INVALID_MSDOS_DATA,
|
|
65
68
|
ERR_INVALID_LEVEL,
|
|
66
69
|
ERR_INVALID_PASSWORD_TYPE,
|
|
67
|
-
ERR_UNSUPPORTED_CRYPTO_API
|
|
70
|
+
ERR_UNSUPPORTED_CRYPTO_API,
|
|
71
|
+
WARNING_COMPRESSION_UNAVAILABLE,
|
|
72
|
+
WARNING_CLAMPED_LAST_MODIFICATION_DATE
|
|
68
73
|
} from "./core/zip-writer.js";
|
|
@@ -57,8 +57,8 @@ setDefaultConfiguration({
|
|
|
57
57
|
|
|
58
58
|
export { terminateWorkersAndModule as terminateWorkers };
|
|
59
59
|
|
|
60
|
-
function terminateWorkersAndModule() {
|
|
60
|
+
async function terminateWorkersAndModule() {
|
|
61
|
+
await terminateWorkers();
|
|
61
62
|
modulePromise = null;
|
|
62
|
-
terminateWorkers();
|
|
63
63
|
resetWasmModule();
|
|
64
64
|
}
|
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.12.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-types && npm run test-api-symmetry && npm run test-api-shape && npm run test-api-mangling",
|
|
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",
|
|
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",
|
|
@@ -57,11 +57,13 @@
|
|
|
57
57
|
"test-deno-dist": "./tests/dist-runner.sh deno",
|
|
58
58
|
"test-node-dist": "./tests/dist-runner.sh node",
|
|
59
59
|
"test-bun-dist": "./tests/dist-runner.sh bun",
|
|
60
|
-
"test-types": "tsc -p ./tests/types/tsconfig.json",
|
|
60
|
+
"test-types": "tsc -p ./tests/types/tsconfig.json && tsc -p ./tests/types/tsconfig-declarations.json",
|
|
61
61
|
"test-registration": "node ./tests/registration.js",
|
|
62
|
+
"test-fidelity": "deno run --allow-read ./tests/fidelity/run.js",
|
|
62
63
|
"test-api-symmetry": "node ./tests/api-symmetry/audit.js",
|
|
63
64
|
"test-api-shape": "node ./tests/api-symmetry/shape.js",
|
|
64
65
|
"test-api-mangling": "node ./tests/api-symmetry/mangling.js",
|
|
66
|
+
"test-api-exports": "node ./tests/api-symmetry/exports.js",
|
|
65
67
|
"test-firefox": "node ./tests/browser-runner.js firefox",
|
|
66
68
|
"test-chrome": "node ./tests/browser-runner.js chrome",
|
|
67
69
|
"test-safari": "node ./tests/browser-runner.js safari"
|