Allow GCS to use latest version of electron #106
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why is the change being made?
This change is made because GCS was running on electron v3, a version
made back two years ago. This version is long deprecated and GCS needed
to upgrade to v8 sooner or later. However, electron v5 would not build
at all (we dont consider v4 as it does not support geolocation).
What has changed to address the problem?
This change finds the issue to be the fact electron v5+ turns off the
nodeIntegration
field for windows (used to be on by default). This wasbreaking our application.
This change sets
nodeIntegration
to true for all windows created, andupdates electron to v8. Other related fields that were modified from v3
to v8 are updated in this change.
Other minor changes are the following:
electron-rebuild
and settingpreinstall
scriptto
electron-builder install-app-deps
inpackage.json
build
field inpackage.json
aselectron-rebuild
is nolonger a dependency
@types/node
v12 as default version v13 breaks tests withelectron v8 (see electron.d.ts does not work with @types/node v13.1.0 electron/electron#21612)
How was this change tested?
This change was tested with
npm test
, running the application andseeing if it was fine, and running the application from
npm run build
and seeing if it was fine (checking console, build status, and if
serialport runs).
Related documents, URLs, commits
https://github.com/electron/electron/releases/tag/v5.0.0