@scayle/unstorage-compression-driver
1.5.0
Minor Changes
- Added optional
paramsfield onCompressionDriverOptions, plus a thirdparamsargument on the exportedcompressanddecompressfunctions. The value is passed verbatim as the second argument to Node'szlib.brotliCompress/zlib.brotliDecompress/zlib.gzip/zlib.deflate. Omittingparamsfor non-brotli encodings preserves the previous behaviour byte-for-byte.
Behavior change for brotli encoding: whenparamsis omitted, the driver now defaults to brotli quality 6 (matches Node's newerzlib.compressBrotliAPI and is the recommended setting for streaming workloads). The previous default . set indirectly through Node's legacyzlib.brotliCompressAPI . was quality 11, which targets offline/build-time compression and is ~300x slower to encode for negligible storage benefit on JSON-shaped payloads.
This is a runtime behavior change but not a contract change: decompression of pre-existing brotli-encoded entries (cached at quality 11) still works . brotli is self-describing on the decoder side, and quality is encode-only. Callers who relied on byte-exact brotli output will see different bytes; passparams: { params: { [BROTLI_PARAM_QUALITY]: 11 } }to restore the prior output.
1.4.1
Patch Changes
- Migrate build toolchain from unbuild to obuild.
1.4.0
Minor Changes
- All packages now require Node.js 22 or later, in line with the current Node.js LTS release schedule. See the Node.js release schedule for details.
If your project is still running an older Node.js version, now is a good time to upgrade to Node.js 22 at minimum, or ideally Node.js 24, for the latest security patches and stability improvements.
1.3.0
Minor Changes
- Fixed an issue where the compression driver would return
undefinedwhen an item was not found. The driver now correctly returnsnullwhen the key does not exist, as required by the unstorage driver specification. See: https://unstorage.unjs.io/guide#getitemkey-opts
1.2.5
Patch Changes
- Updated dependency
@opentelemetry/api@^1.9.0to@opentelemetry/api@catalog: - Updated dependency
[email protected]tounstorage@catalog: - This is an internal change only. The packages now use the PNPM catalog feature to ensure dependencies use the identical version across packages.
1.2.4
Patch Changes
- Updated dependency
[email protected]to[email protected]
1.2.3
Patch Changes
- Updated dependency
[email protected]to[email protected]
1.2.2
Patch Changes
- Cleaned up README.md and added CONTRIBUTING.md. No functional changes.
1.2.1
Patch Changes
- Updated dependency
[email protected]to[email protected]
1.2.0
Minor Changes
- Added optional OpenTelemetry tracing around compression and decompression events. To enable this feature, add the buildtime environment variable
UNSTORAGE_COMPRESSION_OTEL_TRACE=true.
Patch Changes
- Added dependency
@opentelemetry/api@^1.9.0
1.1.0
Minor Changes
- Removed
destras dependency and and replaced its usage withJSON.parsefor string to object parsing. Depending on the payload size, this should have marginal positive impact on the overall parsing performance. This is an internal refactoring and does not affect usage.
Patch Changes
- Removed dependency
[email protected]
1.0.2
Patch Changes
- Updated dependency
[email protected]to[email protected]
1.0.1
Patch Changes
- Updated dependency
[email protected]to[email protected]
1.0.0
Major Changes
- Drop CommonJS support. The package is now ESM-only. If you are using this package in a Nuxt 3 context, you should have no issues.
0.2.7
Patch Changes
- Updated dependency
[email protected]to[email protected]
0.2.6
Patch Changes
- Updated dependency
[email protected]to[email protected]
0.2.5
Patch Changes
- Updated dependency
[email protected]to[email protected]
0.2.4
Patch Changes
- Updated dependency
[email protected]to[email protected]
0.2.3
Patch Changes
- Updated dependency
[email protected]to[email protected]
0.2.2
Patch Changes
- Updated dependency
[email protected]to[email protected]
0.2.1
Patch Changes
- Fix publishing error which caused some files to be missing
0.2.0
Minor Changes
- Resolved warnings with the types and exports configuration reported by
AreTheTypesWronghttps://github.com/arethetypeswrong/arethetypeswrong.github.io. This was done as a preventative measure to protect against potential ESM or TypeScript issues.
Additionally, we now build the library withunbuildrather thantsc.
This is essentially an internal refactor and should have no user-visible changes. However, as part of this change, thecompressionandtypesexport configurations were removed frompackage.json. The exports were unused, but are mentioned here as it could possibly result in a breaking change.
0.1.5
Patch Changes
- Updated dependency
[email protected]to[email protected]
0.1.4
Patch Changes
- Updated dependency
[email protected]to[email protected]
0.1.3
Patch Changes
- Format code with dprint
0.1.2
Patch Changes
- Removed unnecessary warning message that indicated that no cache value has been available
0.1.1
Patch Changes
- Introduce
@scayle/unstorage-compression-driverpackage as custom unstorage driver. It allows to compress values withdeflate,gziporbrotliusingnode:zlibwhile passing the data source handling to a generic supported driver likeredisorVercel KV.