Fix destroy() usage in fd-slicer#170
Merged
Merged
Conversation
3 tasks
mrgoonie
pushed a commit
to mrgoonie/claudekit-cli
that referenced
this pull request
May 26, 2026
Node >= 24.16.0 introduced a stream-lifecycle change that exposes a long-standing bug in yauzl@2.10.0's vendored fd-slicer: its custom `destroy()` collides with Node's native readable-stream destroy and the deflate read stream stops emitting `data`/`end` partway through a sufficiently-large entry. The outer Promise never settles, so `ck new` hangs at "Extracting files... this may take a while" with the spinner spinning indefinitely on Linux. `extract-zip@2.0.1` is unmaintained (6 years stale) and still pins `yauzl@^2.10.0`. The fix landed upstream in yauzl@3.3.1 but is not reachable through extract-zip. This mirrors the existing macOS handling: route Linux through the system unzip binary first and only fall back to the JS path if the binary is missing. On WSL2/Linux this replaces a >2-minute hang with a ~300ms native extraction. Refs: - nodejs/node#63487 (Node 24.16.0 regression) - thejoshwolfe/yauzl#169 (fd-slicer destroy collision) - thejoshwolfe/yauzl#170 (fix shipped in yauzl@3.3.1) - max-mapper/extract-zip#154 (unmaintained, no fix coming) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
decentraland-bot
added a commit
to decentraland/creator-hub
that referenced
this pull request
May 31, 2026
Electron's postinstall silently fails on Node 24.16.0 due to a bug in yauzl (used by extract-zip) that causes zip extraction to hang without error. Override yauzl to ^3.3.1 which contains the upstream fix (thejoshwolfe/yauzl#170). This resolves electron/electron#51619. Also remove --silent from npm install commands in the Makefile so that install errors are visible in CI output instead of being suppressed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
LautaroPetaccio
pushed a commit
to decentraland/creator-hub
that referenced
this pull request
Jun 1, 2026
* chore: update Node.js to 24 Upgrade all CI workflow Node.js version references to Node 24 (LTS). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: resolve Electron install failure on Node 24 Electron's postinstall silently fails on Node 24.16.0 due to a bug in yauzl (used by extract-zip) that causes zip extraction to hang without error. Override yauzl to ^3.3.1 which contains the upstream fix (thejoshwolfe/yauzl#170). This resolves electron/electron#51619. Also remove --silent from npm install commands in the Makefile so that install errors are visible in CI output instead of being suppressed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: update package-lock.json for yauzl override Regenerate lockfile to resolve yauzl to v3.3.2 (via the override added in the previous commit). This fixes the Electron binary extraction failure on Node 24. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
9 tasks
pull Bot
pushed a commit
to steelburn/open-design
that referenced
this pull request
Jun 4, 2026
…Node 24.16.0+ (nexu-io#3584) fd-slicer's custom destroy() collides with Node 24.16.0's stream lifecycle change, causing extract-zip to silently hang at 97% during Electron binary extraction. yauzl 3.x drops fd-slicer entirely. extract-zip is unmaintained and pins yauzl ^2.10.0, so the fix can only flow through a pnpm override. Refs: thejoshwolfe/yauzl#170, nodejs/node#63487 Co-authored-by: jeremeioss <jeremeibg@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(background) Node 8 added an actual readStream.destroy() which collided with yauzl+fd-slicer's custom implementation. Yauzl worked around this in #110 , but the problematic collision still existed in the vendored fd-slicer code.
This PR cleans up the destroy pattern in fd-slicer and adds several tests to make sure things are working better. It turns out there's always been a bug that no one reported with the combination of
fromBuffer(), thenopenReadStream()on an uncompressed entry, then callingdestroy()to interrupt processing partway through. There's a test for it now!The motivating use case for writing this PR was async iteration being broken on read streams for uncompressed entries:
Closes #169
There's a test for that now too.