Releases: gildas-lormeau/zip.js
Releases · gildas-lormeau/zip.js
v2.8.3
- Added support of JavaScript-based implementation (based on zlib) of Compression Streams API (see https://github.com/gildas-lormeau/zlib-streams-ts) as an alternative to the default WASM-based implementation. See the new
exports
property in thepackage.json
file and files in the/dist
folder, JavaScript-based implementations are suffixed with-native
(e.g../index-native.js
). - Fixed
malloc
error in environments not fully supporting WASM (see #605)
v2.8.2
New in version 2.8
- WebAssembly Integration
- Replaced JavaScript compression and decompression implementation with WebAssembly zlib module (https://github.com/gildas-lormeau/zlib-streams. This improves security and performance when native
CompressionStream
andDecompressionStream
APIs are not used (for example, when using custom compression levels or decompressing deflate64 data) or unavailable. - Added the
wasmURI
configuration property to provide the module URI if necessary (for example, when the CSP blocks data URIs).
- Deflate64 Decompression Support
- Added support of proprietary Deflate64 decompression algorithm which can be used by Windows when compressing large files (see #517)
- Simplified Configuration
- Replaced the complex
workerScripts
configuration with a singleworkerURI
property, making it easier to set up web workers. - Default values for
workerURI
andwasmURI
are provided, reducing the need for manual configuration when building code.
- Improved Type Safety and Clarity
- Refined TypeScript definitions, including clearer distinctions between
DirectoryEntry
andFileEntry
. - Deprecated and removed legacy APIs and classes, streamlining the library for current use cases.
Breaking Changes
- Worker Configuration Changes:
- The
workerScripts
property in the configuration was removed and replaced withworkerURI
(andwasmURI
for the WASM module).
- Stream Implementation Updates:
- The
Deflate
andInflate
properties in the configuration were removed and replaced withCompressionStream
andDecompressionStream
.
- Deprecated Classes Removed:
- The deprecated classes
SplitZipReader
andSplitZipWriter
were removed.
- Event-Based Codec Support Removed:
- Interfaces and classes related to event-based codecs, such as
EventBasedZipLibrary
,initShimAsyncCodec
, andEventBasedCodec
were removed.
- Entry Metadata Changes in
index.d.ts
:
- The
directory
property was removed fromEntryMetaData
and moved toDirectoryEntry
andFileEntry
interfaces.
What's Changed in v2.8.2
Full Changelog: v2.8.1...v2.8.2
v2.8.1
New in version 2.8
-
WebAssembly Integration
- Added support for WebAssembly module based on zlib (see https://github.com/gildas-lormeau/zlib-streams) to enhance performance for compression and decompression tasks when
CompressionStream
andDecompressionStream
are not used.
- Added support for WebAssembly module based on zlib (see https://github.com/gildas-lormeau/zlib-streams) to enhance performance for compression and decompression tasks when
-
Deflate64 decompression support
- Added support of proprietary Deflate64 decompression algorithm which used by Windows when compressing large files (see #517)
-
Simplified Configuration
- Replaced the complex
workerScripts
configuration with a singleworkerURI
property, making it easier to set up web workers. - Default values for
workerURI
andwasmURI
are provided, reducing the need for manual configuration.
- Replaced the complex
-
Improved Type Safety and Clarity
- Refined TypeScript definitions, including clearer distinctions between
DirectoryEntry
andFileEntry
. - Deprecated and removed legacy APIs and classes, streamlining the library for current use cases.
- Refined TypeScript definitions, including clearer distinctions between
Breaking Changes
-
Worker Configuration Changes:
- The
workerScripts
property in the configuration was removed and replaced withworkerURI
andwasmURI
.
- The
-
Stream Implementation Updates:
- The
Deflate
andInflate
properties in the configuration were removed and replaced withCompressionStream
andDecompressionStream
.
- The
-
Deprecated Classes Removed:
- The deprecated classes
SplitZipReader
andSplitZipWriter
were removed.
- The deprecated classes
-
Event-Based Codec Support Removed:
- Interfaces and classes related to event-based codecs, such as
EventBasedZipLibrary
,initShimAsyncCodec
, andEventBasedCodec
were removed.
- Interfaces and classes related to event-based codecs, such as
-
Entry Metadata Changes:
- The
directory
property was removed fromEntryMetaData
and moved toDirectoryEntry
andFileEntry
interfaces.
- The
v2.8.1: Fixed exports in package.json
(see #599)
v2.8.0
New in version 2.8
-
WebAssembly Integration
- Added support for WebAssembly module based on zlib (see https://github.com/gildas-lormeau/zlib-streams) to enhance performance for compression and decompression tasks when
CompressionStream
andDecompressionStream
are not used.
- Added support for WebAssembly module based on zlib (see https://github.com/gildas-lormeau/zlib-streams) to enhance performance for compression and decompression tasks when
-
Deflate64 decompression support
- Added support of proprietary Deflate64 decompression algorithm which used by Windows when compressing large files (see #517)
-
Simplified Configuration
- Replaced the complex
workerScripts
configuration with a singleworkerURI
property, making it easier to set up web workers. - Default values for
workerURI
andwasmURI
are provided, reducing the need for manual configuration.
- Replaced the complex
-
Improved Type Safety and Clarity
- Refined TypeScript definitions, including clearer distinctions between
DirectoryEntry
andFileEntry
. - Deprecated and removed legacy APIs and classes, streamlining the library for current use cases.
- Refined TypeScript definitions, including clearer distinctions between
Breaking Changes
-
Worker Configuration Changes:
- The
workerScripts
property in the configuration was removed and replaced withworkerURI
andwasmURI
.
- The
-
Stream Implementation Updates:
- The
Deflate
andInflate
properties in the configuration were removed and replaced withCompressionStream
andDecompressionStream
.
- The
-
Deprecated Classes Removed:
- The deprecated classes
SplitZipReader
andSplitZipWriter
were removed.
- The deprecated classes
-
Event-Based Codec Support Removed:
- Interfaces and classes related to event-based codecs, such as
EventBasedZipLibrary
,initShimAsyncCodec
, andEventBasedCodec
were removed.
- Interfaces and classes related to event-based codecs, such as
-
Entry Metadata Changes:
- The
directory
property was removed fromEntryMetaData
and moved toDirectoryEntry
andFileEntry
interfaces.
- The
v2.7.73
v2.7.72
- Fixed regression when using zip.js in Node < 21.2 with the option
useCompressionStream
not explicitly set tofalse
(Node.js does not support thedeflate-raw
format of theCompressionStream
API in version < 21.2) - Removed useless files from the JSR repository
v2.7.71
- Improved security in
ZipReader
by:- adding the
checkOverlappingEntry
andcheckOverlappingEntryOnly
options (false
by default) to detect potential non-recursive zip-bombs (e.g. "A better zip bomb"), more info here: #587 (comment) - making sure that the output size of the decompressed entry data matches the expected size exactly
- adding the
- Fixed
URLString
type in the type definition file - Updated dev dependencies