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

Bump Electron to v22.0.3 #15831

Merged
merged 11 commits into from
Jan 25, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [16.13.0]
node: [16.17.1]
os: [macos-11, windows-2019]
arch: [x64, arm64]
include:
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.0
16.17.1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.13.0
v16.17.1
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
python 3.9.5
nodejs 16.13.0
nodejs 16.17.1
2 changes: 1 addition & 1 deletion app/.npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
runtime = electron
disturl = https://electronjs.org/headers
target = 19.0.0
target = 22.0.0
6 changes: 3 additions & 3 deletions app/src/main-process/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -689,11 +689,11 @@ app.on('activate', () => {
})

app.on('web-contents-created', (event, contents) => {
contents.on('new-window', (event, url) => {
// Prevent links or window.open from opening new windows
event.preventDefault()
contents.setWindowOpenHandler(({ url }) => {
log.warn(`Prevented new window to: ${url}`)
return { action: 'deny' }
})

// prevent link navigation within our windows
// see https://www.electronjs.org/docs/tutorial/security#12-disable-or-limit-navigation
contents.on('will-navigate', (event, url) => {
Expand Down
6 changes: 3 additions & 3 deletions app/src/main-process/ordered-webrequest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
WebRequest,
OnBeforeRequestListenerDetails,
Response,
CallbackResponse,
OnBeforeSendHeadersListenerDetails,
BeforeSendResponse,
OnCompletedListenerDetails,
Expand Down Expand Up @@ -112,7 +112,7 @@ export class OrderedWebRequest {

public readonly onBeforeRequest: AsyncListenerSet<
OnBeforeRequestListenerDetails,
Response
CallbackResponse
>

public readonly onBeforeSendHeaders: AsyncListenerSet<
Expand Down Expand Up @@ -140,7 +140,7 @@ export class OrderedWebRequest {
this.onBeforeRequest = new AsyncListenerSet(
webRequest.onBeforeRequest.bind(webRequest),
async (listeners, details) => {
let response: Response = {}
let response: CallbackResponse = {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same update to api as explained in #15828


for (const listener of listeners) {
response = await listener(details)
Expand Down
2 changes: 1 addition & 1 deletion app/src/ui/lib/app-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export type PathType =
| 'home'
| 'appData'
| 'userData'
| 'cache'
| 'temp'
| 'exe'
| 'module'
Expand All @@ -21,6 +20,7 @@ export type PathType =
| 'recent'
| 'logs'
| 'crashDumps'
| 'sessionData'

/**
* Get the version of the app.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"@types/webpack-hot-middleware": "^2.25.6",
"@types/webpack-merge": "^5.0.0",
"@types/xml2js": "^0.4.0",
"electron": "19.0.0",
"electron": "22.0.3",
"electron-builder": "^22.7.0",
"electron-packager": "^15.1.0",
"electron-winstaller": "^5.0.0",
Expand Down