-
Notifications
You must be signed in to change notification settings - Fork 175
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: require node-gyp@^8.4.0 & handle old Electron versions #907
Conversation
Codecov Report
@@ Coverage Diff @@
## master #907 +/- ##
==========================================
+ Coverage 76.13% 76.38% +0.25%
==========================================
Files 19 19
Lines 683 686 +3
Branches 130 131 +1
==========================================
+ Hits 520 524 +4
Misses 118 118
+ Partials 45 44 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we start adding tests for src/module-type/node-gyp.ts
? You'd be adding test/module-type-node-gyp.ts
and testing when --force-process-config
is added to the args.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to actually block on the testing request.
I have updated the code to add tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've refactored the tests so that they should test all of the corner cases (and sped them up). But I have an implementation question which could potentially make this a bit easier to maintain.
🎉 This PR is included in version 3.2.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The Electron version we’re currently using is on Node 13 (?) but this is a step forward to upgrading to a newer Electron and Node version. Updates etcher-sdk and switches the redundant aws4-axios dependency to just axios. Also changed bundler to stop trying to bundle wasm files — they must be included inline with JS code as data — and removed some now redundant code. The crucial changes that enable support are: 1. The update to etcher-sdk@8 where some dependency fixes and updates took place 2. The downgrade and pinning of "electron-rebuild" to v3.2.3 until we’re able to update to Electron >= 14.2. The patch we need to avoid is electron/rebuild#907. Also see: nodejs/node-gyp#2673 and electron/rebuild#913 Change-type: minor
The Electron version we’re currently using is on Node 13 (?) but this is a step forward to upgrading to a newer Electron and Node version. Updates etcher-sdk and switches the redundant aws4-axios dependency to just axios. Also changed bundler to stop trying to bundle wasm files — they must be included inline with JS code as data — and removed some now redundant code. The crucial changes that enable support are: 1. The update to etcher-sdk@8 where some dependency fixes and updates took place 2. The downgrade and pinning of "electron-rebuild" to v3.2.3 until we’re able to update to Electron >= 14.2. The patch we need to avoid is electron/rebuild#907. Also see: nodejs/node-gyp#2673 and electron/rebuild#913 3. A rule in webpack.config to ignore `aws-crt` which is a dependency of (ultimately) `aws4-axios` which is used by etcher-sdk and does a runtime check to its availability. We’re not currently using the “assume role” functionality (AFAIU) of aws4-axios and we don’t care that it’s not found, so force webpack to ignore the import. See aws/aws-sdk-js-v3#3025 Change-type: minor
The Electron version we’re currently using is on Node 13 (?) but this is a step forward to upgrading to a newer Electron and Node version. Updates etcher-sdk and switches the redundant aws4-axios dependency to just axios. Also changed bundler to stop trying to bundle wasm files — they must be included inline with JS code as data — and removed some now redundant code. The crucial changes that enable support are: 1. The update to etcher-sdk@8 where some dependency fixes and updates took place 2. The downgrade and pinning of "electron-rebuild" to v3.2.3 until we’re able to update to Electron >= 14.2. The patch we need to avoid is electron/rebuild#907. Also see: nodejs/node-gyp#2673 and electron/rebuild#913 3. A rule in webpack.config to ignore `aws-crt` which is a dependency of (ultimately) `aws4-axios` which is used by etcher-sdk and does a runtime check to its availability. We’re not currently using the “assume role” functionality (AFAIU) of aws4-axios and we don’t care that it’s not found, so force webpack to ignore the import. See aws/aws-sdk-js-v3#3025 Change-type: minor
The Electron version we’re currently using is on Node 14 but this is a step forward to upgrading to a newer Electron and Node version. Updates etcher-sdk and switches the redundant aws4-axios dependency to just axios. Also changed bundler to stop trying to bundle wasm files — they must be included inline with JS code as data — and removed some now redundant code. The crucial changes that enable support are: 1. The update to etcher-sdk@8 where some dependency fixes and updates took place 2. The downgrade and pinning of "electron-rebuild" to v3.2.3 until we’re able to update to Electron >= 14.2. The patch we need to avoid is electron/rebuild#907. Also see: nodejs/node-gyp#2673 and electron/rebuild#913 3. A rule in webpack.config to ignore `aws-crt` which is a dependency of (ultimately) `aws4-axios` which is used by etcher-sdk and does a runtime check to its availability. We’re not currently using the “assume role” functionality (AFAIU) of aws4-axios and we don’t care that it’s not found, so force webpack to ignore the import. See aws/aws-sdk-js-v3#3025 Change-type: minor
Since node-gyp >= 8.4.0, building modules for old versions of Electron requires passing
--force-process-config
due to them lacking a valid config.gypi in their headers.See also nodejs/node-gyp#2497.