Skip to content

Commit f0e0157

Browse files
authored
chore: update to Electron 33.3.0 (#1662)
1 parent 4d7f807 commit f0e0157

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"@vercel/webpack-asset-relocator-loader": "^1.7.2",
110110
"copy-webpack-plugin": "^11.0.0",
111111
"css-loader": "^6.7.1",
112-
"electron": "31.1.0",
112+
"electron": "33.3.0",
113113
"enzyme": "^3.11.0",
114114
"enzyme-adapter-react-16": "^1.15.7",
115115
"enzyme-to-json": "^3.6.1",

Diff for: tests/main/protocol-spec.ts

+13-10
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ import {
1616
import { getOrCreateMainWindow, mainIsReady } from '../../src/main/windows';
1717
import { overridePlatform, resetPlatform } from '../utils';
1818

19+
type OpenUrlCallback = (event: object, url: string) => void;
20+
type SecondInstanceCallback = (event: object, argv: string[]) => void;
21+
1922
jest.mock('node:fs');
2023

2124
describe('protocol', () => {
@@ -49,7 +52,7 @@ describe('protocol', () => {
4952

5053
listenForProtocolHandler();
5154

52-
const handler = mocked(app.on).mock.calls[1][1];
55+
const handler: SecondInstanceCallback = mocked(app.on).mock.calls[1][1];
5356

5457
handler({}, ['electron-fiddle://gist/hi']);
5558
expect(ipcMainManager.send).toHaveBeenCalledWith(
@@ -63,7 +66,7 @@ describe('protocol', () => {
6366

6467
listenForProtocolHandler();
6568

66-
const handler = mocked(app.on).mock.calls[0][1];
69+
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];
6770

6871
handler({}, 'electron-fiddle://gist/hi');
6972
expect(ipcMainManager.send).toHaveBeenCalledWith(
@@ -77,7 +80,7 @@ describe('protocol', () => {
7780

7881
listenForProtocolHandler();
7982

80-
const handler = mocked(app.on).mock.calls[0][1];
83+
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];
8184

8285
handler({}, 'electron-fiddle://gist/username/gistID');
8386
expect(ipcMainManager.send).toHaveBeenCalledWith(
@@ -91,7 +94,7 @@ describe('protocol', () => {
9194

9295
listenForProtocolHandler();
9396

94-
const handler = mocked(app.on).mock.calls[0][1];
97+
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];
9598

9699
handler({}, 'electron-fiddle://noop');
97100
handler({}, 'electron-fiddle://gist/noop/noop/null');
@@ -117,7 +120,7 @@ describe('protocol', () => {
117120

118121
listenForProtocolHandler();
119122

120-
const handler = mocked(app.on).mock.calls[0][1];
123+
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];
121124
handler({}, 'electron-fiddle://gist/hi-ready');
122125

123126
expect(ipcMainManager.send).toHaveBeenCalledTimes(0);
@@ -138,7 +141,7 @@ describe('protocol', () => {
138141
// electron-fiddle://electron/{tag}/{path}
139142
listenForProtocolHandler();
140143

141-
const handler = mocked(app.on).mock.calls[0][1];
144+
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];
142145

143146
handler({}, 'electron-fiddle://electron/v4.0.0/test/path');
144147

@@ -156,7 +159,7 @@ describe('protocol', () => {
156159
it('handles a flawed electron path url', () => {
157160
listenForProtocolHandler();
158161

159-
const handler = mocked(app.on).mock.calls[0][1];
162+
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];
160163
handler({}, 'electron-fiddle://electron/v4.0.0');
161164

162165
expect(ipcMainManager.send).toHaveBeenCalledTimes(0);
@@ -165,7 +168,7 @@ describe('protocol', () => {
165168
it('handles a flawed url (unclear instruction)', () => {
166169
listenForProtocolHandler();
167170

168-
const handler = mocked(app.on).mock.calls[0][1];
171+
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];
169172
handler({}, 'electron-fiddle://noop/123');
170173

171174
expect(ipcMainManager.send).toHaveBeenCalledTimes(0);
@@ -174,7 +177,7 @@ describe('protocol', () => {
174177
it('handles a flawed url (no instruction)', () => {
175178
listenForProtocolHandler();
176179

177-
const handler = mocked(app.on).mock.calls[0][1];
180+
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];
178181
handler({}, 'electron-fiddle://');
179182

180183
expect(ipcMainManager.send).toHaveBeenCalledTimes(0);
@@ -185,7 +188,7 @@ describe('protocol', () => {
185188
listenForProtocolHandler();
186189

187190
const mainWindow = await getOrCreateMainWindow();
188-
const handler = mocked(app.on).mock.calls[0][1];
191+
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];
189192

190193
handler({}, 'electron-fiddle://electron/v4.0.0/test/path');
191194

Diff for: yarn.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -1164,9 +1164,9 @@
11641164
vscode-languageserver-textdocument "^1.0.8"
11651165
vscode-uri "^3.0.7"
11661166

1167-
"@electron/node-gyp@git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2":
1167+
"@electron/node-gyp@https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2":
11681168
version "10.2.0-electron.1"
1169-
resolved "git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2"
1169+
resolved "https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2"
11701170
dependencies:
11711171
env-paths "^2.2.0"
11721172
exponential-backoff "^3.1.1"
@@ -5142,10 +5142,10 @@ electron-winstaller@^5.3.0:
51425142
optionalDependencies:
51435143
"@electron/windows-sign" "^1.1.2"
51445144

5145-
electron@31.1.0:
5146-
version "31.1.0"
5147-
resolved "https://registry.yarnpkg.com/electron/-/electron-31.1.0.tgz#2836dbeb8f80c9b278aa4563c8fc3a6e6afbe723"
5148-
integrity sha512-TBOwqLxSxnx6+pH6GMri7R3JPH2AkuGJHfWZS0p1HsmN+Qr1T9b0IRJnnehSd/3NZAmAre4ft9Ljec7zjyKFJA==
5145+
electron@33.3.0:
5146+
version "33.3.0"
5147+
resolved "https://registry.yarnpkg.com/electron/-/electron-33.3.0.tgz#5ae603818820c2a29736ed924d32bf18d31a9f63"
5148+
integrity sha512-316ZlFUHJmzGrhRj87tVStxyYvknDqVR9eYSsGKAHY7auhVWFLIcPPGxcnbD/H1mez8CpDjXvEjcz76zpWxsXw==
51495149
dependencies:
51505150
"@electron/get" "^2.0.0"
51515151
"@types/node" "^20.9.0"

0 commit comments

Comments
 (0)