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: fs.promises does not work with ASAR paths #18092

Merged
merged 1 commit into from May 2, 2019

Conversation

miniak
Copy link
Contributor

@miniak miniak commented May 1, 2019

Description of Change

Closes #17190.

Added missing overrides for fs.promises APIs implementing ASAR support. Related to #17999.

Checklist

Release Notes

Notes: Fixed fs.promises APIs not working with ASAR paths.

@miniak miniak self-assigned this May 1, 2019
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label May 1, 2019
@miniak miniak requested a review from codebytere May 1, 2019 15:09
@miniak miniak force-pushed the miniak/asar-fs-promises branch 3 times, most recently from 46b0047 to 7d21b45 Compare May 1, 2019 15:34
Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

lgtm but second opinion from @MarshallOfSound?

ideally we'd wrap the actual methods instead of util.promisifying them but that'd add a lot of code overhead so i feel comfortable with this approach as it stands

Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

Can we add a test that Object.keys(require('fs')) === Object.keys(require('original-fs')) and Object.keys(require('fs').promises) === Object.keys(require('original-fs').promises) just to ensure we aren't adding / removing APIs

lib/common/asar.js Outdated Show resolved Hide resolved
@miniak miniak force-pushed the miniak/asar-fs-promises branch 2 times, most recently from 4d2e23c to d112ffd Compare May 1, 2019 17:16
@miniak
Copy link
Contributor Author

miniak commented May 1, 2019

@MarshallOfSound test added

@miniak
Copy link
Contributor Author

miniak commented May 2, 2019

@zcbenz can you have a look, please?

@zcbenz zcbenz merged commit 2dd108e into master May 2, 2019
@release-clerk
Copy link

release-clerk bot commented May 2, 2019

Release Notes Persisted

Fixed fs.promises APIs not working with ASAR paths.

@trop
Copy link
Contributor

trop bot commented May 2, 2019

I have automatically backported this PR to "5-0-x", please check out #18115

@trop
Copy link
Contributor

trop bot commented May 2, 2019

I have automatically backported this PR to "6-0-x", please check out #18114

@codebytere
Copy link
Member

@miniak this should probably also go to 4-2-x

@sofianguy sofianguy added this to Fixed in 5.0.1 in 5.0.x May 4, 2019
@sofianguy sofianguy added this to Fixed in 6.0.0-beta.2 in 6.1.x May 8, 2019
kiku-jw pushed a commit to kiku-jw/electron that referenced this pull request May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-pr 🌱 PR opened in the last 24 hours
Projects
No open projects
5.0.x
Fixed in 5.0.1
6.1.x
Fixed in 6.0.0-beta.2
Development

Successfully merging this pull request may close these issues.

Support fs.promises in asar files.
5 participants