Summary: Keytar binaries weren't updated when upgrading the electron version. This diff updates the binaries to match electron's node version.
Reviewed By: passy
Differential Revision: D15821734
fbshipit-source-id: 04688f1e465d2f7bdefecfdda8e2f3868de18780
Summary:
`process.platform` is used to require the native-module for keytar. On Windows this returns `win32` (No matter if 64bit or 32bit system). The native module was named `keytar-win.node`. This diff renames it to `keytar-win32.node`.
This is the code that requires the module from `user.js`:
```
keytar = global.electronRequire(
path.join(
isProduction() ? remote.app.getAppPath() : process.cwd(),
'native-modules',
`keytar-${process.platform}.node`,
),
);
```
Reviewed By: priteshrnandgaonkar
Differential Revision: D14771646
fbshipit-source-id: cd48d25cb5921e07e472eb46636fa2599c8ff721
Summary:
`keytar` is developped by the Nuclide team and allows cross-platform access to the system's keychain. As `keytar` has a native dependency, we need to make sure Metro doesn't try to bundle it as part of our JS bundle. We are adding another rule to our electron-transform, to not bundle `.node` files (which are native node modules).
Secondly, we need to make sure, the native module is compiled for the correct version of node.js. Usually native modules are compiled for the node version that is running on the system it is installed on. However, we need to make sure it is compiled with the node version that is bundled with electron. That's exactly what `electron-rebuild` does: It recompiles all native modules with the electron's node version.
More on native modules: https://electronjs.org/docs/tutorial/using-native-node-modules
Reviewed By: jknoxville
Differential Revision: D14224402
fbshipit-source-id: 6414a53391a861a23a5d95bf6f18cd0058d9178f