Merge from vscode merge-base (#22769)

* Merge from vscode merge-base

* Turn off basic checks

* Enable compilation, unit, and integration tests
This commit is contained in:
Lewis Sanchez
2023-04-18 18:28:58 -07:00
committed by GitHub
parent 6186358001
commit 6bd0a17d3c
2389 changed files with 92183 additions and 42601 deletions

View File

@@ -7,7 +7,6 @@
exports.dirs = [
'',
'build',
'build/lib/watch',
'extensions',
// {{SQL CARBON EDIT}} Add ADS extensions and remove VSCode ones
'extensions/admin-tool-ext-win',
@@ -34,6 +33,7 @@ exports.dirs = [
'extensions/json-language-features/server',
'extensions/kusto',
'extensions/machine-learning',
'extensions/markdown-language-features/server',
'extensions/markdown-language-features',
'extensions/markdown-math',
'extensions/merge-conflict',

View File

@@ -2,10 +2,10 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const cp = require('child_process');
const path = require('path');
const fs = require('fs');
const { dirs } = require('./dirs');
const { setupBuildYarnrc } = require('./setupBuildYarnrc');
const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
/**
@@ -47,9 +47,9 @@ for (let dir of dirs) {
continue;
}
if (dir === 'build/lib/watch') {
// node modules for watching, specific to host node version, not electron
yarnInstallBuildDependencies();
if (dir === 'build') {
setupBuildYarnrc();
yarnInstall('build');
continue;
}
@@ -73,23 +73,5 @@ for (let dir of dirs) {
yarnInstall(dir, opts);
}
function yarnInstallBuildDependencies() {
// make sure we install the deps of build/lib/watch for the system installed
// node, since that is the driver of gulp
const watchPath = path.join(path.dirname(__dirname), 'lib', 'watch');
const yarnrcPath = path.join(watchPath, '.yarnrc');
const disturl = 'https://nodejs.org/download/release';
const target = process.versions.node;
const runtime = 'node';
const yarnrc = `disturl "${disturl}"
target "${target}"
runtime "${runtime}"`;
fs.writeFileSync(yarnrcPath, yarnrc, 'utf8');
yarnInstall(watchPath);
}
cp.execSync('git config pull.rebase merges');
cp.execSync('git config blame.ignoreRevsFile .git-blame-ignore');

View File

@@ -9,10 +9,13 @@ const majorNodeVersion = parseInt(nodeVersion[1]);
const minorNodeVersion = parseInt(nodeVersion[2]);
const patchNodeVersion = parseInt(nodeVersion[3]);
if (majorNodeVersion < 14 || (majorNodeVersion === 14 && minorNodeVersion < 17) || (majorNodeVersion === 14 && minorNodeVersion === 17 && patchNodeVersion < 4) || majorNodeVersion >= 17) {
console.error('\033[1;31m*** Please use node.js versions >=14.17.4 and <17.\033[0;0m');
if (majorNodeVersion < 16 || (majorNodeVersion === 16 && minorNodeVersion < 14)) {
console.error('\033[1;31m*** Please use node.js versions >=16.14.x and <17.\033[0;0m');
err = true;
}
if (majorNodeVersion >= 17) {
console.warn('\033[1;31m*** Warning: Versions of node.js >= 17 have not been tested.\033[0;0m')
}
const path = require('path');
const fs = require('fs');

View File

@@ -0,0 +1,25 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const path = require('path');
const fs = require('fs');
// make sure we install the deps of build for the system installed
// node, since that is the driver of gulp
function setupBuildYarnrc() {
const yarnrcPath = path.join(path.dirname(__dirname), '.yarnrc');
const yarnrc = `disturl "https://nodejs.org/download/release"
target "${process.versions.node}"
runtime "node"
arch "${process.arch}"`;
fs.writeFileSync(yarnrcPath, yarnrc, 'utf8');
}
exports.setupBuildYarnrc = setupBuildYarnrc;
if (require.main === module) {
setupBuildYarnrc();
}