Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)

This commit is contained in:
Cory Rivera
2021-08-25 16:28:29 -07:00
committed by GitHub
parent ab1112bfb3
commit cb7b7da0a4
1752 changed files with 59525 additions and 33878 deletions

View File

@@ -57,6 +57,11 @@
const configuration = await preloadGlobals.context.resolveConfiguration();
performance.mark('code/didWaitForWindowConfig');
// Signal DOM modifications are now OK
if (typeof options?.canModifyDOM === 'function') {
options.canModifyDOM(configuration);
}
// Developer settings
const {
forceDisableShowDevtoolsOnError,
@@ -86,13 +91,8 @@
globalThis.MonacoBootstrap.enableASARSupport(configuration.appRoot);
}
// Signal DOM modifications are now OK
if (typeof options?.canModifyDOM === 'function') {
options.canModifyDOM(configuration);
}
// Get the nls configuration into the process.env as early as possible (TODO@sandbox non-sandboxed only)
const nlsConfig = safeProcess.sandboxed ? { availableLanguages: {} } : globalThis.MonacoBootstrap.setupNLS();
// Get the nls configuration into the process.env as early as possible
const nlsConfig = globalThis.MonacoBootstrap.setupNLS();
let locale = nlsConfig.availableLanguages['*'] || 'en';
if (locale === 'zh-tw') {
@@ -152,13 +152,13 @@
'jschardet': `../node_modules/jschardet/dist/jschardet.min.js`,
};
} else {
loaderConfig.amdModulesPattern = /^(vs|sql)\//;
loaderConfig.amdModulesPattern = /^(vs|sql)\//; // {{SQL CARBON EDIT}} include sql in regex
}
// Cached data config
if (configuration.nodeCachedDataDir) {
// Cached data config (node.js loading only)
if (!useCustomProtocol && configuration.codeCachePath) {
loaderConfig.nodeCachedData = {
path: configuration.nodeCachedDataDir,
path: configuration.codeCachePath,
seed: modulePaths.join('')
};
}
@@ -187,13 +187,6 @@
require(modulePaths, async result => {
try {
// Wait for process environment being fully resolved
performance.mark('code/willWaitForShellEnv');
if (!safeProcess.env['VSCODE_SKIP_PROCESS_ENV_PATCHING'] /* TODO@bpasero for https://github.com/microsoft/vscode/issues/108804 */) {
await safeProcess.shellEnv();
}
performance.mark('code/didWaitForShellEnv');
// Callback only after process environment is resolved
const callbackResult = resultCallback(result, configuration);
if (callbackResult instanceof Promise) {