From 6b9d5db14528f2cb60984e38e1b9b0a06d2fe9b4 Mon Sep 17 00:00:00 2001 From: Karl Burtram Date: Wed, 16 Nov 2022 13:52:02 -0800 Subject: [PATCH] Update Electron to 19.1.3 (#21244) * chore: bump electron@18.0.0-beta.4 * Merge commit * chore: update electron@19.0.17 (#161027) * chore: update electron@19.0.17 * chore: update API typings * fix: compilation errors * build: add libcups dependency * chore: update electron@19.1.3 (#164864) * Update yarn Co-authored-by: deepak1556 --- .yarnrc | 2 +- build/builtin/main.js | 3 +-- build/linux/rpm/dep-lists.js | 3 +++ build/linux/rpm/dep-lists.ts | 3 +++ cgmanifest.json | 12 +++++----- package.json | 2 +- remote/.yarnrc | 2 +- src/bootstrap-fork.js | 22 +++++++++++++++++++ .../issue/electron-main/issueMainService.ts | 1 - .../electron-main/sharedProcess.ts | 1 - .../platform/windows/electron-main/window.ts | 1 - test/unit/electron/index.js | 3 +-- yarn.lock | 22 +++++++++---------- 13 files changed, 50 insertions(+), 27 deletions(-) diff --git a/.yarnrc b/.yarnrc index 44f873b46f..4b4515bb7f 100644 --- a/.yarnrc +++ b/.yarnrc @@ -1,4 +1,4 @@ disturl "https://electronjs.org/headers" -target "17.4.11" +target "19.1.3" runtime "electron" build_from_source "true" diff --git a/build/builtin/main.js b/build/builtin/main.js index 8eb28ca292..b0741c39e3 100644 --- a/build/builtin/main.js +++ b/build/builtin/main.js @@ -30,8 +30,7 @@ app.once('ready', () => { webPreferences: { nodeIntegration: true, contextIsolation: false, - enableWebSQL: false, - nativeWindowOpen: true + enableWebSQL: false } }); window.setMenuBarVisibility(false); diff --git a/build/linux/rpm/dep-lists.js b/build/linux/rpm/dep-lists.js index 29b6190a2f..bc77d0936d 100644 --- a/build/linux/rpm/dep-lists.js +++ b/build/linux/rpm/dep-lists.js @@ -65,6 +65,7 @@ exports.referenceGeneratedDepsByArch = { 'libc.so.6(GLIBC_2.8)(64bit)', 'libc.so.6(GLIBC_2.9)(64bit)', 'libcairo.so.2()(64bit)', + 'libcups.so.2()(64bit)', 'libcurl.so.4()(64bit)', 'libdbus-1.so.3()(64bit)', 'libdl.so.2()(64bit)', @@ -147,6 +148,7 @@ exports.referenceGeneratedDepsByArch = { 'libc.so.6(GLIBC_2.8)', 'libc.so.6(GLIBC_2.9)', 'libcairo.so.2', + 'libcups.so.2', 'libcurl.so.4()(64bit)', 'libdbus-1.so.3', 'libdl.so.2', @@ -237,6 +239,7 @@ exports.referenceGeneratedDepsByArch = { 'libc.so.6()(64bit)', 'libc.so.6(GLIBC_2.17)(64bit)', 'libcairo.so.2()(64bit)', + 'libcups.so.2()(64bit)', 'libcurl.so.4()(64bit)', 'libdbus-1.so.3()(64bit)', 'libdbus-1.so.3(LIBDBUS_1_3)(64bit)', diff --git a/build/linux/rpm/dep-lists.ts b/build/linux/rpm/dep-lists.ts index bd5091a160..07747a2723 100644 --- a/build/linux/rpm/dep-lists.ts +++ b/build/linux/rpm/dep-lists.ts @@ -65,6 +65,7 @@ export const referenceGeneratedDepsByArch = { 'libc.so.6(GLIBC_2.8)(64bit)', 'libc.so.6(GLIBC_2.9)(64bit)', 'libcairo.so.2()(64bit)', + 'libcups.so.2()(64bit)', 'libcurl.so.4()(64bit)', 'libdbus-1.so.3()(64bit)', 'libdl.so.2()(64bit)', @@ -147,6 +148,7 @@ export const referenceGeneratedDepsByArch = { 'libc.so.6(GLIBC_2.8)', 'libc.so.6(GLIBC_2.9)', 'libcairo.so.2', + 'libcups.so.2', 'libcurl.so.4()(64bit)', 'libdbus-1.so.3', 'libdl.so.2', @@ -237,6 +239,7 @@ export const referenceGeneratedDepsByArch = { 'libc.so.6()(64bit)', 'libc.so.6(GLIBC_2.17)(64bit)', 'libcairo.so.2()(64bit)', + 'libcups.so.2()(64bit)', 'libcurl.so.4()(64bit)', 'libdbus-1.so.3()(64bit)', 'libdbus-1.so.3(LIBDBUS_1_3)(64bit)', diff --git a/cgmanifest.json b/cgmanifest.json index 6fff09e07e..e9a69bab44 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -6,7 +6,7 @@ "git": { "name": "chromium", "repositoryUrl": "https://chromium.googlesource.com/chromium/src", - "commitHash": "e2aa76f05f3a6ccadbf43e37f5dfc195cc090b6a" + "commitHash": "16e28102fdf876ce6d136674ba66343ede07441f" } }, "licenseDetail": [ @@ -40,7 +40,7 @@ "SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ], "isOnlyProductionDependency": true, - "version": "98.0.4758.141" + "version": "100.0.4894.0" }, { "component": { @@ -48,11 +48,11 @@ "git": { "name": "nodejs", "repositoryUrl": "https://github.com/nodejs/node", - "commitHash": "40ecd5601193c316e62e9216e8a4259130686208" + "commitHash": "acb71eab779fb56bf70e8a9e0cb2e82a089a87de" } }, "isOnlyProductionDependency": true, - "version": "16.13.0" + "version": "16.13.2" }, { "component": { @@ -60,12 +60,12 @@ "git": { "name": "electron", "repositoryUrl": "https://github.com/electron/electron", - "commitHash": "73c87bcfc6e18428c21676d68f829364e6a7b15d" + "commitHash": "83077e9b97c55cd4f9f641530442bcfd1c2ab949" } }, "isOnlyProductionDependency": true, "license": "MIT", - "version": "17.4.11" + "version": "19.1.3" }, { "component": { diff --git a/package.json b/package.json index 043a5df4d7..a21db87577 100755 --- a/package.json +++ b/package.json @@ -172,7 +172,7 @@ "cssnano": "^4.1.11", "debounce": "^1.0.0", "deemon": "^1.4.0", - "electron": "17.4.11", + "electron": "19.1.3", "eslint": "8.7.0", "eslint-plugin-header": "3.1.1", "eslint-plugin-jsdoc": "^19.1.0", diff --git a/remote/.yarnrc b/remote/.yarnrc index 1df1b5f244..290849a6e6 100644 --- a/remote/.yarnrc +++ b/remote/.yarnrc @@ -1,4 +1,4 @@ disturl "http://nodejs.org/dist" -target "16.13.0" +target "16.13.2" runtime "node" build_from_source "true" diff --git a/src/bootstrap-fork.js b/src/bootstrap-fork.js index d930b81427..6d083053df 100644 --- a/src/bootstrap-fork.js +++ b/src/bootstrap-fork.js @@ -37,6 +37,11 @@ if (process.env['VSCODE_PARENT_PID']) { terminateWhenParentTerminates(); } +// Listen for message ports +if (process.env['VSCODE_WILL_SEND_MESSAGE_PORT']) { + listenForMessagePort(); +} + // Load AMD entry point require('./bootstrap-amd').load(process.env['VSCODE_AMD_ENTRYPOINT']); @@ -264,4 +269,21 @@ function terminateWhenParentTerminates() { } } +function listenForMessagePort() { + // We need to listen for the 'port' event as soon as possible, + // otherwise we might miss the event. But we should also be + // prepared in case the event arrives late. + // @ts-ignore + if (process.parentPort) { + // @ts-ignore + process.parentPort.on('message', (e) => { + if (global.vscodePortsCallback) { + global.vscodePortsCallback(e.ports); + } else { + global.vscodePorts = e.ports; + } + }); + } +} + //#endregion diff --git a/src/vs/platform/issue/electron-main/issueMainService.ts b/src/vs/platform/issue/electron-main/issueMainService.ts index 933fe504d0..83cdabf8e2 100644 --- a/src/vs/platform/issue/electron-main/issueMainService.ts +++ b/src/vs/platform/issue/electron-main/issueMainService.ts @@ -335,7 +335,6 @@ export class IssueMainService implements ICommonIssueService { v8CacheOptions: this.environmentMainService.useCodeCache ? 'bypassHeatCheck' : 'none', enableWebSQL: false, spellcheck: false, - nativeWindowOpen: true, zoomFactor: zoomLevelToZoomFactor(options.zoomLevel), sandbox: true, contextIsolation: true diff --git a/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts b/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts index 2c2f184ed6..dc7cea6914 100644 --- a/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts +++ b/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts @@ -226,7 +226,6 @@ export class SharedProcess extends Disposable implements ISharedProcess { contextIsolation: false, enableWebSQL: false, spellcheck: false, - nativeWindowOpen: true, images: false, webgl: false } diff --git a/src/vs/platform/windows/electron-main/window.ts b/src/vs/platform/windows/electron-main/window.ts index 131aacd18d..822aca4197 100644 --- a/src/vs/platform/windows/electron-main/window.ts +++ b/src/vs/platform/windows/electron-main/window.ts @@ -193,7 +193,6 @@ export class CodeWindow extends Disposable implements ICodeWindow { v8CacheOptions: this.environmentMainService.useCodeCache ? 'bypassHeatCheck' : 'none', enableWebSQL: false, spellcheck: false, - nativeWindowOpen: true, zoomFactor: zoomLevelToZoomFactor(windowSettings?.zoomLevel), // Enable experimental css highlight api https://chromestatus.com/feature/5436441440026624 // Refs https://github.com/microsoft/vscode/issues/140098 diff --git a/test/unit/electron/index.js b/test/unit/electron/index.js index 9f8c5d79fa..6936d72295 100644 --- a/test/unit/electron/index.js +++ b/test/unit/electron/index.js @@ -196,8 +196,7 @@ app.on('ready', () => { nodeIntegration: true, contextIsolation: false, enableWebSQL: false, - spellcheck: false, - nativeWindowOpen: true + spellcheck: false } }); diff --git a/yarn.lock b/yarn.lock index eca31610c5..2ab9fcc290 100644 --- a/yarn.lock +++ b/yarn.lock @@ -314,7 +314,7 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@electron/get@^1.12.4", "@electron/get@^1.13.0": +"@electron/get@^1.12.4", "@electron/get@^1.14.1": version "1.14.1" resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.14.1.tgz#16ba75f02dffb74c23965e72d617adc721d27f40" integrity sha512-BrZYyL/6m0ZXz/lDxy/nlVhQz+WF+iPS6qXolEU8atw7h6v1aYkjwJZ63m+bJMBTxDE66X+r2tPS4a/8C82sZw== @@ -984,10 +984,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.44.tgz#447e3eecad9d19bd779f4a575f361d34898c0722" integrity sha512-gwP6+QDgL5TDBIWh1lbYh3EFPU11pa+8xcamcsA3ROkp3A9X+/3Y5cRgq93VPEEE+CGfxlQnqkg1kkWGBgh3fw== -"@types/node@^14.6.2": - version "14.18.22" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.22.tgz#fd2a15dca290fc9ad565b672fde746191cd0c6e6" - integrity sha512-qzaYbXVzin6EPjghf/hTdIbnVW1ErMx8rPzwRNJhlbyJhu2SyqlvjGOY/tbUt6VFyzg56lROcOeSQRInpt63Yw== +"@types/node@^16.11.26": + version "16.18.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.3.tgz#d7f7ba828ad9e540270f01ce00d391c54e6e0abc" + integrity sha512-jh6m0QUhIRcZpNv7Z/rpN+ZWXOicUUQbSoWks7Htkbb9IjFQj4kzcX/xFCkjstCj5flMsN8FiSvt+q+Tcs4Llg== "@types/plotly.js@^1.44.9": version "1.54.22" @@ -3889,13 +3889,13 @@ electron-to-chromium@^1.4.188: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.189.tgz#4e5b221dc44e09e9dddc9abbc6457857dee7ba25" integrity sha512-dQ6Zn4ll2NofGtxPXaDfY2laIa6NyCQdqXYHdwH90GJQW0LpJJib0ZU/ERtbb0XkBEmUD2eJtagbOie3pdMiPg== -electron@17.4.11: - version "17.4.11" - resolved "https://registry.yarnpkg.com/electron/-/electron-17.4.11.tgz#82899a44336bf8f1af15c6312c7f51ae3f4a519b" - integrity sha512-mdSWM2iY/Bh5bKzd5drYS3mf8JWyR9P9UXZA2uLEZ+1fhgLEVkY9qu501QHoMsKlNwgn96EreQC+dfdQ75VTcA== +electron@19.1.3: + version "19.1.3" + resolved "https://registry.yarnpkg.com/electron/-/electron-19.1.3.tgz#90a2b6c3d738789d657477d87d1539f008be6536" + integrity sha512-P2kfFc8UqVvPHE1w9qTZSPNpfOqd+CK34K3wBqJwokzYdVBLsVkbIoLxyByjJ/cU35WaeCL5bsI8kXALfPvebw== dependencies: - "@electron/get" "^1.13.0" - "@types/node" "^14.6.2" + "@electron/get" "^1.14.1" + "@types/node" "^16.11.26" extract-zip "^1.0.3" elliptic@^6.5.3: