Skip to content

fix: replace extract-zip with node-stream-zip to fix Node 24.16.0 hang#831

Merged
BYK merged 1 commit into
masterfrom
fix/replace-extract-zip
Jun 9, 2026
Merged

fix: replace extract-zip with node-stream-zip to fix Node 24.16.0 hang#831
BYK merged 1 commit into
masterfrom
fix/replace-extract-zip

Conversation

@BYK

@BYK BYK commented Jun 9, 2026

Copy link
Copy Markdown
Member

Problem

extract-zip@2.0.1 (via yauzl@2.10.0 / fd-slicer@1.1.0) hangs on Node.js 24.16.0+ due to a stream regression (nodejs/node#63487). The root cause is PR nodejs/node#61098 ("stream: propagate destruction in duplexPair") which interacts badly with fd-slicer's old-style stream implementation.

This caused craft publish to silently exit with code 0 after downloading artifacts, without actually publishing anything. The issue also affects Node.js >=26.1.0.

Affected ecosystem: extract-zip, Playwright, Puppeteer, Electron Forge, Cypress — all of which have had to work around or replace extract-zip.

Fix

Replace extract-zip with node-stream-zip@1.15.0:

  • Zero dependencies (vs extract-zip's 5 transitive deps including the broken yauzl/fd-slicer)
  • Ships its own TypeScript types
  • Maintained and works correctly on Node 22.x, 24.x (including 24.16.0+), and 26.x
  • Simple async API: StreamZip.async

Changes

File Change
src/utils/system.ts Replaced extract-zip import with node-stream-zip; rewrote extractZipArchive() to use StreamZip.async with mkdir (extract-zip created the output dir automatically, node-stream-zip doesn't) and try/finally for cleanup
package.json Removed extract-zip, @types/extract-zip (deprecated stub); added node-stream-zip@^1.15.0

Net result: -9 packages, +1 package. All 24 system tests pass.

extract-zip@2.0.1 (via yauzl@2.10.0 / fd-slicer@1.1.0) hangs on
Node.js 24.16.0+ due to a stream regression (nodejs/node#63487).
This caused craft publish to silently exit after downloading artifacts.

Replace with node-stream-zip@1.15.0 which has zero dependencies and
works correctly on all Node.js versions.
@BYK BYK force-pushed the fix/replace-extract-zip branch from b6d564c to 3566840 Compare June 9, 2026 19:39
@BYK BYK merged commit 883f05b into master Jun 9, 2026
21 checks passed
@BYK BYK deleted the fix/replace-extract-zip branch June 9, 2026 20:28
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.

1 participant