This was primarily for getting the latest Electron, but I ran `yarn
upgrade-interactive` and upgraded the other non-breaking deps (mostly dev) too.
Reason for wanting electron is to try and see if this backport fixes the issue
with our streams not getting faithfully written:
https://github.com/electron/electron/pull/41052
In some ad-hoc and quick testing, I noticed that the new `writeStream` we've
implemented works fine for files up to 128 K, presumably some chunk size, but
then begins to diverge. Sounds similar (but not exactly the same) as this issue:
https://github.com/electron/electron/issues/39658
Unfortunately, this didn't fix the issue we're facing, so our case is perhaps
different.
It reloads the BrowserWindow, but that already has HMR since we're connecting to
a Next dev server on localhost.
What we want is the main process to reload if the files for the main process are
changed. All options I've found so far just restart the main app on changes to
the main process code. I'm not sure that'll be useful, so not adding them right
now (and in any case, this is not a regression, it just wasn't working with
electron-reload either). For future reference if I need to revisit this, these
are the things I scouted:
- https://www.electronforge.io/config/plugins/webpack
- https://github.com/sindresorhus/electron-reloader
- https://electron-vite.org/guide/hot-reloading.html
Electron also comes with its own type definitions, and from a (possibly dated)
blog post announcing this I got that we should not be overriding it with
@types/node: https://www.electronjs.org/pt/blog/typescript