Skip to content

Commit

Permalink
Merge pull request #15831 from desktop/electron-22-0-0
Browse files Browse the repository at this point in the history
Bump Electron to v22.0.3
  • Loading branch information
tidy-dev committed Jan 25, 2023
2 parents 924ab82 + 7f903a3 commit 88b8bcd
Show file tree
Hide file tree
Showing 10 changed files with 188 additions and 81 deletions.
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 = {}

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 @@ -156,7 +156,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

0 comments on commit 88b8bcd

Please sign in to comment.