You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the release following the roadmap #43, I think it's essential to upgrade Electron, ideally to the latest version, v41.
The main problem is that Electron deprecated the 'remote' module starting from version v14.
And... the remote module is used extensively in the preload script (static/main-preload.js).
It's used for:
electron.remote.dialog — open/save file dialogs (lines 64-67)
electron.remote.BrowserWindow — creating new windows and PDF rendering (lines 147, 207)
electron.remote.Menu — context menus (line 151)
electron.remote.app — paths, badge count, protocol client (lines 70, 157, 185-193, 246)
electron.remote.session — cookies (lines 234-242)
electron.remote.webContents — get web contents by ID (line 196)
electron.remote.getCurrentWindow() — traffic light position on macOS (line 200)
On the other hand, Electron has the module @electron/remote, which allows the use of electron.remote in newer versions.
So, there are two options for the next release:
Add @electron/remote in package.json and replace electron.remote with require('@electron/remote') in the preload.
Migrate each function to IPC handlers in the main process.
I am thinking that if you have work done in the branches I can see in the repository, migrating could cause problems, requiring rewrites and dealing with conflicts. So maybe it's better to merge all the new features and fixes written beforehand, release the new version, and modernize the code afterward.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
For the release following the roadmap #43, I think it's essential to upgrade Electron, ideally to the latest version, v41.
The main problem is that Electron deprecated the 'remote' module starting from version v14.
And... the remote module is used extensively in the preload script (static/main-preload.js).
It's used for:
On the other hand, Electron has the module @electron/remote, which allows the use of electron.remote in newer versions.
So, there are two options for the next release:
Add @electron/remote in package.json and replace electron.remote with require('@electron/remote') in the preload.
Migrate each function to IPC handlers in the main process.
I am thinking that if you have work done in the branches I can see in the repository, migrating could cause problems, requiring rewrites and dealing with conflicts. So maybe it's better to merge all the new features and fixes written beforehand, release the new version, and modernize the code afterward.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions