Electron 22.3.3 (#7389)

* electron 22.3.3.

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix typo

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix crash on quit

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix sessionData app path

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* Fix errors after merging new feature

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Jari KolehmainenandSebastian Malton authored and GitHub committed 2023-03-21 11:07:27 -04:00
1 parent 0f1f030a06
commit a920f2c057
11 files changed
+89 -308

No files matched your search

@@ -11,7 +11,7 @@ export const pathNames: PathName[] = [
"home",
"appData",
"userData",
"cache",
"sessionData",
"temp",
"exe",
"module",
@@ -21,7 +21,6 @@ describe("app-paths", () => {
const defaultAppPathsStub: AppPaths = {
currentApp: "/some-current-app",
appData: "/some-app-data",
cache: "/some-cache",
crashDumps: "/some-crash-dumps",
desktop: "/some-desktop",
documents: "/some-documents",
@@ -36,6 +35,7 @@ describe("app-paths", () => {
temp: "/some-temp",
videos: "/some-videos",
userData: "/some-irrelevant-user-data",
sessionData: "/some-irrelevant-user-data", // By default this points to userData
};
builder.beforeApplicationStart(({ mainDi }) => {
@@ -73,7 +73,6 @@ describe("app-paths", () => {
expect(actual).toEqual({
currentApp: "/some-current-app",
appData: "/some-app-data",
cache: "/some-cache",
crashDumps: "/some-crash-dumps",
desktop: "/some-desktop",
documents: "/some-documents",
@@ -88,6 +87,7 @@ describe("app-paths", () => {
temp: "/some-temp",
videos: "/some-videos",
userData: "/some-app-data/some-product-name",
sessionData: "/some-app-data/some-product-name",
});
});
@@ -97,7 +97,6 @@ describe("app-paths", () => {
expect(actual).toEqual({
currentApp: "/some-current-app",
appData: "/some-app-data",
cache: "/some-cache",
crashDumps: "/some-crash-dumps",
desktop: "/some-desktop",
documents: "/some-documents",
@@ -112,6 +111,7 @@ describe("app-paths", () => {
temp: "/some-temp",
videos: "/some-videos",
userData: "/some-app-data/some-product-name",
sessionData: "/some-app-data/some-product-name",
});
});
});
@@ -13,7 +13,7 @@ import userStoreInjectable from "../user-store/user-store.injectable";
export type InitializeSentryReportingWith = (initSentry: (opts: BrowserOptions | ElectronMainOptions) => void) => void;
const mapProcessName = (type: "browser" | "renderer" | "worker") => type === "browser" ? "main" : type;
const mapProcessName = (type: "browser" | "renderer" | "worker" | "utility") => type === "browser" ? "main" : type;
const initializeSentryReportingWithInjectable = getInjectable({
id: "initialize-sentry-reporting-with",
@@ -34,6 +34,7 @@ const setupAppPathsInjectable = getInjectable({
const appDataPath = getElectronAppPath("appData");
setElectronAppPath("userData", joinPaths(appDataPath, appName));
setElectronAppPath("sessionData", getElectronAppPath("userData"));
const appPaths = pipeline(
pathNames,
@@ -8,7 +8,11 @@ import { BrowserWindow } from "electron";
const resolveSystemProxyWindowInjectable = getInjectable({
id: "resolve-system-proxy-window",
instantiate: () => {
return new BrowserWindow({ show: false, paintWhenInitiallyHidden: false });
const window = new BrowserWindow({ show: false });
window.hide();
return window;
},
causesSideEffects: true,
});