@zip.js/zip.js 2.10.0 → 2.11.1

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.
Files changed (48) hide show
  1. package/deno.json +1 -1
  2. package/dist/zip-core-external.js +23 -48
  3. package/dist/zip-core-external.min.js +1 -1
  4. package/dist/zip-core.js +12 -35
  5. package/dist/zip-core.min.js +1 -1
  6. package/dist/zip-fs-core-external.js +23 -48
  7. package/dist/zip-fs-core-external.min.js +1 -1
  8. package/dist/zip-fs-core.js +12 -35
  9. package/dist/zip-fs-core.min.js +1 -1
  10. package/dist/zip-fs-external.js +23 -48
  11. package/dist/zip-fs-external.min.js +1 -1
  12. package/dist/zip-fs-native.js +15 -38
  13. package/dist/zip-fs-native.min.js +1 -1
  14. package/dist/zip-fs.js +26 -52
  15. package/dist/zip-fs.min.js +1 -1
  16. package/dist/zip-legacy.js +14 -37
  17. package/dist/zip-legacy.min.js +1 -1
  18. package/dist/zip-module.wasm +0 -0
  19. package/dist/zip-native.js +15 -38
  20. package/dist/zip-native.min.js +1 -1
  21. package/dist/zip-web-worker-native.js +1 -1
  22. package/dist/zip-web-worker.js +1 -1
  23. package/dist/zip.js +26 -52
  24. package/dist/zip.min.js +1 -1
  25. package/eslint.config.mjs +1 -1
  26. package/index-native.cjs +15 -38
  27. package/index-native.min.js +1 -1
  28. package/index.cjs +26 -52
  29. package/index.d.cts +5 -37
  30. package/index.d.ts +5 -37
  31. package/index.min.js +1 -1
  32. package/lib/core/codec-pool.js +0 -2
  33. package/lib/core/codec-registry.js +2 -0
  34. package/lib/core/streams/codec-stream.js +0 -2
  35. package/lib/core/streams/common-crypto.js +1 -3
  36. package/lib/core/streams/zip-entry-stream.js +2 -5
  37. package/lib/core/streams/zlib-js/zlib-streams.min.js +1 -1
  38. package/lib/core/streams/zlib-wasm/zlib-streams.js +11 -14
  39. package/lib/core/streams/zlib-wasm/zlib-streams.wasm +0 -0
  40. package/lib/core/version.js +1 -1
  41. package/lib/core/web-worker-inline-native.js +1 -1
  42. package/lib/core/web-worker-inline-wasm.js +1 -1
  43. package/lib/core/zip-entry.js +0 -6
  44. package/lib/core/zip-reader.js +1 -6
  45. package/lib/core/zip-writer.js +4 -19
  46. package/lib/core/zlib-streams-inline.js +1 -1
  47. package/lib/zip-core-reader.js +0 -1
  48. package/package.json +4 -2
package/index.d.ts CHANGED
@@ -2528,16 +2528,6 @@ export interface EntryMetaData {
2528
2528
  * The upper 16-bit portion of {@link EntryMetaData#externalFileAttributes} when it represents Unix mode bits.
2529
2529
  */
2530
2530
  unixExternalUpper?: number;
2531
- /**
2532
- * The internal file attribute (raw).
2533
- * @deprecated Use {@link EntryMetaData#internalFileAttributes} instead.
2534
- */
2535
- internalFileAttribute: number;
2536
- /**
2537
- * The external file attribute (raw).
2538
- * @deprecated Use {@link EntryMetaData#externalFileAttributes} instead.
2539
- */
2540
- externalFileAttribute: number;
2541
2531
  /**
2542
2532
  * The number of the disk where the entry data starts.
2543
2533
  */
@@ -3121,7 +3111,11 @@ export interface ZipWriterConstructorOptions extends WorkerConfiguration {
3121
3111
  /**
3122
3112
  * `true` to keep the order of the entry physically in the zip file.
3123
3113
  *
3124
- * When set to `true`, the use of web workers will be improved.
3114
+ * @remarks
3115
+ * The entries are then written one after another, so concurrent calls to {@link ZipWriter#add} compress one
3116
+ * entry at a time and use a single web worker. Set {@link ZipWriterConstructorOptions#bufferedWrite} to `true`
3117
+ * to compress them concurrently while still keeping the order, at the cost of buffering each entry until the
3118
+ * previous ones are written.
3125
3119
  *
3126
3120
  * @defaultValue true
3127
3121
  */
@@ -3301,12 +3295,6 @@ export interface ZipWriterConstructorOptions extends WorkerConfiguration {
3301
3295
  * attribute for folder entries, Unix default permissions when `msDosCompatible` is `false`).
3302
3296
  */
3303
3297
  externalFileAttributes?: number;
3304
- /**
3305
- * The external file attribute.
3306
- *
3307
- * @deprecated Use {@link ZipWriterConstructorOptions#externalFileAttributes} instead.
3308
- */
3309
- externalFileAttribute?: number;
3310
3298
  /**
3311
3299
  * The Unix owner id to write in the Unix extra field or as part of the external attributes.
3312
3300
  */
@@ -3358,12 +3346,6 @@ export interface ZipWriterConstructorOptions extends WorkerConfiguration {
3358
3346
  * @defaultValue 0
3359
3347
  */
3360
3348
  internalFileAttributes?: number;
3361
- /**
3362
- * The internal file attribute.
3363
- *
3364
- * @deprecated Use {@link ZipWriterConstructorOptions#internalFileAttributes} instead.
3365
- */
3366
- internalFileAttribute?: number;
3367
3349
  /**
3368
3350
  * When provided, the low 8-bit MS-DOS attributes to write into external file attributes.
3369
3351
  * Must be an integer between 0 and 255.
@@ -4538,27 +4520,13 @@ export const ERR_INVALID_CODEC_MODULE: string;
4538
4520
  /**
4539
4521
  * Invalid CRC-32 checksum error, thrown when the {@link ZipReaderOptions#checkCrc32} option is set and the CRC-32
4540
4522
  * checksum of an entry does not match the value stored in the zip file.
4541
- *
4542
- * @remarks
4543
- * This constant and {@link ERR_INVALID_AUTHENTICATION_CODE} share the same value as {@link ERR_INVALID_SIGNATURE}
4544
- * for backward compatibility. They will become distinct strings in the next minor version.
4545
4523
  */
4546
4524
  export const ERR_INVALID_CRC32: string;
4547
4525
  /**
4548
4526
  * Invalid authentication code error, thrown when the authentication code of an entry encrypted with AES does not
4549
4527
  * match the encrypted data, e.g. when the data was tampered or corrupted after the encryption.
4550
- *
4551
- * @remarks
4552
- * This constant and {@link ERR_INVALID_CRC32} share the same value as {@link ERR_INVALID_SIGNATURE} for backward
4553
- * compatibility. They will become distinct strings in the next minor version.
4554
4528
  */
4555
4529
  export const ERR_INVALID_AUTHENTICATION_CODE: string;
4556
- /**
4557
- * Invalid signature error
4558
- *
4559
- * @deprecated Use {@link ERR_INVALID_CRC32} or {@link ERR_INVALID_AUTHENTICATION_CODE} instead.
4560
- */
4561
- export const ERR_INVALID_SIGNATURE: string;
4562
4530
  /**
4563
4531
  * Invalid uncompressed size error
4564
4532
  */