From 9b596453022a819dfa2bf30aa93ef27f6a3d17ca Mon Sep 17 00:00:00 2001 From: SimonLaux Date: Mon, 9 Sep 2024 02:42:57 +0200 Subject: [PATCH] Update electron from `30.3.1` to `32.0.2` closes #4111 --- CHANGELOG.md | 1 + packages/target-electron/package.json | 2 +- packages/target-electron/src/deltachat/webxdc.ts | 8 ++++++-- pnpm-lock.yaml | 10 +++++----- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51ee97d970..a3b15f0403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added ### Changed +- Update electron from `30.3.1` to `32.0.2` - dev: transformed repo into monorepo - dev: switched from `npm` to `pnpm` - dev: esbuild bundling for electron main process js (+minification for releases) diff --git a/packages/target-electron/package.json b/packages/target-electron/package.json index 363f54eb6b..61c123f7d6 100644 --- a/packages/target-electron/package.json +++ b/packages/target-electron/package.json @@ -75,7 +75,7 @@ "chai": "^5.1.1", "chokidar": "^3.6.0", "debounce": "^1.2.0", - "electron": "^30.3.1", + "electron": "^32.0.2", "electron-builder": "^24.13.3", "esbuild": "^0.19.8", "mocha": "^10.7.0", diff --git a/packages/target-electron/src/deltachat/webxdc.ts b/packages/target-electron/src/deltachat/webxdc.ts index c3f1620a3c..465e69f77a 100644 --- a/packages/target-electron/src/deltachat/webxdc.ts +++ b/packages/target-electron/src/deltachat/webxdc.ts @@ -651,6 +651,7 @@ If you think that's a bug and you need that permission, then please open an issu const s = sessionFromAccountId(accountId) const appURL = `webxdc://${webxdcId}.webxdc` s.clearStorageData({ origin: appURL }) + s.clearData({ origins: [appURL] }) s.clearCodeCaches({ urls: [appURL] }) s.clearCache() } @@ -784,8 +785,10 @@ function removeLastBounds( ) } -ipcMain.handle('webxdc.clearWebxdcDOMStorage', (_, accountId: number) => { - sessionFromAccountId(accountId).clearStorageData() +ipcMain.handle('webxdc.clearWebxdcDOMStorage', async (_, accountId: number) => { + const session = sessionFromAccountId(accountId) + await session.clearStorageData() + await session.clearData() }) ipcMain.handle('webxdc.getWebxdcDiskUsage', async (_, accountId: number) => { @@ -879,6 +882,7 @@ ipcMain.handle('delete_webxdc_account_data', async (_ev, accountId: number) => { cache: false, }) await s.clearStorageData() + await s.clearData() // mark the folder for deletion on next startup if (s.storagePath) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 495105c20b..7c6c9653e8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -332,8 +332,8 @@ importers: specifier: ^1.2.0 version: 1.2.1 electron: - specifier: ^30.3.1 - version: 30.3.1 + specifier: ^32.0.2 + version: 32.0.2 electron-builder: specifier: ^24.13.3 version: 24.13.3(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3)) @@ -1687,8 +1687,8 @@ packages: electron-publish@24.13.1: resolution: {integrity: sha512-2ZgdEqJ8e9D17Hwp5LEq5mLQPjqU3lv/IALvgp+4W8VeNhryfGhYEQC/PgDPMrnWUp+l60Ou5SJLsu+k4mhQ8A==} - electron@30.3.1: - resolution: {integrity: sha512-Ai/OZ7VlbFAVYMn9J5lyvtr+ZWyEbXDVd5wBLb5EVrp4352SRmMAmN5chcIe3n9mjzcgehV9n4Hwy15CJW+YbA==} + electron@32.0.2: + resolution: {integrity: sha512-nmZblq8wW3HZ17MAyaUuiMI9Mb0Cgc7UR3To85h/rVopbfyF5s34NxtK4gvyRfYPxpDGP4k+HoQIPniPPrdE3w==} engines: {node: '>= 12.20.55'} hasBin: true @@ -4505,7 +4505,7 @@ snapshots: transitivePeerDependencies: - supports-color - electron@30.3.1: + electron@32.0.2: dependencies: '@electron/get': 2.0.2 '@types/node': 20.14.15