Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support the throwIfNoEntry option to statSync and lstatSync in asar files #40221

Merged
merged 1 commit into from Oct 16, 2023

Conversation

MarshallOfSound
Copy link
Member

Fixes #40211

Caused by node internal code that looks like this:

const tryStatSync =
  (path) => fs.statSync(path, { throwIfNoEntry: false }) ?? new fs.Stats();

Notes:

  • Fixed loading nested ESM dependencies in node_modules
  • Correctly support the throwIfNoEntry option in fs.statSync/fs.lstatSync in asar files

@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes target/28-x-y PR should also be added to the "28-x-y" branch. labels Oct 16, 2023
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 16, 2023
@MarshallOfSound MarshallOfSound merged commit b6ec19a into main Oct 16, 2023
18 of 19 checks passed
@MarshallOfSound MarshallOfSound deleted the fix-nested-esm-load branch October 16, 2023 16:35
@release-clerk
Copy link

release-clerk bot commented Oct 16, 2023

Release Notes Persisted

  • Fixed loading nested ESM dependencies in node_modules
  • Correctly support the throwIfNoEntry option in fs.statSync/fs.lstatSync in asar files

@trop
Copy link
Contributor

trop bot commented Oct 16, 2023

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

@trop trop bot added in-flight/28-x-y and removed target/28-x-y PR should also be added to the "28-x-y" branch. labels Oct 16, 2023
@trop trop bot added merged/28-x-y PR was merged to the "28-x-y" branch. and removed in-flight/28-x-y labels Oct 18, 2023
felixrieseberg pushed a commit to felixrieseberg/electron that referenced this pull request Oct 25, 2023
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/28-x-y PR was merged to the "28-x-y" branch. new-pr 🌱 PR opened in the last 24 hours semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Electron 28 breaks import of transitive dependencies inside ES modules
2 participants