Skip to content

refactor: use @electron-internal/extract-zip in the npm package#51886

Merged
VerteDinde merged 1 commit into
mainfrom
sam/npm-native-extract-zip
Jun 5, 2026
Merged

refactor: use @electron-internal/extract-zip in the npm package#51886
VerteDinde merged 1 commit into
mainfrom
sam/npm-native-extract-zip

Conversation

@MarshallOfSound

@MarshallOfSound MarshallOfSound commented Jun 4, 2026

Copy link
Copy Markdown
Member

Description of Change

Closes #51619

Switches the published electron npm package from extract-zip to @electron-internal/extract-zip, a drop-in replacement maintained at electron/extract-zip that uses prebuilt native bindings for extraction.

The package is ESM-only, so the require() in install.js now destructures the named extract export — supported on the Node versions the package already requires (engines: >= 22.12.0).

Verified locally on macOS arm64 by stamping the npm/ folder as electron@42.3.3 and running the full install flow: the zip downloads and extracts, cli.js --version launches the app, and the extracted output (file list, content hashes, symlinks, permissions) is byte-identical to what extract-zip@2.0.1 produces.

Checklist

  • PR description included and stakeholders cc'd
  • PR title follows semantic commit guidelines

Release Notes

Notes: none

@MarshallOfSound MarshallOfSound requested a review from a team as a code owner June 4, 2026 22:54
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Jun 4, 2026
@erickzhao

erickzhao commented Jun 4, 2026

Copy link
Copy Markdown
Member

Closes #51619 (would be good to include in PR body, don't have perms for that)

@VerteDinde

Copy link
Copy Markdown
Member

@erickzhao I got you 🫡

@jkleinsc jkleinsc added target/40-x-y PR should also be added to the "40-x-y" branch. target/41-x-y PR should also be added to the "41-x-y" branch. target/42-x-y PR should also be added to the "42-x-y" branch. target/43-x-y PR should also be added to the "43-x-y" branch. labels Jun 5, 2026
@VerteDinde VerteDinde merged commit ad2df5c into main Jun 5, 2026
147 of 149 checks passed
@release-clerk

release-clerk Bot commented Jun 5, 2026

Copy link
Copy Markdown

No Release Notes

@VerteDinde VerteDinde deleted the sam/npm-native-extract-zip branch June 5, 2026 17:41
@trop

trop Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "41-x-y" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "40-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot removed target/41-x-y PR should also be added to the "41-x-y" branch. target/40-x-y PR should also be added to the "40-x-y" branch. labels Jun 5, 2026
@trop

trop Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "43-x-y", please check out #51894

@trop trop Bot added the in-flight/43-x-y label Jun 5, 2026
@trop

trop Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "42-x-y", please check out #51895

@trop trop Bot added in-flight/42-x-y and removed target/43-x-y PR should also be added to the "43-x-y" branch. target/42-x-y PR should also be added to the "42-x-y" branch. labels Jun 5, 2026
jan-molak added a commit to serenity-js/serenity-js that referenced this pull request Jun 5, 2026
yauzl@2.x uses fd-slicer@1.x which has a broken stream lifecycle on
Node.js >= 24.16.0 causing extract-zip to silently fail when extracting
large files (like the Electron binary). yauzl@3.x bundles its own
fixed fd-slicer that doesn't have this issue.

This replaces the ensure-electron.ts workaround script with a proper
pnpm override that fixes the root cause for all packages using extract-zip.

Can be removed once electron releases with @electron-internal/extract-zip
(see electron/electron#51886).

Related tickets: electron/electron#51619
@trop trop Bot added merged/43-x-y PR was merged to the "43-x-y" branch. and removed in-flight/43-x-y labels Jun 6, 2026
@trop

trop Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@jkleinsc has manually backported this PR to "41-x-y", please check out #51911

@trop trop Bot added merged/42-x-y PR was merged to the "42-x-y" branch. and removed in-flight/42-x-y labels Jun 8, 2026
jkleinsc added a commit that referenced this pull request Jun 8, 2026
* build: update @electron/get to v5 (#51234)

(cherry picked from commit 44e4839)

* refactor: use @electron-internal/extract-zip in the npm package (#51886)

(cherry picked from commit ad2df5c)

---------

Co-authored-by: Samuel Attard <sam@electronjs.org>
@trop trop Bot added merged/41-x-y PR was merged to the "41-x-y" branch. and removed in-flight/41-x-y labels Jun 8, 2026
@trop trop Bot added the in-flight/40-x-y label Jun 8, 2026
jkleinsc pushed a commit that referenced this pull request Jun 8, 2026
* build: update @electron/get to v5 (#51234)

(cherry picked from commit 44e4839)

Co-authored-by: Samuel Attard <sam@electronjs.org>

* refactor: use @electron-internal/extract-zip in the npm package (#51886)

(cherry picked from commit ad2df5c)

Co-authored-by: Samuel Attard <sam@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sam@electronjs.org>
@trop trop Bot added merged/40-x-y PR was merged to the "40-x-y" branch. and removed in-flight/40-x-y labels Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/40-x-y PR was merged to the "40-x-y" branch. merged/41-x-y PR was merged to the "41-x-y" branch. merged/42-x-y PR was merged to the "42-x-y" branch. merged/43-x-y PR was merged to the "43-x-y" branch. new-pr 🌱 PR opened recently semver/none

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installing Electron fails under Node.js 26.1.0+ and 24.16.0+

4 participants