upgrade electron

This commit is contained in:
Jan Prochazka 2021-12-16 10:08:32 +01:00
parent bef6efdbdb
commit 1fdf942715
5 changed files with 730 additions and 921 deletions

View File

@ -5,10 +5,10 @@
"author": "Jan Prochazka <jenasoft.database@gmail.com>", "author": "Jan Prochazka <jenasoft.database@gmail.com>",
"description": "Opensource database administration tool", "description": "Opensource database administration tool",
"dependencies": { "dependencies": {
"better-sqlite3-with-prebuilds": "^7.1.8", "better-sqlite3-with-prebuilds": "^7.4.3",
"electron-log": "^4.3.1", "electron-log": "^4.4.1",
"electron-store": "^5.1.1", "electron-store": "^8.0.1",
"electron-updater": "^4.3.5", "electron-updater": "^4.6.1",
"patch-package": "^6.4.7" "patch-package": "^6.4.7"
}, },
"repository": { "repository": {
@ -103,8 +103,8 @@
"devDependencies": { "devDependencies": {
"copyfiles": "^2.2.0", "copyfiles": "^2.2.0",
"cross-env": "^6.0.3", "cross-env": "^6.0.3",
"electron": "11.2.3", "electron": "16.0.4",
"electron-builder": "22.10.5" "electron-builder": "22.14.5"
}, },
"optionalDependencies": { "optionalDependencies": {
"msnodesqlv8": "^2.4.0" "msnodesqlv8": "^2.4.0"

View File

@ -14,6 +14,8 @@ const BrowserWindow = electron.BrowserWindow;
const path = require('path'); const path = require('path');
const url = require('url'); const url = require('url');
// require('@electron/remote/main').initialize();
const store = new Store(); const store = new Store();
// Keep a global reference of the window object, if you don't, the window will // Keep a global reference of the window object, if you don't, the window will
@ -49,7 +51,7 @@ function buildMenu() {
commandItem('new.connection'), commandItem('new.connection'),
commandItem('new.sqliteDatabase'), commandItem('new.sqliteDatabase'),
commandItem('new.modelCompare'), commandItem('new.modelCompare'),
commandItem('new.freetable'), commandItem('new.freetable'),
{ type: 'separator' }, { type: 'separator' },
commandItem('file.open'), commandItem('file.open'),
commandItem('file.openArchive'), commandItem('file.openArchive'),
@ -157,10 +159,12 @@ function createWindow() {
...bounds, ...bounds,
icon: os.platform() == 'win32' ? 'icon.ico' : path.resolve(__dirname, '../icon.png'), icon: os.platform() == 'win32' ? 'icon.ico' : path.resolve(__dirname, '../icon.png'),
webPreferences: { webPreferences: {
nodeIntegration: true, // nodeIntegration: true,
enableRemoteModule: true, // contextIsolation: false,
// enableRemoteModule: true,
}, },
}); });
// require('@electron/remote/main').enable(mainWindow.webContents);
if (store.get('winIsMaximized')) { if (store.get('winIsMaximized')) {
mainWindow.maximize(); mainWindow.maximize();
} }

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
"dependencies": { "dependencies": {
"async-lock": "^1.2.4", "async-lock": "^1.2.4",
"axios": "^0.21.1", "axios": "^0.21.1",
"better-sqlite3-with-prebuilds": "^7.1.8", "better-sqlite3-with-prebuilds": "^7.4.3",
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"bufferutil": "^4.0.1", "bufferutil": "^4.0.1",
"byline": "^5.0.0", "byline": "^5.0.0",

View File

@ -2061,10 +2061,10 @@ better-assert@~1.0.0:
dependencies: dependencies:
callsite "1.0.0" callsite "1.0.0"
better-sqlite3-with-prebuilds@^7.1.8: better-sqlite3-with-prebuilds@^7.4.3:
version "7.1.8" version "7.4.3"
resolved "https://registry.yarnpkg.com/better-sqlite3-with-prebuilds/-/better-sqlite3-with-prebuilds-7.1.8.tgz#3090c478fe9b60e74ce053a76807b189784f62d7" resolved "https://registry.yarnpkg.com/better-sqlite3-with-prebuilds/-/better-sqlite3-with-prebuilds-7.4.3.tgz#2ed9c5649a8eb1cf2bece7d3f4849b184ddde038"
integrity sha512-trwg1qhN91cPYEB8D2K0KVHIsMsiAnxKx6/syfQ7rLrtD+zOS3fqJq4VGszMF+OuYAZJNAR4oLsikys3YW/6aA== integrity sha512-E1MWyMz5RFZCdRNzIcR245dRVR3u1qZO2uV+8Z9Vb/PJsQ6uxOuOnSfA+rZdkuvDbVTbdpowKNL1tuO6FJyt0A==
dependencies: dependencies:
"@types/integer" latest "@types/integer" latest
bindings "^1.5.0" bindings "^1.5.0"