electron-to-chromium icon indicating copy to clipboard operation
electron-to-chromium copied to clipboard

Add node versions?

Open chicoxyzzy opened this issue 6 years ago • 7 comments

It could be useful to have electron-to-nodejs versions also

chicoxyzzy avatar Aug 13 '18 16:08 chicoxyzzy

It wouldn't be hard to make this with the existing code, but do you have any specific use-case in mind?

Kilian avatar Aug 14 '18 07:08 Kilian

That data could be used for specific native modules builds for Electron (some V8 bindings could be deprecated or could break in minor versions of Node/Electron, for example Utf8Value)

chicoxyzzy avatar Aug 14 '18 09:08 chicoxyzzy

https://github.com/electron/electron-rebuild already does that though?

Kilian avatar Aug 14 '18 09:08 Kilian

Not exactly that but kind of, yes. This just one of potential use-cases

chicoxyzzy avatar Aug 14 '18 10:08 chicoxyzzy

Not exactly that but kind of, yes.

Hm, actually no. What I'm talking about is V8 API changes, electron-rebuild is project for electron apps but not for native modules. Native modules could be prebuilt to have binaries for different Electron versions. Use cases are different

chicoxyzzy avatar Aug 14 '18 10:08 chicoxyzzy

That data could be used for specific native modules builds for Electron (some V8 bindings could be deprecated or could break in minor versions of Node/Electron, for example Utf8Value)

Hi, I'm the original author of electron-rebuild. While this initially seems like it'd be useful to avoid rebuilds, Electron is different enough in subtle dumb ways from node.js that binaries built against system node.js often don't work in Electron, even if NODE_MODULE_VERSION is identical :-/ So, until someone is actually gonna use this mapping in software, I'd just hold off on it, it's not as useful as one would think.

anaisbetts avatar Aug 16 '18 16:08 anaisbetts

This feature is obviously useful. Even if it is not related to electron-rebuild.

Because this package is used in Browserslist, and people use webpack/rollup/parcel/babel/autoprefixer/whatever.

See https://webpack.js.org/configuration/target#string, It provides electron-main and electron-renderer as output.target.

Airkro avatar Apr 23 '19 02:04 Airkro