Skip to content

Commit

Permalink
chore: update Electron v25.4.0 (#189904)
Browse files Browse the repository at this point in the history
* chore: some cleanups from the Electron v25 update

* chore: update Electron@25.4.0

* chore: update issue reference

* chore: bump distro
  • Loading branch information
deepak1556 authored Aug 9, 2023
1 parent bf9c810 commit 6dd6bdf
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
disturl "https://electronjs.org/headers"
target "25.4.0"
ms_build_id "22901934"
ms_build_id "22958381"
runtime "electron"
build_from_source "true"
2 changes: 2 additions & 0 deletions build/azure-pipelines/linux/product-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ steps:
docker run -e GITHUB_TOKEN -e npm_config_arch -e NPM_REGISTRY \
-e VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME -e VSCODE_HOST_MOUNT \
-e ELECTRON_SKIP_BINARY_DOWNLOAD -e PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD \
-e VSCODE_SKIP_NODE_VERSION_CHECK \
-v /mnt/vss/_work/1/s:/home/builduser/vscode -v /mnt/vss/_work/1/s/.build/.netrc:/home/builduser/.netrc \
-v /var/run/docker.sock:/var/run/docker.sock \
-u 1000:1000 \
Expand All @@ -138,6 +139,7 @@ steps:
NPM_REGISTRY: "$(NPM_REGISTRY)"
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
VSCODE_SKIP_NODE_VERSION_CHECK: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
VSCODE_HOST_MOUNT: "/mnt/vss/_work/1/s"
${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
Expand Down
14 changes: 8 additions & 6 deletions build/npm/preinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ const majorNodeVersion = parseInt(nodeVersion[1]);
const minorNodeVersion = parseInt(nodeVersion[2]);
const patchNodeVersion = parseInt(nodeVersion[3]);

if (majorNodeVersion < 18 || (majorNodeVersion === 18 && minorNodeVersion < 15)) {
console.error('\033[1;31m*** Please use node.js versions >=18.15.x and <19.\033[0;0m');
// err = true; enable once update unit test docker images are updated #189885
}
if (majorNodeVersion >= 19) {
console.warn('\033[1;31m*** Warning: Versions of node.js >= 19 have not been tested.\033[0;0m')
if (!process.env['VSCODE_SKIP_NODE_VERSION_CHECK']) {
if (majorNodeVersion < 18 || (majorNodeVersion === 18 && minorNodeVersion < 15)) {
console.error('\033[1;31m*** Please use node.js versions >=18.15.x and <19.\033[0;0m');
err = true;
}
if (majorNodeVersion >= 19) {
console.warn('\033[1;31m*** Warning: Versions of node.js >= 19 have not been tested.\033[0;0m')
}
}

const path = require('path');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.82.0",
"distro": "841e44443565bdc380b14a231d7419985956f7ab",
"distro": "a94daa7ddfb25b11bd8f3376c01e30ff356d0a2b",
"author": {
"name": "Microsoft Corporation"
},
Expand Down
8 changes: 6 additions & 2 deletions src/vs/base/parts/ipc/electron-main/ipcMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,12 @@ class ValidatedIpcMain implements Event.NodeEventEmitter {
const sender = event.senderFrame;

const url = sender.url;
if (!url) {
return true; // TODO@electron this only seems to happen from playwright runs (https://github.com/microsoft/vscode/issues/147301)
// `url` can be `undefined` when running tests from playwright https://github.com/microsoft/vscode/issues/147301
// and `url` can be `about:blank` when reloading the window
// from performance tab of devtools https://github.com/electron/electron/issues/39427.
// It is fine to skip the checks in these cases.
if (!url || url === 'about:blank') {
return true;
}

let host = 'unknown';
Expand Down
6 changes: 5 additions & 1 deletion src/vs/platform/windows/electron-main/windowImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,11 @@ export class CodeWindow extends Disposable implements ICodeWindow {
// macOS: traffic lights
else if (isMacintosh && options.height !== undefined) {
const verticalOffset = (options.height - 15) / 2; // 15px is the height of the traffic lights
this._win.setTrafficLightPosition({ x: verticalOffset, y: verticalOffset });
if (!verticalOffset) {
this._win.setWindowButtonPosition(null);
} else {
this._win.setWindowButtonPosition({ x: verticalOffset, y: verticalOffset });
}
}
}

Expand Down

0 comments on commit 6dd6bdf

Please sign in to comment.