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

Add support for Node 18 #3987

Merged
merged 1 commit into from
Jan 27, 2023
Merged

Add support for Node 18 #3987

merged 1 commit into from
Jan 27, 2023

Conversation

dfunckt
Copy link
Member

@dfunckt dfunckt commented Jan 23, 2023

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 fix: require node-gyp@^8.4.0 & handle old Electron versions electron/rebuild#907. Also see: npm ERR! gyp: name 'openssl_fips' is not defined nodejs/node-gyp#2673 and 'openssl_fips' is not defined while evaluating condition 'openssl_fips != ""' 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 Module not found: Error: Can't resolve 'aws-crt' aws/aws-sdk-js-v3#3025

Change-type: minor

@dfunckt dfunckt force-pushed the support-node-18 branch 3 times, most recently from e798ad3 to 9f0b00c Compare January 27, 2023 10:08
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
@dfunckt dfunckt marked this pull request as ready for review January 27, 2023 10:26
@dfunckt
Copy link
Member Author

dfunckt commented Jan 27, 2023

I self-certify!

@dfunckt dfunckt merged commit 8a0711e into master Jan 27, 2023
@dfunckt dfunckt deleted the support-node-18 branch January 27, 2023 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant