What's Changed in v2.8.60
New features
- New
VERSIONconstant exposing the version of the library at runtime (e.g."2.8.60"). It matches theversiondeclared inpackage.json; the continuous integration verifies the agreement - New
getRegisteredCodecs()function. It returns the definitions of the codecs registered withregisterCodec(), as snapshots that cannot alter the registry. TheCompressionStreamandDecompressionStreamclasses of a codec registered withcodecURIappear in the result once its module has been imported - New
getSupportedCompressionMethods()function. It returns the compression methods supported in the current environment and configuration: the built-in methods resolved against the compression streams available at the time of the call, followed by the registered codecs. Each entry reports thecompressionanddecompressionsupport separately, e.g. Deflate64 is read-only. The support of a codec registered withcodecURIonly is reported asundefineduntil its module is imported - Registered compression codecs now receive the size of the source data as
CompressionStreamOptions#uncompressedSizewhen the reader has a known size. Codecs such as Zstandard can use it as the pledged source size and include the content size in the compressed frame (#675)
Bug fixes
- The
zip-fs-corebuild now exports the full core API. It previously exported only the filesystem classes, soconfigure(),registerCodec(), the reader and writer classes, and the constants were unreachable from this build
Documentation
- The
Readerclass documents how to implement random access to files opened with the runtime APIs, with a Deno example - The
offsetandusdzoptions are documented as read when theZipWriteris created and ignored when passed toZipWriter#add, and the default value ofoffsetread fromWriter#sizeis documented
Tests and continuous integration
- New tests cover the registered codec snapshots, the codec constructor options transmitted to web workers, the
VERSIONconstant, and the supported compression methods including the deferred resolution ofcodecURIcodecs - The version bump now rebuilds the bundles so the published files embed the version, and the continuous integration verifies that the version constant agrees with the declared versions