mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
eng - add build version of node.js to .yarnrc (#185302)
* eng - add build version of node.js to `.yarnrc`
* 🆙 distro
This commit is contained in:
@@ -125,8 +125,9 @@ const serverWithWebEntryPoints = [
|
|||||||
|
|
||||||
function getNodeVersion() {
|
function getNodeVersion() {
|
||||||
const yarnrc = fs.readFileSync(path.join(REPO_ROOT, 'remote', '.yarnrc'), 'utf8');
|
const yarnrc = fs.readFileSync(path.join(REPO_ROOT, 'remote', '.yarnrc'), 'utf8');
|
||||||
const target = /^target "(.*)"$/m.exec(yarnrc)[1];
|
const nodeVersion = /^target "(.*)"$/m.exec(yarnrc)[1];
|
||||||
return target;
|
const internalNodeVersion = /^ms_build_id "(.*)"$/m.exec(yarnrc)[1];
|
||||||
|
return { nodeVersion, internalNodeVersion };
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNodeChecksum(nodeVersion, platform, arch) {
|
function getNodeChecksum(nodeVersion, platform, arch) {
|
||||||
@@ -156,7 +157,7 @@ function getNodeChecksum(nodeVersion, platform, arch) {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const nodeVersion = getNodeVersion();
|
const { nodeVersion, internalNodeVersion } = getNodeVersion();
|
||||||
|
|
||||||
BUILD_TARGETS.forEach(({ platform, arch }) => {
|
BUILD_TARGETS.forEach(({ platform, arch }) => {
|
||||||
gulp.task(task.define(`node-${platform}-${arch}`, () => {
|
gulp.task(task.define(`node-${platform}-${arch}`, () => {
|
||||||
@@ -193,7 +194,7 @@ function nodejs(platform, arch) {
|
|||||||
arch = 'x64';
|
arch = 'x64';
|
||||||
}
|
}
|
||||||
|
|
||||||
log(`Downloading node.js ${nodeVersion} ${platform} ${arch} from ${product.nodejs.repository}...`);
|
log(`Downloading node.js ${nodeVersion} ${platform} ${arch} from ${product.nodejsRepository}...`);
|
||||||
|
|
||||||
const checksumSha256 = getNodeChecksum(nodeVersion, platform, arch);
|
const checksumSha256 = getNodeChecksum(nodeVersion, platform, arch);
|
||||||
|
|
||||||
@@ -205,14 +206,14 @@ function nodejs(platform, arch) {
|
|||||||
|
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case 'win32':
|
case 'win32':
|
||||||
return (product.nodejs.repository !== 'https://nodejs.org' ?
|
return (product.nodejsRepository !== 'https://nodejs.org' ?
|
||||||
fetchGithub(product.nodejs.repository, { version: product.nodejs.version, name: `win-${arch}-node.exe`, checksumSha256 }) :
|
fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: `win-${arch}-node.exe`, checksumSha256 }) :
|
||||||
fetchUrls(`/dist/v${nodeVersion}/win-${arch}/node.exe`, { base: 'https://nodejs.org', checksumSha256 }))
|
fetchUrls(`/dist/v${nodeVersion}/win-${arch}/node.exe`, { base: 'https://nodejs.org', checksumSha256 }))
|
||||||
.pipe(rename('node.exe'));
|
.pipe(rename('node.exe'));
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
case 'linux':
|
case 'linux':
|
||||||
return (product.nodejs.repository !== 'https://nodejs.org' ?
|
return (product.nodejsRepository !== 'https://nodejs.org' ?
|
||||||
fetchGithub(product.nodejs.repository, { version: product.nodejs.version, name: `node-v${nodeVersion}-${platform}-${arch}.tar.gz`, checksumSha256 }) :
|
fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: `node-v${nodeVersion}-${platform}-${arch}.tar.gz`, checksumSha256 }) :
|
||||||
fetchUrls(`/dist/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`, { base: 'https://nodejs.org', checksumSha256 })
|
fetchUrls(`/dist/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`, { base: 'https://nodejs.org', checksumSha256 })
|
||||||
).pipe(flatmap(stream => stream.pipe(gunzip()).pipe(untar())))
|
).pipe(flatmap(stream => stream.pipe(gunzip()).pipe(untar())))
|
||||||
.pipe(filter('**/node'))
|
.pipe(filter('**/node'))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "code-oss-dev",
|
"name": "code-oss-dev",
|
||||||
"version": "1.80.0",
|
"version": "1.80.0",
|
||||||
"distro": "a44605dbeeed7ad5c41513260004329c4f502793",
|
"distro": "94a4bd29af2fe03e39c7867fdca1b2e27fed3a39",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Microsoft Corporation"
|
"name": "Microsoft Corporation"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"linuxIconName": "code-oss",
|
"linuxIconName": "code-oss",
|
||||||
"licenseFileName": "LICENSE.txt",
|
"licenseFileName": "LICENSE.txt",
|
||||||
"reportIssueUrl": "https://github.com/microsoft/vscode/issues/new",
|
"reportIssueUrl": "https://github.com/microsoft/vscode/issues/new",
|
||||||
|
"nodejsRepository": "https://nodejs.org",
|
||||||
"urlProtocol": "code-oss",
|
"urlProtocol": "code-oss",
|
||||||
"webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-cdn.net/insider/ef65ac1ba57f57f2a3961bfe94aa20481caca4c6/out/vs/workbench/contrib/webview/browser/pre/",
|
"webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-cdn.net/insider/ef65ac1ba57f57f2a3961bfe94aa20481caca4c6/out/vs/workbench/contrib/webview/browser/pre/",
|
||||||
"builtInExtensions": [
|
"builtInExtensions": [
|
||||||
@@ -81,9 +82,5 @@
|
|||||||
"publisherDisplayName": "Microsoft"
|
"publisherDisplayName": "Microsoft"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"nodejs": {
|
|
||||||
"repository": "https://nodejs.org",
|
|
||||||
"version": "16.17.1"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
disturl "http://nodejs.org/dist"
|
disturl "http://nodejs.org/dist"
|
||||||
target "16.17.1"
|
target "16.17.1"
|
||||||
|
ms_build_id "20230714"
|
||||||
runtime "node"
|
runtime "node"
|
||||||
build_from_source "true"
|
build_from_source "true"
|
||||||
|
|||||||
Reference in New Issue
Block a user