Skip to content

Commit

Permalink
feat: use custom tag instead of custom version for MS electron releas…
Browse files Browse the repository at this point in the history
…es (microsoft#181309)

* feat: use custom tag instead of custom version for MS electron releases

* chore: bump @vscode/gulp-electron

* chore: move build id to .yarnrc

* chore: rename enableUNCAccessChecks => restrictUNCAccess

* chore: update [email protected]

* chore: add build info to about dialog

* chore: simplify helper function

* chore: remove unused node.js checksums

* chore: bump nodejs internal version

* chore: bump distro

* fix: revert changes to sign.ts

* chore: bump distro
  • Loading branch information
deepak1556 committed Jun 17, 2023
1 parent e6de1b0 commit 8fb5ea0
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 58 deletions.
3 changes: 2 additions & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
disturl "https://electronjs.org/headers"
target "22.3.10"
target "22.3.11"
ms_build_id "21658788"
runtime "electron"
build_from_source "true"
27 changes: 0 additions & 27 deletions build/checksums/nodejs.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,7 @@
dfb37570ef34ac04f34c26d0ec558df60a9665df5961c01c1657c0ca495f2f01 node-v16.17.1-aix-ppc64.tar.gz
f9f02f7872e2e8ee54320fce13deb9d56904f32bb0615b6e21aa3371d8899150 node-v16.17.1-darwin-arm64.tar.gz
09a45f60bfb9dfbea4f69044dc733ef983945acd92ca89ccccac267f3d71bd44 node-v16.17.1-darwin-arm64.tar.xz
3db26761ad8493b894d42260d7e65094b7af9bc473588739e61bc1c32d6ff955 node-v16.17.1-darwin-x64.tar.gz
8e7089956fa01cf7d0045945c0863d282dc6818fb0476237c1396497e29a4254 node-v16.17.1-darwin-x64.tar.xz
35ccb95caf02cda3bd680da4350a8ae5d666a7a9eae3afe5c2a1b3ef29aef108 node-v16.17.1-headers.tar.gz
554c8d1b4b16e0f4c073b9df7c49c893716a3a533f25ac646f23619f5ccee7df node-v16.17.1-headers.tar.xz
adc7032888d4e672a4aac886baede8c04fccdd1a2e7ab4bcf325e3f336f44a3d node-v16.17.1-linux-arm64.tar.gz
3dfb8fd8f6b97df69cdc56524abc906c50ef1d0bf091188616802e6c7c731389 node-v16.17.1-linux-arm64.tar.xz
aeab05e35f1d2824ecfb88ca321f1408b44d292b2775f2890972c828e00216d0 node-v16.17.1-linux-armv7l.tar.gz
a035ceefb5e16f5fce98c8ddfdf721b96eec20542c72fb8781bcbb6ef20c5550 node-v16.17.1-linux-armv7l.tar.xz
1f48de7bed99e973c4c50f1b7fc99fc9af5144d093fd6d2b50a1e43b5818bf05 node-v16.17.1-linux-ppc64le.tar.gz
70305934661f89fca64053b85317a75f233d5e3fdb2caa6546a19262a519cf20 node-v16.17.1-linux-ppc64le.tar.xz
029dad48018bda07b481213816549b632059fc673c30fdc7a353e04619128344 node-v16.17.1-linux-s390x.tar.gz
1a47f604944c6aff37cb7483503155671cdb34bda9bfb8962007bc440fa04d77 node-v16.17.1-linux-s390x.tar.xz
da5658693243b3ecf6a4cba6751a71df1eb9e9703ca93b42a9404aed85f58ad0 node-v16.17.1-linux-x64.tar.gz
06ba2eb34aa385967f5f58c87a44753f83212f6cccea892b33f80a2e7fda8384 node-v16.17.1-linux-x64.tar.xz
12d10476ea7483298364c810c037b9316d1a73dc8c81cfeff7d794aecadde498 node-v16.17.1.pkg
e423985f6019b2026f9a191adb56a96ae83ecd56cdf839cf94aa980168b7a90f node-v16.17.1.tar.gz
6721feb4152d56d2c6b358ce397abd5a7f1daf09ee2e25c5021b9b4d3f86a330 node-v16.17.1.tar.xz
9777e8c4b2864c5b54a0e4e9400f14887db68560a09b94b4113b560a64d1e680 node-v16.17.1-win-x64.7z
ed290151efb417262b9808a70738d4ab79e9d53653a6a9f4b8dd97912e279dce node-v16.17.1-win-x64.zip
0f8101648d5c9e49e89fee541da9e574f899716c32b7c51a732b1766b9fc4526 node-v16.17.1-win-x86.7z
189b5e8b23226403e7b07a46614de19b444d369e694901e3668e2f549799cbcd node-v16.17.1-win-x86.zip
1bdff65fb7642425c0d6826084d63c4be43520316f0ea0b46e6a51999a0ed7fc node-v16.17.1-x64.msi
b737eb23a2c67c253b9364b5284123faf5220d567615bebd4ec4b81070e4d177 node-v16.17.1-x86.msi
f518a70dcab7c3fac5b2e1ef100b4f628edfb160f4fafa9a94ef222da8a6e9ab win-x64/node.exe
2f459a64647db493da63c790ce368ad54f59f086d9f22f59c5018680420197b3 win-x64/node.lib
23215ce7d1e9de9777c3407239e7cf18d29d60f757b772219421ab361ac67c74 win-x64/node_pdb.7z
8e32ec12028fd3e3147435be79a858ed9c870aaafa1fcb291362307ef3c47547 win-x64/node_pdb.zip
2393aff88be19dbe0205cbde4ff0c1d89911b15de5c99c80f6e5e29604eecd12 win-x86/node.exe
5018c3d42f3fbacbd06cb943b3f2696c8e67ca9bdf6864d0e263d6d6911dffd2 win-x86/node.lib
05a4db56444a60ee70b0d2642d7f2d82a33339894d2d73bd07b1a41d6c869e04 win-x86/node_pdb.7z
8f86eacb7f13a1bf6738cb0819d7854a2abca40fc2e9e1f91421e44ba52cad7e win-x86/node_pdb.zip
8 changes: 5 additions & 3 deletions build/lib/electron.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions build/lib/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ function darwinBundleDocumentTypes(types: { [name: string]: string | string[] },
});
}

const { electronVersion, msBuildId } = util.getElectronVersion();

export const config = {
version: product.electronRepository ? '22.5.7' : util.getElectronVersion(),
version: electronVersion,
tag: product.electronRepository ? `v${electronVersion}-${msBuildId}` : undefined,
productAppName: product.nameLong,
companyName: 'Microsoft Corporation',
copyright: 'Copyright (C) 2023 Microsoft. All rights reserved',
Expand Down Expand Up @@ -212,7 +215,7 @@ function getElectron(arch: string): () => NodeJS.ReadWriteStream {
}

async function main(arch = process.arch): Promise<void> {
const version = product.electronRepository ? '22.5.7' : util.getElectronVersion();
const version = electronVersion;
const electronPath = path.join(root, '.build', 'electron');
const versionFile = path.join(electronPath, 'version');
const isUpToDate = fs.existsSync(versionFile) && fs.readFileSync(versionFile, 'utf8') === `${version}`;
Expand Down
7 changes: 4 additions & 3 deletions build/lib/util.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions build/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,11 @@ export function streamToPromise(stream: NodeJS.ReadWriteStream): Promise<void> {
});
}

export function getElectronVersion(): string {
export function getElectronVersion(): Record<string, string> {
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
const target = /^target "(.*)"$/m.exec(yarnrc)![1];
return target;
const electronVersion = /^target "(.*)"$/m.exec(yarnrc)![1];
const msBuildId = /^ms_build_id "(.*)"$/m.exec(yarnrc)![1];
return { electronVersion, msBuildId };
}

export function acquireWebNodePaths() {
Expand Down
4 changes: 2 additions & 2 deletions build/linux/debian/install-sysroot.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/linux/debian/install-sysroot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type SysrootDictEntry = {
};

export async function getSysroot(arch: DebianArchString): Promise<string> {
const sysrootJSONUrl = `https://raw.githubusercontent.com/electron/electron/v${util.getElectronVersion()}/script/sysroots.json`;
const sysrootJSONUrl = `https://raw.githubusercontent.com/electron/electron/v${util.getElectronVersion().electronVersion}/script/sysroots.json`;
const sysrootDictLocation = `${tmpdir()}/sysroots.json`;
const result = spawnSync('curl', [sysrootJSONUrl, '-o', sysrootDictLocation]);
if (result.status !== 0) {
Expand Down
2 changes: 1 addition & 1 deletion cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@
},
"isOnlyProductionDependency": true,
"license": "MIT",
"version": "22.3.10"
"version": "22.3.11"
},
{
"component": {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.80.0",
"distro": "94a4bd29af2fe03e39c7867fdca1b2e27fed3a39",
"distro": "cbc1aeab0c196a6c6314cf4df21228d9016c70d1",
"author": {
"name": "Microsoft Corporation"
},
Expand Down Expand Up @@ -132,7 +132,7 @@
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/experimental-utils": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"@vscode/gulp-electron": "^1.34.0",
"@vscode/gulp-electron": "^1.35.0",
"@vscode/l10n-dev": "0.0.21",
"@vscode/telemetry-extractor": "^1.9.9",
"@vscode/test-web": "^0.0.41",
Expand All @@ -147,7 +147,7 @@
"cssnano": "^4.1.11",
"debounce": "^1.0.0",
"deemon": "^1.8.0",
"electron": "22.3.10",
"electron": "22.3.11",
"eslint": "8.36.0",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-jsdoc": "^39.3.2",
Expand Down
2 changes: 1 addition & 1 deletion remote/.yarnrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
disturl "http:https://nodejs.org/dist"
target "16.17.1"
ms_build_id "20230714"
ms_build_id "218982"
runtime "node"
build_from_source "true"
4 changes: 2 additions & 2 deletions src/vs/base/node/unc.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@
return;
}

process.enableUNCAccessChecks = false;
process.restrictUNCAccess = false;
}

function isUNCAccessRestrictionsDisabled() {
if (process.platform !== 'win32') {
return true;
}

return process.enableUNCAccessChecks === false;
return process.restrictUNCAccess === false;
}

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ export class NativeDialogHandler extends AbstractDialogHandler {

const detailString = (useAgo: boolean): string => {
return localize({ key: 'aboutDetail', comment: ['Electron, Chromium, Node.js and V8 are product names that need no translation'] },
"Version: {0}\nCommit: {1}\nDate: {2}\nElectron: {3}\nChromium: {4}\nNode.js: {5}\nV8: {6}\nOS: {7}",
"Version: {0}\nCommit: {1}\nDate: {2}\nElectron: {3}\nElectronBuildId: {4}\nChromium: {5}\nNode.js: {6}\nV8: {7}\nOS: {8}",
version,
this.productService.commit || 'Unknown',
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
process.versions['electron'],
process.versions['microsoft-build'],
process.versions['chrome'],
process.versions['node'],
process.versions['v8'],
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1240,10 +1240,10 @@
resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"
integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==

"@vscode/gulp-electron@^1.34.0":
version "1.34.0"
resolved "https://registry.yarnpkg.com/@vscode/gulp-electron/-/gulp-electron-1.34.0.tgz#59e00502e0a9703d1a0b7184dbd98ffe5125d2f4"
integrity sha512-zqLmueXYIqwgv0QhDdiDJOQYBYlCKE6Vu9KovMJ1ONZDrgb2CxUdaqxJRnROY18n6XO9RmNWodnplvSWkM+RVQ==
"@vscode/gulp-electron@^1.35.0":
version "1.35.0"
resolved "https://registry.yarnpkg.com/@vscode/gulp-electron/-/gulp-electron-1.35.0.tgz#b66aa307b1edefb0b37988faf29b82ab9974c466"
integrity sha512-FjRdAlfJBflFs28RYBaJ3gK/LHFZ4T34nP/FnKZrwNjWq5ojDC9WiwOMDHaG7wP7AKBcxh267Gz2epghMeO1ng==
dependencies:
"@electron/get" "^2.0.2"
"@octokit/rest" "^18.0.14"
Expand Down Expand Up @@ -3526,10 +3526,10 @@ electron-to-chromium@^1.4.202:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.207.tgz#9c3310ebace2952903d05dcaba8abe3a4ed44c01"
integrity sha512-piH7MJDJp4rJCduWbVvmUd59AUne1AFBJ8JaRQvk0KzNTSUnZrVXHCZc+eg+CGE4OujkcLJznhGKD6tuAshj5Q==

[email protected].10:
version "22.3.10"
resolved "https://registry.yarnpkg.com/electron/-/electron-22.3.10.tgz#bf2b98fbb452f41b057ffcd4e57678e363f9735c"
integrity sha512-gh7PtSh+rfxHfM4dzPiEO+k1NRo07FvaK/jXG3HzuODrpTTEhC9rsE+AJGrTKQU6Nz7GorseMvnvs8PnUQPPTw==
[email protected].11:
version "22.3.11"
resolved "https://registry.yarnpkg.com/electron/-/electron-22.3.11.tgz#db68c3f820eab9868ccf65bd4604c2805c4c93b9"
integrity sha512-4PW1rJRUckJUCxTXRJkzJ7qlGTZ8Qfwoke5aFlaGccmn/zViuE9iSCg9zqIx00rzsbF9R5j8j9V4tAqyqjjJRA==
dependencies:
"@electron/get" "^2.0.0"
"@types/node" "^16.11.26"
Expand Down

0 comments on commit 8fb5ea0

Please sign in to comment.