Skip to content

Commit 6089c69

Browse files
author
Benjamin Pasero
committed
update to electron@3.1.2
1 parent 5ac435e commit 6089c69

5 files changed

Lines changed: 60 additions & 15 deletions

File tree

.yarnrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
disturl "https://atom.io/download/electron"
2-
target "3.1.0"
2+
target "3.1.2"
33
runtime "electron"

cgmanifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"git": {
4949
"name": "libchromiumcontent",
5050
"repositoryUrl": "https://github.com/electron/libchromiumcontent",
51-
"commitHash": "29e02cd4c37777734f97d00b5a538d7c7acfa67a"
51+
"commitHash": "7ea271f92018b1eeb8e70ec6de8c29f9758a0c05"
5252
}
5353
},
5454
"isOnlyProductionDependency": true,
@@ -73,12 +73,12 @@
7373
"git": {
7474
"name": "electron",
7575
"repositoryUrl": "https://github.com/electron/electron",
76-
"commitHash": "4913fc81d1dab21f4b15c4cb682a218072447fed"
76+
"commitHash": "bb28fa8e8e797db249a66405146ad0501eaf411a"
7777
}
7878
},
7979
"isOnlyProductionDependency": true,
8080
"license": "MIT",
81-
"version": "3.1.0"
81+
"version": "3.1.2"
8282
},
8383
{
8484
"component": {

src/typings/electron.d.ts

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for Electron 3.1.0
1+
// Type definitions for Electron 3.1.2
22
// Project: http://electronjs.org/
33
// Definitions by: The Electron Team <https://github.com/electron/electron>
44
// Definitions: https://github.com/electron/electron-typescript-definitions
@@ -2794,7 +2794,9 @@ declare namespace Electron {
27942794
* registered shortcut is pressed by the user. When the accelerator is already
27952795
* taken by other applications, this call will silently fail. This behavior is
27962796
* intended by operating systems, since they don't want applications to fight for
2797-
* global shortcuts.
2797+
* global shortcuts. The following accelerators will not be registered successfully
2798+
* on macOS 10.14 Mojave unless the app has been authorized as a trusted
2799+
* accessibility client:
27982800
*/
27992801
register(accelerator: Accelerator, callback: Function): void;
28002802
/**
@@ -6307,14 +6309,14 @@ declare namespace Electron {
63076309
* connection is made to the server, but before any http data is sent. The callback
63086310
* has to be called with an response object.
63096311
*/
6310-
onBeforeSendHeaders(filter: OnBeforeSendHeadersFilter, listener: Function): void;
6312+
onBeforeSendHeaders(filter: OnBeforeSendHeadersFilter, listener: (details: OnBeforeSendHeadersDetails, callback: (response: OnBeforeSendHeadersResponse) => void) => void): void;
63116313
/**
63126314
* The listener will be called with listener(details, callback) before sending an
63136315
* HTTP request, once the request headers are available. This may occur after a TCP
63146316
* connection is made to the server, but before any http data is sent. The callback
63156317
* has to be called with an response object.
63166318
*/
6317-
onBeforeSendHeaders(listener: Function): void;
6319+
onBeforeSendHeaders(listener: (details: OnBeforeSendHeadersDetails, callback: (response: OnBeforeSendHeadersResponse) => void) => void): void;
63186320
/**
63196321
* The listener will be called with listener(details) when a request is completed.
63206322
*/
@@ -6336,13 +6338,13 @@ declare namespace Electron {
63366338
* headers of a request have been received. The callback has to be called with an
63376339
* response object.
63386340
*/
6339-
onHeadersReceived(filter: OnHeadersReceivedFilter, listener: Function): void;
6341+
onHeadersReceived(filter: OnHeadersReceivedFilter, listener: (details: OnHeadersReceivedDetails, callback: (response: OnHeadersReceivedResponse) => void) => void): void;
63406342
/**
63416343
* The listener will be called with listener(details, callback) when HTTP response
63426344
* headers of a request have been received. The callback has to be called with an
63436345
* response object.
63446346
*/
6345-
onHeadersReceived(listener: Function): void;
6347+
onHeadersReceived(listener: (details: OnHeadersReceivedDetails, callback: (response: OnHeadersReceivedResponse) => void) => void): void;
63466348
/**
63476349
* The listener will be called with listener(details) when first byte of the
63486350
* response body is received. For HTTP requests, this means that the status line
@@ -8054,6 +8056,16 @@ declare namespace Electron {
80548056
urls: string[];
80558057
}
80568058

8059+
interface OnBeforeSendHeadersDetails {
8060+
id: number;
8061+
url: string;
8062+
method: string;
8063+
webContentsId?: number;
8064+
resourceType: string;
8065+
timestamp: number;
8066+
requestHeaders: RequestHeaders;
8067+
}
8068+
80578069
interface OnBeforeSendHeadersFilter {
80588070
/**
80598071
* Array of URL patterns that will be used to filter out the requests that do not
@@ -8062,6 +8074,14 @@ declare namespace Electron {
80628074
urls: string[];
80638075
}
80648076

8077+
interface OnBeforeSendHeadersResponse {
8078+
cancel?: boolean;
8079+
/**
8080+
* When provided, request will be made with these headers.
8081+
*/
8082+
requestHeaders?: RequestHeaders;
8083+
}
8084+
80658085
interface OnCompletedDetails {
80668086
id: number;
80678087
url: string;
@@ -8105,6 +8125,18 @@ declare namespace Electron {
81058125
urls: string[];
81068126
}
81078127

8128+
interface OnHeadersReceivedDetails {
8129+
id: number;
8130+
url: string;
8131+
method: string;
8132+
webContentsId?: number;
8133+
resourceType: string;
8134+
timestamp: number;
8135+
statusLine: string;
8136+
statusCode: number;
8137+
responseHeaders: ResponseHeaders;
8138+
}
8139+
81088140
interface OnHeadersReceivedFilter {
81098141
/**
81108142
* Array of URL patterns that will be used to filter out the requests that do not
@@ -8113,6 +8145,19 @@ declare namespace Electron {
81138145
urls: string[];
81148146
}
81158147

8148+
interface OnHeadersReceivedResponse {
8149+
cancel: boolean;
8150+
/**
8151+
* When provided, the server is assumed to have responded with these headers.
8152+
*/
8153+
responseHeaders?: ResponseHeaders;
8154+
/**
8155+
* Should be provided when overriding responseHeaders to change header status
8156+
* otherwise original response header's status will be used.
8157+
*/
8158+
statusLine?: string;
8159+
}
8160+
81168161
interface OnResponseStartedDetails {
81178162
id: number;
81188163
url: string;

test/smoke/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@types/webdriverio": "4.6.1",
2323
"concurrently": "^3.5.1",
2424
"cpx": "^1.5.0",
25-
"electron": "3.1.0",
25+
"electron": "3.1.2",
2626
"htmlparser2": "^3.9.2",
2727
"mkdirp": "^0.5.1",
2828
"mocha": "^5.2.0",

test/smoke/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -596,10 +596,10 @@ electron-download@^4.1.0:
596596
semver "^5.4.1"
597597
sumchecker "^2.0.2"
598598

599-
electron@3.1.0:
600-
version "3.1.0"
601-
resolved "https://registry.yarnpkg.com/electron/-/electron-3.1.0.tgz#5e36ba4c24926c7cf80eccf6f8361b3cad409f17"
602-
integrity sha512-FnHH3T7aQGAjw5h8//9BNLZBByP/gnEGP3sQH5if7HVe6Znz5KcsRbIdxLYVH9DXJFoJ2SArP+UiAAYQIdVQJQ==
599+
electron@3.1.2:
600+
version "3.1.2"
601+
resolved "https://registry.yarnpkg.com/electron/-/electron-3.1.2.tgz#e410b976c56fc2f783c3b0fb6d757e02eaeab902"
602+
integrity sha512-B/mXRCN8jGBBx8dvtIgLyW+nE8i9y7K9G6wijU+cLoneqF5al9BgZA1l5xgZEiUrwTtt0cgXIWNwhStt7EDoQQ==
603603
dependencies:
604604
"@types/node" "^8.0.24"
605605
electron-download "^4.1.0"

0 commit comments

Comments
 (0)