зеркало из https://github.com/microsoft/BuildXL.git
Merged PR 523252: Revert commit 83714cfc
Revert commit 83714cfc
because Node 9.9.0 brings in more vulnerable binaries
This commit is contained in:
Родитель
83714cfc8b
Коммит
e1709329ba
|
@ -0,0 +1,7 @@
|
|||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
import {Transformer} from "Sdk.Transformers";
|
||||
|
||||
@@public
|
||||
export const extracted = Transformer.reSealPartialDirectory(importFrom("NodeJs").Contents.all, r`linux-x64`);
|
|
@ -11,4 +11,10 @@ module({
|
|||
name: "NodeJs.osx-x64",
|
||||
nameResolutionSemantics: NameResolutionSemantics.implicitProjectReferences,
|
||||
projects: [f`NodeJs.osx-x64.dsc`]
|
||||
});
|
||||
});
|
||||
|
||||
module({
|
||||
name: "NodeJs.linux-x64",
|
||||
nameResolutionSemantics: NameResolutionSemantics.implicitProjectReferences,
|
||||
projects: [f`NodeJs.linux-x64.dsc`]
|
||||
});
|
||||
|
|
|
@ -40,9 +40,6 @@ namespace Node {
|
|||
return Transformer.execute(execArgs);
|
||||
}
|
||||
|
||||
const nodeWinDir = "node-v9.9.0-win-x64";
|
||||
const nodeOsxDir = "node-v9.9.0-darwin-x64";
|
||||
|
||||
function getNodeTool() : Transformer.ToolDefinition {
|
||||
const host = Context.getCurrentHost();
|
||||
|
||||
|
@ -54,11 +51,15 @@ namespace Node {
|
|||
switch (host.os) {
|
||||
case "win":
|
||||
pkgContents = importFrom("NodeJs.win-x64").extracted;
|
||||
executable = r`${nodeWinDir}/node.exe`;
|
||||
executable = r`node-v8.12.0-win-x64/node.exe`;
|
||||
break;
|
||||
case "macOS":
|
||||
pkgContents = importFrom("NodeJs.osx-x64").extracted;
|
||||
executable = r`${nodeOsxDir}/bin/node`;
|
||||
executable = r`node-v8.12.0-darwin-x64/bin/node`;
|
||||
break;
|
||||
case "unix":
|
||||
pkgContents = importFrom("NodeJs.linux-x64").extracted;
|
||||
executable = r`node-v8.12.0-linux-arm64/bin/node`;
|
||||
break;
|
||||
default:
|
||||
Contract.fail(`The current NodeJs package doesn't support the current OS: ${host.os}. Esure you run on a supported OS -or- update the NodeJs package to have the version embdded.`);
|
||||
|
@ -86,11 +87,15 @@ namespace Node {
|
|||
switch (host.os) {
|
||||
case "win":
|
||||
pkgContents = importFrom("NodeJs.win-x64").extracted;
|
||||
executable = r`${nodeWinDir}/node_modules/npm/bin/npm-cli.js`;
|
||||
executable = r`node-v8.12.0-win-x64/node_modules/npm/bin/npm-cli.js`;
|
||||
break;
|
||||
case "macOS":
|
||||
pkgContents = importFrom("NodeJs.osx-x64").extracted;
|
||||
executable = r`${nodeOsxDir}/lib/node_modules/npm/bin/npm-cli.js`;
|
||||
executable = r`node-v8.12.0-darwin-x64/lib/node_modules/npm/bin/npm-cli.js`;
|
||||
break;
|
||||
case "unix":
|
||||
pkgContents = importFrom("NodeJs.linux-x64").extracted;
|
||||
executable = r`node-v8.12.0-linux-arm64/lib/node_modules/npm/bin/npm-cli.js`;
|
||||
break;
|
||||
default:
|
||||
Contract.fail(`The current NodeJs package doesn't support the current OS: ${host.os}. Esure you run on a supported OS -or- update the NodeJs package to have the version embdded.`);
|
||||
|
|
|
@ -2449,6 +2449,15 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Component": {
|
||||
"Type": "NuGet",
|
||||
"NuGet": {
|
||||
"Name": "NodeJs",
|
||||
"Version": "8.12.0-noTest"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Component": {
|
||||
"Type": "NuGet",
|
||||
|
|
14
config.dsc
14
config.dsc
|
@ -550,14 +550,20 @@ config({
|
|||
// NodeJs
|
||||
{
|
||||
moduleName: "NodeJs.win-x64",
|
||||
url: "https://nodejs.org/download/release/v9.9.0/node-v9.9.0-win-x64.zip",
|
||||
hash: "VSO0:33413C0D74A304871948A7D11C195549D43E80C059BAE3A734790B3BD774AD8600",
|
||||
url: "https://nodejs.org/download/release/v8.12.0/node-v8.12.0-win-x64.zip",
|
||||
hash: "VSO0:95276E5CC1A0F5095181114C16734E8E0416B222F232E257E31FEBF73324BC2300",
|
||||
archiveType: "zip",
|
||||
},
|
||||
{
|
||||
moduleName: "NodeJs.osx-x64",
|
||||
url: "https://nodejs.org/download/release/v9.9.0/node-v9.9.0-darwin-x64.tar.gz",
|
||||
hash: "VSO0:6076D4DD796E0552DDE99E438BD369BDB3E12FCA1DA60979172E1F2881F1537500",
|
||||
url: "https://nodejs.org/download/release/v8.12.0/node-v8.12.0-darwin-x64.tar.gz",
|
||||
hash: "VSO0:2D9315899B651CA8489F47580378C5C8EAE5E0DEB4F50AF5A149BEC7B387228000",
|
||||
archiveType: "tgz",
|
||||
},
|
||||
{
|
||||
moduleName: "NodeJs.linux-x64",
|
||||
url: "https://nodejs.org/download/release/v8.12.0/node-v8.12.0-linux-arm64.tar.gz",
|
||||
hash: "VSO0:9DE138F52CCCE4B89747BFDEC5D3A0DDBB23BF80BB2A45AE0218D852845AB13C00",
|
||||
archiveType: "tgz",
|
||||
},
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ export const pkgs = isMicrosoftInternal ? [
|
|||
|
||||
|
||||
// Internal pacakged version to avoid downloading from the web but the trusted stable internal feed:
|
||||
// { id: "NodeJs", version: "9.9.0-noTest" }, // paths in this package are longer than 256 chars so nuget.exe goes crazy
|
||||
{ id: "NodeJs", version: "8.12.0-noTest" },
|
||||
{ id: "PowerShell.Core", version: "6.1.0" },
|
||||
|
||||
// Combined runtimes
|
||||
|
@ -65,7 +65,7 @@ export const resolver = {
|
|||
f`private/InternalSdk/CB.QTest/module.config.dsc`,
|
||||
...addIf(isMicrosoftInternal,
|
||||
f`private/InternalSdk/PowerShell.Core/module.config.dsc`,
|
||||
// f`private/InternalSdk/NodeJs/module.config.dsc`,
|
||||
f`private/InternalSdk/NodeJs/module.config.dsc`,
|
||||
f`private/InternalSdk/DotNet-Runtime/module.config.dsc`,
|
||||
f`private/InternalSdk/Windows.Sdk/module.config.dsc`
|
||||
),
|
||||
|
|
Загрузка…
Ссылка в новой задаче