Initial VS Code 1.19 source merge (#571)

* Initial 1.19 xcopy

* Fix yarn build

* Fix numerous build breaks

* Next batch of build break fixes

* More build break fixes

* Runtime breaks

* Additional post merge fixes

* Fix windows setup file

* Fix test failures.

* Update license header blocks to refer to source eula
This commit is contained in:
Karl Burtram
2018-01-28 23:37:17 -08:00
committed by GitHub
parent 9a1ac20710
commit 251ae01c3e
8009 changed files with 93378 additions and 35634 deletions

View File

@@ -5,14 +5,15 @@
const cp = require('child_process');
const path = require('path');
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const fs = require('fs');
const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
function npmInstall(location, opts) {
function yarnInstall(location, opts) {
opts = opts || {};
opts.cwd = location;
opts.stdio = 'inherit';
const result = cp.spawnSync(npm, ['install'], opts);
const result = cp.spawnSync(yarn, ['install'], opts);
if (result.error || result.status !== 0) {
process.exit(1);
@@ -20,36 +21,46 @@ function npmInstall(location, opts) {
}
// {{SQL CARBON EDIT}}
npmInstall('dataprotocol-client');
npmInstall('extensions-modules');
npmInstall('extensions'); // node modules shared by all extensions
yarnInstall('dataprotocol-client');
yarnInstall('extensions-modules');
yarnInstall('extensions'); // node modules shared by all extensions
yarnInstall('extensions'); // node modules shared by all extensions
const extensions = [
'vscode-colorize-tests',
'git',
'json',
'mssql',
'mssql',
'configuration-editing',
'extension-editing',
'markdown',
'git',
'merge-conflict',
'insights-default',
'account-provider-azure'
];
extensions.forEach(extension => npmInstall(`extensions/${extension}`));
extensions.forEach(extension => yarnInstall(`extensions/${extension}`));
function npmInstallBuildDependencies() {
// make sure we install gulp watch for the system installed
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 env = Object.assign({}, process.env);
const watchPath = path.join(path.dirname(__dirname), 'lib', 'watch');
const yarnrcPath = path.join(watchPath, '.yarnrc');
delete env['npm_config_disturl'];
delete env['npm_config_target'];
delete env['npm_config_runtime'];
const disturl = 'https://nodejs.org/download/release';
const target = process.versions.node;
const runtime = 'node';
npmInstall(path.join(path.dirname(__dirname), 'lib', 'watch'), { env });
const yarnrc = `disturl "${disturl}"
target "${target}"
runtime "${runtime}"`;
fs.writeFileSync(yarnrcPath, yarnrc, 'utf8');
yarnInstall(watchPath, { env });
}
npmInstall(`build`); // node modules required for build
npmInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron
yarnInstall(`build`); // node modules required for build
yarnInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron

View File

@@ -3,13 +3,21 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
if (process.env['npm_config_disturl'] !== 'https://atom.io/download/electron') {
console.error("You can't use plain npm to install Code's dependencies.");
console.error(
/^win/.test(process.platform)
? "Please run '.\\scripts\\npm.bat install' instead."
: "Please run './scripts/npm.sh install' instead."
);
let err = false;
const major = parseInt(/^(\d+)\./.exec(process.versions.node)[1]);
if (major < 8) {
console.error('\033[1;31m*** Please use node>=8.\033[0;0m');
err = true;
}
if (!/yarn\.js$|yarnpkg$/.test(process.env['npm_execpath'])) {
console.error('\033[1;31m*** Please use yarn to install dependencies.\033[0;0m');
err = true;
}
if (err) {
console.error('');
process.exit(1);
}

View File

@@ -18,7 +18,7 @@ function updateGrammar(location) {
}
const extensions = [
// 'bat' Grammar no longer available
'bat',
'clojure',
'coffeescript',
'cpp',