Skip to content

compress-gzip - chore: upgrade pako (breaking) - #2001

Merged
jaredwray merged 1 commit into
mainfrom
claude/keyv-dependency-maintenance-77m3u1
Jul 3, 2026
Merged

compress-gzip - chore: upgrade pako (breaking)#2001
jaredwray merged 1 commit into
mainfrom
claude/keyv-dependency-maintenance-77m3u1

Conversation

@jaredwray

Copy link
Copy Markdown
Owner

Please check if the PR fulfills these requirements

  • Followed the Contributing and Code of Conduct guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage. — N/A, dependency-only change; full test suite passes.

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

  • pako 2.1.0 → 3.0.0 (@keyv/compress-gzip)
  • @types/pako 2.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. Updated src/index.ts (decompress).
  • Option type rename: DeflateFunctionOptionsDeflateOptions to match v3's bundled types. Updated src/types.ts, and InflateOptions & { to?: "string" }InflateOptions & { toText?: boolean }.
  • Default export removed: no change needed — the adapter already used named imports (import { deflate, inflate } from "pako").
  • legacyHash default 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 build passes for @keyv/compress-gzip
  • pnpm test:ci passes (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

- 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
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpako@​3.0.010010010089100

View full report

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c892a43) to head (d041058).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jaredwray
jaredwray merged commit 107d164 into main Jul 3, 2026
14 checks passed
@jaredwray
jaredwray deleted the claude/keyv-dependency-maintenance-77m3u1 branch July 3, 2026 00:00

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This was referenced Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants