upgrade electron #543

pull/2263/head
Mikael Finstad 2 years ago
parent 2a6f6c5341
commit 99d1c373ab
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

@ -9,7 +9,7 @@ export default defineConfig({
// However, until we use ESM for electron main, we need to include ESM-only deps in the bundle: (exclude from externalize) // However, until we use ESM for electron main, we need to include ESM-only deps in the bundle: (exclude from externalize)
plugins: [externalizeDepsPlugin({ exclude: ['p-map', 'execa', 'nanoid', 'file-type'] })], plugins: [externalizeDepsPlugin({ exclude: ['p-map', 'execa', 'nanoid', 'file-type'] })],
build: { build: {
target: 'node20.14', target: 'node20.18',
sourcemap: true, sourcemap: true,
}, },
}, },
@ -17,14 +17,14 @@ export default defineConfig({
// https://electron-vite.org/guide/dev#dependencies-vs-devdependencies // https://electron-vite.org/guide/dev#dependencies-vs-devdependencies
plugins: [externalizeDepsPlugin({ exclude: [] })], plugins: [externalizeDepsPlugin({ exclude: [] })],
build: { build: {
target: 'node20.14', target: 'node20.18',
sourcemap: true, sourcemap: true,
}, },
}, },
renderer: { renderer: {
plugins: [react()], plugins: [react()],
build: { build: {
target: 'chrome126', target: 'chrome130',
sourcemap: true, sourcemap: true,
chunkSizeWarningLimit: 3e6, chunkSizeWarningLimit: 3e6,
}, },

@ -72,7 +72,7 @@
"csv-parse": "^4.15.3", "csv-parse": "^4.15.3",
"csv-stringify": "^5.6.2", "csv-stringify": "^5.6.2",
"data-uri-to-buffer": "^4.0.0", "data-uri-to-buffer": "^4.0.0",
"electron": "^31.3.1", "electron": "^33.2.1",
"electron-builder": "^24.13.3", "electron-builder": "^24.13.3",
"electron-devtools-installer": "^3.2.0", "electron-devtools-installer": "^3.2.0",
"electron-vite": "^2.3.0", "electron-vite": "^2.3.0",

@ -2281,7 +2281,7 @@ function App() {
ev.preventDefault(); ev.preventDefault();
if (!ev.dataTransfer) return; if (!ev.dataTransfer) return;
const { files } = ev.dataTransfer; const { files } = ev.dataTransfer;
const filePaths = [...files].map((f) => f.path); const filePaths = [...files].map((f) => electron.webUtils.getPathForFile(f));
focusWindow(); focusWindow();

@ -14,6 +14,7 @@ import { InverseCutSegment } from './types';
const { stat } = window.require('fs/promises'); const { stat } = window.require('fs/promises');
const { webUtils } = window.require('electron');
const outFmtStyle = { height: 20, maxWidth: 100 }; const outFmtStyle = { height: 20, maxWidth: 100 };
const exportModeStyle = { flexGrow: 0, flexBasis: 140 }; const exportModeStyle = { flexGrow: 0, flexBasis: 140 };
@ -63,7 +64,7 @@ function TopMenu({
async function onDrop(ev: DragEvent) { async function onDrop(ev: DragEvent) {
ev.preventDefault(); ev.preventDefault();
if (!ev.dataTransfer) return; if (!ev.dataTransfer) return;
const paths = [...ev.dataTransfer.files].map((f) => f.path); const paths = [...ev.dataTransfer.files].map((f) => webUtils.getPathForFile(f));
const [firstPath] = paths; const [firstPath] = paths;
if (paths.length === 1 && firstPath && (await stat(firstPath)).isDirectory()) { if (paths.length === 1 && firstPath && (await stat(firstPath)).isDirectory()) {
setCustomOutDir(firstPath); setCustomOutDir(firstPath);

@ -4534,16 +4534,16 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"electron@npm:^31.3.1": "electron@npm:^33.2.1":
version: 31.3.1 version: 33.2.1
resolution: "electron@npm:31.3.1" resolution: "electron@npm:33.2.1"
dependencies: dependencies:
"@electron/get": "npm:^2.0.0" "@electron/get": "npm:^2.0.0"
"@types/node": "npm:^20.9.0" "@types/node": "npm:^20.9.0"
extract-zip: "npm:^2.0.1" extract-zip: "npm:^2.0.1"
bin: bin:
electron: cli.js electron: cli.js
checksum: 10/bc6e582c2a6ad9a95eeff71a24b2f798b88ce33dae1cae9e02fcb81f058463c502210a8eb0b9a061c82223060159ac69c141386f689ce2f52818f96fefc827c9 checksum: 10/1f7e4e61fe949503a79e08c91fc6a914216868176907b0586c4d47a720f0d16c42cb0594f30efa0608c316e992426befc0b6b214702bf1c4e2bd77115959efec
languageName: node languageName: node
linkType: hard linkType: hard
@ -7633,7 +7633,7 @@ __metadata:
csv-stringify: "npm:^5.6.2" csv-stringify: "npm:^5.6.2"
cue-parser: "npm:^0.3.0" cue-parser: "npm:^0.3.0"
data-uri-to-buffer: "npm:^4.0.0" data-uri-to-buffer: "npm:^4.0.0"
electron: "npm:^31.3.1" electron: "npm:^33.2.1"
electron-builder: "npm:^24.13.3" electron-builder: "npm:^24.13.3"
electron-devtools-installer: "npm:^3.2.0" electron-devtools-installer: "npm:^3.2.0"
electron-store: "npm:5.1.1" electron-store: "npm:5.1.1"

Loading…
Cancel
Save