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: use node-gyp as a module instead of shelling out #400

Merged
merged 2 commits into from
Sep 7, 2020

Conversation

malept
Copy link
Member

@malept malept commented Sep 2, 2020

Technically it's a refactor, but it's also a fix/perf improvement. Tests run significantly faster probably because it removes a layer of indirection (i.e., shelling out). I believe we may be able to do something similar with prebuild-install and just get rid of @malept/cross-spawn-promise as a dependency (still needs to be a devDependency).

This is ported from #363

Turns out the module uses command line arguments cry but it's still better than using spawn.

Also extracts the actual module rebuilding to its own class.

Additionally, it refactors locateBinary to be a little more efficient in the worst case.

@malept malept requested a review from a team September 2, 2020 07:35
@malept malept force-pushed the malept/refactor/node-gyp-module branch from 6bbc342 to 725149c Compare September 2, 2020 07:35
@malept malept merged commit 9d166a8 into master Sep 7, 2020
@malept malept deleted the malept/refactor/node-gyp-module branch September 7, 2020 02:50
@electron-bot
Copy link

🎉 This PR is included in version 2.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants