Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 (#14050)

* Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79

* Fix breaks

* Extension management fixes

* Fix breaks in windows bundling

* Fix/skip failing tests

* Update distro

* Add clear to nuget.config

* Add hygiene task

* Bump distro

* Fix hygiene issue

* Add build to hygiene exclusion

* Update distro

* Update hygiene

* Hygiene exclusions

* Update tsconfig

* Bump distro for server breaks

* Update build config

* Update darwin path

* Add done calls to notebook tests

* Skip failing tests

* Disable smoke tests
This commit is contained in:
Karl Burtram
2021-02-09 16:15:05 -08:00
committed by GitHub
parent 6f192f9af5
commit ce612a3d96
1929 changed files with 68012 additions and 34564 deletions

View File

@@ -15,6 +15,7 @@ const path = require('path');
const fs = require('fs');
const os = require('os');
const bootstrap = require('./bootstrap');
const bootstrapNode = require('./bootstrap-node');
const paths = require('./paths');
/** @type {any} */
const product = require('../product.json');
@@ -25,10 +26,10 @@ const { app, protocol, crashReporter } = require('electron');
app.allowRendererProcessReuse = false;
// Enable portable support
const portable = bootstrap.configurePortable(product);
const portable = bootstrapNode.configurePortable(product);
// Enable ASAR support
bootstrap.enableASARSupport();
bootstrap.enableASARSupport(undefined);
// Set userData path before app 'ready' event
const args = parseCLIArgs();
@@ -86,7 +87,16 @@ if (crashReporterDirectory) {
submitURL = submitURL.concat('&uid=', crashReporterId, '&iid=', crashReporterId, '&sid=', crashReporterId);
// Send the id for child node process that are explicitly starting crash reporter.
// For vscode this is ExtensionHost process currently.
process.argv.push('--crash-reporter-id', crashReporterId);
const argv = process.argv;
const endOfArgsMarkerIndex = argv.indexOf('--');
if (endOfArgsMarkerIndex === -1) {
argv.push('--crash-reporter-id', crashReporterId);
} else {
// if the we have an argument "--" (end of argument marker)
// we cannot add arguments at the end. rather, we add
// arguments before the "--" marker.
argv.splice(endOfArgsMarkerIndex, 0, '--crash-reporter-id', crashReporterId);
}
}
}
}
@@ -105,7 +115,7 @@ crashReporter.start({
// to ensure that no 'logs' folder is created on disk at a
// location outside of the portable directory
// (https://github.com/microsoft/vscode/issues/56651)
if (portable.isPortable) {
if (portable && portable.isPortable) {
app.setAppLogsPath(path.join(userDataPath, 'logs'));
}
@@ -131,6 +141,15 @@ protocol.registerSchemesAsPrivileged([
corsEnabled: true,
}
},
{
scheme: 'vscode-file',
privileges: {
secure: true,
standard: true,
supportFetchAPI: true,
corsEnabled: true
}
}
]);
// Global app listeners
@@ -139,17 +158,11 @@ registerListeners();
// Cached data
const nodeCachedDataDir = getNodeCachedDir();
// Remove env set by snap https://github.com/microsoft/vscode/issues/85344
if (process.env['SNAP']) {
delete process.env['GDK_PIXBUF_MODULE_FILE'];
delete process.env['GDK_PIXBUF_MODULEDIR'];
}
/**
* Support user defined locale: load it early before app('ready')
* to have more things running in parallel.
*
* @type {Promise<import('./vs/base/node/languagePacks').NLSConfiguration>} nlsConfig | undefined
* @type {Promise<import('./vs/base/node/languagePacks').NLSConfiguration> | undefined}
*/
let nlsConfigurationPromise = undefined;
@@ -363,7 +376,7 @@ function getArgvConfigPath() {
/**
* @param {NativeParsedArgs} cliArgs
* @returns {string}
* @returns {string | null}
*/
function getJSFlags(cliArgs) {
const jsFlags = [];
@@ -391,7 +404,7 @@ function getUserDataPath(cliArgs) {
return path.join(portable.portableDataPath, 'user-data');
}
return path.resolve(cliArgs['user-data-dir'] || paths.getDefaultUserDataPath(process.platform));
return path.resolve(cliArgs['user-data-dir'] || paths.getDefaultUserDataPath());
}
/**
@@ -472,12 +485,14 @@ function getNodeCachedDir() {
}
async ensureExists() {
try {
await mkdirp(this.value);
if (typeof this.value === 'string') {
try {
await mkdirp(this.value);
return this.value;
} catch (error) {
// ignore
return this.value;
} catch (error) {
// ignore
}
}
}