提交 302e86a1 编写于 作者: B Benjamin Pasero

sandbox - some tweaks around loading modules lazy if possible(semver-umd)

上级 8ba70d8b
......@@ -62,9 +62,7 @@ bootstrapWindow.load([
{
removeDeveloperKeybindingsAfterLoad: true,
canModifyDOM: function (windowConfig) {
if (!bootstrapWindow.globals().context.sandbox) {
showPartsSplash(windowConfig); // TODO@sandbox non-sandboxed only
}
showPartsSplash(windowConfig);
},
beforeLoaderConfig: function (windowConfig, loaderConfig) {
loaderConfig.recordStats = true;
......
......@@ -14,7 +14,6 @@ import { IOpenerService } from 'vs/platform/opener/common/opener';
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { IUpdateService, State as UpdateState, StateType, IUpdate } from 'vs/platform/update/common/update';
import * as semver from 'semver-umd';
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
......@@ -131,7 +130,7 @@ export class ProductContribution implements IWorkbenchContribution {
@IHostService hostService: IHostService,
@IProductService productService: IProductService
) {
hostService.hadLastFocus().then(hadLastFocus => {
hostService.hadLastFocus().then(async hadLastFocus => {
if (!hadLastFocus) {
return;
}
......@@ -160,6 +159,7 @@ export class ProductContribution implements IWorkbenchContribution {
}
// should we show the new license?
const semver = await import('semver-umd');
if (productService.licenseUrl && lastVersion && semver.satisfies(lastVersion, '<1.0.0') && semver.satisfies(productService.version, '>=1.0.0')) {
notificationService.info(nls.localize('licenseChanged', "Our license terms have changed, please click [here]({0}) to go through them.", productService.licenseUrl));
}
......
......@@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as semver from 'semver-umd';
import { IBuiltinExtensionsScannerService, IScannedExtension, ExtensionType, IExtensionIdentifier, ITranslatedScannedExtension } from 'vs/platform/extensions/common/extensions';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IWebExtensionsScannerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
......@@ -225,6 +224,7 @@ export class WebExtensionsScannerService extends Disposable implements IWebExten
}
private async scanUserExtensions(): Promise<IScannedExtension[]> {
const semver = await import('semver-umd');
let userExtensions = await this.readUserExtensions();
const byExtension: IUserExtension[][] = groupByExtension(userExtensions, e => e.identifier);
userExtensions = byExtension.map(p => p.sort((a, b) => semver.rcompare(a.version, b.version))[0]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册