compress-gzip - chore: upgrade pako (breaking) - #2001
Conversation
- pako 2.1.0 -> 3.0.0 (major)
- Remove @types/pako (v3 ships its own type definitions)
pako v3 breaking changes handled in @keyv/compress-gzip:
- Replaced the removed `{ to: "string" }` inflate option with
`{ toText: true }` (src/index.ts) and updated the Options type
accordingly (src/types.ts).
- Renamed the pako option type `DeflateFunctionOptions` -> `DeflateOptions`
to match v3's bundled type definitions.
- The code already used named imports, so pako v3's removal of the default
export required no change.
The `legacyHash` default change only affects compressed output bytes (still
a valid DEFLATE stream), so previously stored gzip-compressed values remain
decompressible. Round-trip compress/decompress verified by the test suite.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WVzS34CgyLpVDdJ9urfWxZ
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2001 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 55 55
Lines 4887 4887
Branches 784 785 +1
=========================================
Hits 4887 4887 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request upgrades the pako dependency from version 2 to version 3 in the compress-gzip package. This upgrade includes updating the decompression options from to: 'string' to toText: true in index.ts and updating the corresponding TypeScript types in types.ts. The @types/pako dependency has also been removed. I have no feedback to provide as the changes are correct and there are no review comments.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Chore — major upgrade of
pako(2 → 3) for@keyv/compress-gzip.Versions
pako2.1.0 → 3.0.0 (@keyv/compress-gzip)@types/pako2.0.4 → removed (v3 ships its own type definitions)Breaking notes
pako v3 changes required these code updates:
{ to: "string" }→{ toText: true }: the string-output inflate option was renamed. Updatedsrc/index.ts(decompress).DeflateFunctionOptions→DeflateOptionsto match v3's bundled types. Updatedsrc/types.ts, andInflateOptions & { to?: "string" }→InflateOptions & { toText?: boolean }.import { deflate, inflate } from "pako").legacyHashdefault flipped: affects only the compressed output bytes (still a valid DEFLATE stream), so values compressed by earlier versions remain decompressible. Round-trip verified by the test suite.Tests
pnpm buildpasses for@keyv/compress-gzippnpm test:cipasses (biome + 9 tests, incl. compress/decompress round-trip)Runtime phase — final breaking major (
pako). This completes the dependency-maintenance runtime phase.Generated by Claude Code