Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update to Electron 33.3.0 #1662

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"@vercel/webpack-asset-relocator-loader": "^1.7.2",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.7.1",
"electron": "31.1.0",
"electron": "33.3.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.7",
"enzyme-to-json": "^3.6.1",
Expand Down
23 changes: 13 additions & 10 deletions tests/main/protocol-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import {
import { getOrCreateMainWindow, mainIsReady } from '../../src/main/windows';
import { overridePlatform, resetPlatform } from '../utils';

type OpenUrlCallback = (event: object, url: string) => void;
type SecondInstanceCallback = (event: object, argv: string[]) => void;

jest.mock('node:fs');

describe('protocol', () => {
Expand Down Expand Up @@ -49,7 +52,7 @@ describe('protocol', () => {

listenForProtocolHandler();

const handler = mocked(app.on).mock.calls[1][1];
const handler: SecondInstanceCallback = mocked(app.on).mock.calls[1][1];

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

listenForProtocolHandler();

const handler = mocked(app.on).mock.calls[0][1];
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];

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

listenForProtocolHandler();

const handler = mocked(app.on).mock.calls[0][1];
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];

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

listenForProtocolHandler();

const handler = mocked(app.on).mock.calls[0][1];
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];

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

listenForProtocolHandler();

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

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

const handler = mocked(app.on).mock.calls[0][1];
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];

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

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

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

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

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

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

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

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

const mainWindow = await getOrCreateMainWindow();
const handler = mocked(app.on).mock.calls[0][1];
const handler: OpenUrlCallback = mocked(app.on).mock.calls[0][1];

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

Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1164,9 +1164,9 @@
vscode-languageserver-textdocument "^1.0.8"
vscode-uri "^3.0.7"

"@electron/node-gyp@git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2":
"@electron/node-gyp@https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2":
version "10.2.0-electron.1"
resolved "git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2"
resolved "https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2"
dependencies:
env-paths "^2.2.0"
exponential-backoff "^3.1.1"
Expand Down Expand Up @@ -5142,10 +5142,10 @@ electron-winstaller@^5.3.0:
optionalDependencies:
"@electron/windows-sign" "^1.1.2"

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