From f336c548db14bcbc515e88ab66351336f8010b2f Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sat, 28 Sep 2024 08:19:45 -0700 Subject: [PATCH 01/15] Move XtermTerminal ctor args into options object --- .../terminal/browser/terminalInstance.ts | 19 ++--- .../terminal/browser/terminalService.ts | 19 ++--- .../terminal/browser/xterm/xtermTerminal.ts | 74 ++++++++----------- .../test/browser/xterm/xtermTerminal.test.ts | 30 +++++++- .../test/browser/bufferContentTracker.test.ts | 9 ++- 5 files changed, 81 insertions(+), 70 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index bac17da1e19..5b97125338a 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -751,17 +751,14 @@ export class TerminalInstance extends Disposable implements ITerminalInstance { } const disableShellIntegrationReporting = (this.shellLaunchConfig.executable === undefined || this.shellType === undefined) || !shellIntegrationSupportedShellTypes.includes(this.shellType); - const xterm = this._scopedInstantiationService.createInstance( - XtermTerminal, - Terminal, - this._cols, - this._rows, - undefined, - this._scopedInstantiationService.createInstance(TerminalInstanceColorProvider, this._targetRef), - this.capabilities, - this._processManager.shellIntegrationNonce, - disableShellIntegrationReporting - ); + const xterm = this._scopedInstantiationService.createInstance(XtermTerminal, Terminal, { + cols: this._cols, + rows: this._rows, + xtermColorProvider: this._scopedInstantiationService.createInstance(TerminalInstanceColorProvider, this._targetRef), + capabilities: this.capabilities, + shellIntegrationNonce: this._processManager.shellIntegrationNonce, + disableShellIntegrationReporting, + }); this.xterm = xterm; this._resizeDebouncer = this._register(new TerminalResizeDebouncer( () => this._isVisible, diff --git a/src/vs/workbench/contrib/terminal/browser/terminalService.ts b/src/vs/workbench/contrib/terminal/browser/terminalService.ts index 88a2aace6ae..17344561636 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalService.ts @@ -1023,17 +1023,14 @@ export class TerminalService extends Disposable implements ITerminalService { async createDetachedTerminal(options: IDetachedXTermOptions): Promise { const ctor = await TerminalInstance.getXtermConstructor(this._keybindingService, this._contextKeyService); - const xterm = this._instantiationService.createInstance( - XtermTerminal, - ctor, - options.cols, - options.rows, - undefined, - options.colorProvider, - options.capabilities || new TerminalCapabilityStore(), - '', - false, - ); + const xterm = this._instantiationService.createInstance(XtermTerminal, ctor, { + cols: options.cols, + rows: options.rows, + xtermColorProvider: options.colorProvider, + capabilities: options.capabilities || new TerminalCapabilityStore(), + shellIntegrationNonce: '', + disableShellIntegrationReporting: false, + }); if (options.readonly) { xterm.raw.attachCustomKeyEventHandler(() => false); diff --git a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts index 9683b7597a6..888060b13f0 100644 --- a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts +++ b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts @@ -63,39 +63,22 @@ function getFullBufferLineAsString(lineIndex: number, buffer: IBuffer): { lineDa return { lineData, lineIndex }; } - -// DEBUG: This helper can be used to draw image data to the console, it's commented out as we don't -// want to ship it, but this is very useful for investigating texture atlas issues. -// (console as any).image = (source: ImageData | HTMLCanvasElement, scale: number = 1) => { -// function getBox(width: number, height: number) { -// return { -// string: '+', -// style: 'font-size: 1px; padding: ' + Math.floor(height/2) + 'px ' + Math.floor(width/2) + 'px; line-height: ' + height + 'px;' -// }; -// } -// if (source instanceof HTMLCanvasElement) { -// source = source.getContext('2d')?.getImageData(0, 0, source.width, source.height)!; -// } -// const canvas = document.createElement('canvas'); -// canvas.width = source.width; -// canvas.height = source.height; -// const ctx = canvas.getContext('2d')!; -// ctx.putImageData(source, 0, 0); - -// const sw = source.width * scale; -// const sh = source.height * scale; -// const dim = getBox(sw, sh); -// console.log( -// `Image: ${source.width} x ${source.height}\n%c${dim.string}`, -// `${dim.style}background: url(${canvas.toDataURL()}); background-size: ${sw}px ${sh}px; background-repeat: no-repeat; color: transparent;` -// ); -// console.groupCollapsed('Zoomed'); -// console.log( -// `%c${dim.string}`, -// `${getBox(sw * 10, sh * 10).style}background: url(${canvas.toDataURL()}); background-size: ${sw * 10}px ${sh * 10}px; background-repeat: no-repeat; color: transparent; image-rendering: pixelated;-ms-interpolation-mode: nearest-neighbor;` -// ); -// console.groupEnd(); -// }; +export interface IXtermTerminalOptions { + /** The columns to initialize the terminal with. */ + cols: number; + /** The rows to initialize the terminal with. */ + rows: number; + /** The color provider for the terminal. */ + xtermColorProvider: IXtermColorProvider; + /** The capabilities of the terminal. */ + capabilities: ITerminalCapabilityStore; + /** The shell integration nonce to verify data coming from SI is trustworthy. */ + shellIntegrationNonce: string; + /** Whether to disable shell integration telemetry reporting. */ + disableShellIntegrationReporting: boolean; + /** The object that imports xterm addons, set this to inject an importer in tests. */ + xtermAddonImpoter?: XtermAddonImporter; +} /** * Wraps the xterm object with additional functionality. Interaction with the backing process is out @@ -105,6 +88,10 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach /** The raw xterm.js instance */ readonly raw: RawXtermTerminal; private _core: IXtermCore; + private readonly _xtermAddonLoader: XtermAddonImporter; + private readonly _xtermColorProvider: IXtermColorProvider; + private readonly _capabilities: ITerminalCapabilityStore; + private static _suggestedRendererType: 'dom' | undefined = undefined; private static _checkedWebglCompatible = false; private _attached?: { container: HTMLElement; options: IXtermAttachToElementOptions }; @@ -172,13 +159,7 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach */ constructor( xtermCtor: typeof RawXtermTerminal, - cols: number, - rows: number, - private readonly _xtermAddonLoader: XtermAddonImporter = new XtermAddonImporter(), - private readonly _xtermColorProvider: IXtermColorProvider, - private readonly _capabilities: ITerminalCapabilityStore, - shellIntegrationNonce: string, - disableShellIntegrationReporting: boolean, + options: IXtermTerminalOptions, @IConfigurationService private readonly _configurationService: IConfigurationService, @IInstantiationService private readonly _instantiationService: IInstantiationService, @ITerminalLogService private readonly _logService: ITerminalLogService, @@ -192,14 +173,19 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach @ILayoutService layoutService: ILayoutService ) { super(); + + this._xtermAddonLoader = options.xtermAddonImpoter ?? new XtermAddonImporter(); + this._xtermColorProvider = options.xtermColorProvider; + this._capabilities = options.capabilities; + const font = this._terminalConfigurationService.getFont(dom.getActiveWindow(), undefined, true); const config = this._terminalConfigurationService.config; const editorOptions = this._configurationService.getValue('editor'); this.raw = this._register(new xtermCtor({ allowProposedApi: true, - cols, - rows, + cols: options.cols, + rows: options.rows, documentOverride: layoutService.mainContainer.ownerDocument, altClickMovesCursor: config.altClickMovesCursor && editorOptions.multiCursorModifier === 'alt', scrollback: config.scrollback, @@ -269,12 +255,12 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach // Load addons this._updateUnicodeVersion(); - this._markNavigationAddon = this._instantiationService.createInstance(MarkNavigationAddon, _capabilities); + this._markNavigationAddon = this._instantiationService.createInstance(MarkNavigationAddon, options.capabilities); this.raw.loadAddon(this._markNavigationAddon); this._decorationAddon = this._instantiationService.createInstance(DecorationAddon, this._capabilities); this._register(this._decorationAddon.onDidRequestRunCommand(e => this._onDidRequestRunCommand.fire(e))); this.raw.loadAddon(this._decorationAddon); - this._shellIntegrationAddon = new ShellIntegrationAddon(shellIntegrationNonce, disableShellIntegrationReporting, this._telemetryService, this._logService); + this._shellIntegrationAddon = new ShellIntegrationAddon(options.shellIntegrationNonce, options.disableShellIntegrationReporting, this._telemetryService, this._logService); this.raw.loadAddon(this._shellIntegrationAddon); this._xtermAddonLoader.importAddon('clipboard').then(ClipboardAddon => { this._clipboardAddon = this._instantiationService.createInstance(ClipboardAddon, undefined, { diff --git a/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts b/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts index ac776887732..72417812436 100644 --- a/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts +++ b/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts @@ -114,7 +114,15 @@ suite('XtermTerminal', () => { XTermBaseCtor = (await importAMDNodeModule('@xterm/xterm', 'lib/xterm.js')).Terminal; const capabilityStore = store.add(new TerminalCapabilityStore()); - xterm = store.add(instantiationService.createInstance(XtermTerminal, XTermBaseCtor, 80, 30, new TestXtermAddonImporter(), { getBackgroundColor: () => undefined }, capabilityStore, '', true)); + xterm = store.add(instantiationService.createInstance(XtermTerminal, XTermBaseCtor, { + cols: 80, + rows: 30, + xtermColorProvider: { getBackgroundColor: () => undefined }, + capabilities: capabilityStore, + shellIntegrationNonce: '', + disableShellIntegrationReporting: true, + xtermAddonImpoter: new TestXtermAddonImporter(), + })); TestWebglAddon.shouldThrow = false; TestWebglAddon.isEnabled = false; @@ -131,7 +139,15 @@ suite('XtermTerminal', () => { [PANEL_BACKGROUND]: '#ff0000', [SIDE_BAR_BACKGROUND]: '#00ff00' })); - xterm = store.add(instantiationService.createInstance(XtermTerminal, XTermBaseCtor, 80, 30, new TestXtermAddonImporter(), { getBackgroundColor: () => new Color(new RGBA(255, 0, 0)) }, store.add(new TerminalCapabilityStore()), '', true)); + xterm = store.add(instantiationService.createInstance(XtermTerminal, XTermBaseCtor, { + cols: 80, + rows: 30, + xtermAddonImpoter: new TestXtermAddonImporter(), + xtermColorProvider: { getBackgroundColor: () => new Color(new RGBA(255, 0, 0)) }, + capabilities: store.add(new TerminalCapabilityStore()), + shellIntegrationNonce: '', + disableShellIntegrationReporting: true, + })); strictEqual(xterm.raw.options.theme?.background, '#ff0000'); }); test('should react to and apply theme changes', () => { @@ -160,7 +176,15 @@ suite('XtermTerminal', () => { 'terminal.ansiBrightCyan': '#150000', 'terminal.ansiBrightWhite': '#160000', })); - xterm = store.add(instantiationService.createInstance(XtermTerminal, XTermBaseCtor, 80, 30, new TestXtermAddonImporter(), { getBackgroundColor: () => undefined }, store.add(new TerminalCapabilityStore()), '', true)); + xterm = store.add(instantiationService.createInstance(XtermTerminal, XTermBaseCtor, { + cols: 80, + rows: 30, + xtermAddonImpoter: new TestXtermAddonImporter(), + xtermColorProvider: { getBackgroundColor: () => undefined }, + capabilities: store.add(new TerminalCapabilityStore()), + shellIntegrationNonce: '', + disableShellIntegrationReporting: true + })); deepStrictEqual(xterm.raw.options.theme, { background: undefined, foreground: '#000200', diff --git a/src/vs/workbench/contrib/terminalContrib/accessibility/test/browser/bufferContentTracker.test.ts b/src/vs/workbench/contrib/terminalContrib/accessibility/test/browser/bufferContentTracker.test.ts index bd476ae6bdd..4ba44071ef7 100644 --- a/src/vs/workbench/contrib/terminalContrib/accessibility/test/browser/bufferContentTracker.test.ts +++ b/src/vs/workbench/contrib/terminalContrib/accessibility/test/browser/bufferContentTracker.test.ts @@ -79,7 +79,14 @@ suite('Buffer Content Tracker', () => { capabilities.add(TerminalCapability.NaiveCwdDetection, null!); } const TerminalCtor = (await importAMDNodeModule('@xterm/xterm', 'lib/xterm.js')).Terminal; - xterm = store.add(instantiationService.createInstance(XtermTerminal, TerminalCtor, 80, 30, undefined, { getBackgroundColor: () => undefined }, capabilities, '', true)); + xterm = store.add(instantiationService.createInstance(XtermTerminal, TerminalCtor, { + cols: 80, + rows: 30, + xtermColorProvider: { getBackgroundColor: () => undefined }, + capabilities, + shellIntegrationNonce: '', + disableShellIntegrationReporting: true + })); const container = document.createElement('div'); xterm.raw.open(container); configurationService = new TestConfigurationService({ terminal: { integrated: { tabs: { separator: ' - ', title: '${cwd}', description: '${cwd}' } } } }); From 1349a6790005222a7cc565b40e7f1f329f489af2 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sat, 28 Sep 2024 08:21:38 -0700 Subject: [PATCH 02/15] Make SI reporting and nonce options optional --- .../workbench/contrib/terminal/browser/terminalService.ts | 2 -- .../contrib/terminal/browser/xterm/xtermTerminal.ts | 6 +++--- .../terminal/test/browser/xterm/xtermTerminal.test.ts | 3 --- .../accessibility/test/browser/bufferContentTracker.test.ts | 1 - 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalService.ts b/src/vs/workbench/contrib/terminal/browser/terminalService.ts index 17344561636..d98416649fe 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalService.ts @@ -1028,8 +1028,6 @@ export class TerminalService extends Disposable implements ITerminalService { rows: options.rows, xtermColorProvider: options.colorProvider, capabilities: options.capabilities || new TerminalCapabilityStore(), - shellIntegrationNonce: '', - disableShellIntegrationReporting: false, }); if (options.readonly) { diff --git a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts index 888060b13f0..4d45fef651a 100644 --- a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts +++ b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts @@ -73,9 +73,9 @@ export interface IXtermTerminalOptions { /** The capabilities of the terminal. */ capabilities: ITerminalCapabilityStore; /** The shell integration nonce to verify data coming from SI is trustworthy. */ - shellIntegrationNonce: string; + shellIntegrationNonce?: string; /** Whether to disable shell integration telemetry reporting. */ - disableShellIntegrationReporting: boolean; + disableShellIntegrationReporting?: boolean; /** The object that imports xterm addons, set this to inject an importer in tests. */ xtermAddonImpoter?: XtermAddonImporter; } @@ -260,7 +260,7 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach this._decorationAddon = this._instantiationService.createInstance(DecorationAddon, this._capabilities); this._register(this._decorationAddon.onDidRequestRunCommand(e => this._onDidRequestRunCommand.fire(e))); this.raw.loadAddon(this._decorationAddon); - this._shellIntegrationAddon = new ShellIntegrationAddon(options.shellIntegrationNonce, options.disableShellIntegrationReporting, this._telemetryService, this._logService); + this._shellIntegrationAddon = new ShellIntegrationAddon(options.shellIntegrationNonce ?? '', options.disableShellIntegrationReporting, this._telemetryService, this._logService); this.raw.loadAddon(this._shellIntegrationAddon); this._xtermAddonLoader.importAddon('clipboard').then(ClipboardAddon => { this._clipboardAddon = this._instantiationService.createInstance(ClipboardAddon, undefined, { diff --git a/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts b/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts index 72417812436..af599c1c0ba 100644 --- a/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts +++ b/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts @@ -119,7 +119,6 @@ suite('XtermTerminal', () => { rows: 30, xtermColorProvider: { getBackgroundColor: () => undefined }, capabilities: capabilityStore, - shellIntegrationNonce: '', disableShellIntegrationReporting: true, xtermAddonImpoter: new TestXtermAddonImporter(), })); @@ -145,7 +144,6 @@ suite('XtermTerminal', () => { xtermAddonImpoter: new TestXtermAddonImporter(), xtermColorProvider: { getBackgroundColor: () => new Color(new RGBA(255, 0, 0)) }, capabilities: store.add(new TerminalCapabilityStore()), - shellIntegrationNonce: '', disableShellIntegrationReporting: true, })); strictEqual(xterm.raw.options.theme?.background, '#ff0000'); @@ -182,7 +180,6 @@ suite('XtermTerminal', () => { xtermAddonImpoter: new TestXtermAddonImporter(), xtermColorProvider: { getBackgroundColor: () => undefined }, capabilities: store.add(new TerminalCapabilityStore()), - shellIntegrationNonce: '', disableShellIntegrationReporting: true })); deepStrictEqual(xterm.raw.options.theme, { diff --git a/src/vs/workbench/contrib/terminalContrib/accessibility/test/browser/bufferContentTracker.test.ts b/src/vs/workbench/contrib/terminalContrib/accessibility/test/browser/bufferContentTracker.test.ts index 4ba44071ef7..add5939721e 100644 --- a/src/vs/workbench/contrib/terminalContrib/accessibility/test/browser/bufferContentTracker.test.ts +++ b/src/vs/workbench/contrib/terminalContrib/accessibility/test/browser/bufferContentTracker.test.ts @@ -84,7 +84,6 @@ suite('Buffer Content Tracker', () => { rows: 30, xtermColorProvider: { getBackgroundColor: () => undefined }, capabilities, - shellIntegrationNonce: '', disableShellIntegrationReporting: true })); const container = document.createElement('div'); From ba6feb59bc05bc1ea8cbab8e19aeeb07db134f15 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:19:24 +0200 Subject: [PATCH 03/15] SCM - Remove onDidChange event (#230100) --- src/vs/workbench/api/browser/mainThreadSCM.ts | 4 ---- src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts | 3 +-- src/vs/workbench/contrib/scm/common/scm.ts | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadSCM.ts b/src/vs/workbench/api/browser/mainThreadSCM.ts index d2a6492f93e..fbb4340c5ec 100644 --- a/src/vs/workbench/api/browser/mainThreadSCM.ts +++ b/src/vs/workbench/api/browser/mainThreadSCM.ts @@ -287,9 +287,6 @@ class MainThreadSCMProvider implements ISCMProvider, QuickDiffProvider { private readonly _actionButton = observableValue(this, undefined); get actionButton(): IObservable { return this._actionButton; } - private readonly _onDidChange = new Emitter(); - readonly onDidChange: Event = this._onDidChange.event; - private _quickDiff: IDisposable | undefined; public readonly isSCM: boolean = true; @@ -319,7 +316,6 @@ class MainThreadSCMProvider implements ISCMProvider, QuickDiffProvider { $updateSourceControl(features: SCMProviderFeatures): void { this.features = { ...this.features, ...features }; - this._onDidChange.fire(); if (typeof features.commitTemplate !== 'undefined') { this._commitTemplate.set(features.commitTemplate, undefined); diff --git a/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts b/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts index 87c9e64dd54..17a6f1a85fb 100644 --- a/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts @@ -1289,8 +1289,7 @@ export class DirtyDiffModel extends Disposable { this.repositoryDisposables.add(disposables); disposables.add(toDisposable(() => this.repositoryDisposables.delete(disposables))); - const onDidChange = Event.any(repository.provider.onDidChange, repository.provider.onDidChangeResources); - disposables.add(onDidChange(this.triggerDiff, this)); + disposables.add(repository.provider.onDidChangeResources(this.triggerDiff, this)); const onDidRemoveThis = Event.filter(this.scmService.onDidRemoveRepository, r => r === repository); disposables.add(onDidRemoveThis(() => dispose(disposables), null)); diff --git a/src/vs/workbench/contrib/scm/common/scm.ts b/src/vs/workbench/contrib/scm/common/scm.ts index ad57c46138c..74623463fa5 100644 --- a/src/vs/workbench/contrib/scm/common/scm.ts +++ b/src/vs/workbench/contrib/scm/common/scm.ts @@ -80,7 +80,6 @@ export interface ISCMProvider extends IDisposable { readonly acceptInputCommand?: Command; readonly actionButton: IObservable; readonly statusBarCommands: IObservable; - readonly onDidChange: Event; getOriginalResource(uri: URI): Promise; } From eec0d205c8db0ed87d9adee98f619a452a7563f9 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Mon, 30 Sep 2024 10:44:47 +0200 Subject: [PATCH 04/15] Edit Context : Using border instead of background color for composition (#229851) * registering new colors to use for the composition * removing background color and using border instead --- build/lib/stylelint/vscode-known-variables.json | 1 + .../controller/editContext/native/nativeEditContext.css | 5 +++-- src/vs/platform/theme/common/colors/editorColors.ts | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build/lib/stylelint/vscode-known-variables.json b/build/lib/stylelint/vscode-known-variables.json index 56aa02ebfb7..8e5ac9f6143 100644 --- a/build/lib/stylelint/vscode-known-variables.json +++ b/build/lib/stylelint/vscode-known-variables.json @@ -150,6 +150,7 @@ "--vscode-editor-placeholder-foreground", "--vscode-editor-rangeHighlightBackground", "--vscode-editor-rangeHighlightBorder", + "--vscode-editor-compositionBorder", "--vscode-editor-selectionBackground", "--vscode-editor-selectionForeground", "--vscode-editor-selectionHighlightBackground", diff --git a/src/vs/editor/browser/controller/editContext/native/nativeEditContext.css b/src/vs/editor/browser/controller/editContext/native/nativeEditContext.css index c4587dc8939..7095c41aa93 100644 --- a/src/vs/editor/browser/controller/editContext/native/nativeEditContext.css +++ b/src/vs/editor/browser/controller/editContext/native/nativeEditContext.css @@ -15,12 +15,13 @@ .monaco-editor .edit-context-composition-none { background-color: transparent; + border-bottom: none; } .monaco-editor .edit-context-composition-secondary { - background-color: var(--vscode-editor-selectionBackground); + border-bottom: 1px solid var(--vscode-editor-compositionBorder); } .monaco-editor .edit-context-composition-primary { - background-color: var(--vscode-editor-selectionHighlightBackground); + border-bottom: 2px solid var(--vscode-editor-compositionBorder); } diff --git a/src/vs/platform/theme/common/colors/editorColors.ts b/src/vs/platform/theme/common/colors/editorColors.ts index 567343b0055..a45e35a5c84 100644 --- a/src/vs/platform/theme/common/colors/editorColors.ts +++ b/src/vs/platform/theme/common/colors/editorColors.ts @@ -134,6 +134,10 @@ export const editorSelectionHighlightBorder = registerColor('editor.selectionHig { light: null, dark: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize('editorSelectionHighlightBorder', "Border color for regions with the same content as the selection.")); +export const editorCompositionBorder = registerColor('editor.compositionBorder', + { light: '#000000', dark: '#ffffff', hcLight: '#000000', hcDark: '#ffffff' }, + nls.localize('editorCompositionBorder', "The border color for the composition.")); + // ----- editor find From fd58e9e47a0e14a9b240cb6cf01253fa56761e68 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:48:45 +0200 Subject: [PATCH 05/15] SCM - add exception handling for the history provider methods (#230102) --- src/vs/workbench/api/common/extHostSCM.ts | 48 ++++++++++++++++++----- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/api/common/extHostSCM.ts b/src/vs/workbench/api/common/extHostSCM.ts index d99bc796dd0..85e5cba5394 100644 --- a/src/vs/workbench/api/common/extHostSCM.ts +++ b/src/vs/workbench/api/common/extHostSCM.ts @@ -1007,26 +1007,54 @@ export class ExtHostSCM implements ExtHostSCMShape { } async $resolveHistoryItemRefsCommonAncestor(sourceControlHandle: number, historyItemRefs: string[], token: CancellationToken): Promise { - const historyProvider = this._sourceControls.get(sourceControlHandle)?.historyProvider; - return await historyProvider?.resolveHistoryItemRefsCommonAncestor(historyItemRefs, token) ?? undefined; + try { + const historyProvider = this._sourceControls.get(sourceControlHandle)?.historyProvider; + const ancestor = await historyProvider?.resolveHistoryItemRefsCommonAncestor(historyItemRefs, token); + + return ancestor ?? undefined; + } + catch (err) { + this.logService.error('ExtHostSCM#$resolveHistoryItemRefsCommonAncestor', err); + return undefined; + } } async $provideHistoryItemRefs(sourceControlHandle: number, historyItemRefs: string[] | undefined, token: CancellationToken): Promise { - const historyProvider = this._sourceControls.get(sourceControlHandle)?.historyProvider; - const refs = await historyProvider?.provideHistoryItemRefs(historyItemRefs, token); + try { + const historyProvider = this._sourceControls.get(sourceControlHandle)?.historyProvider; + const refs = await historyProvider?.provideHistoryItemRefs(historyItemRefs, token); - return refs?.map(ref => ({ ...ref, icon: getHistoryItemIconDto(ref.icon) })) ?? undefined; + return refs?.map(ref => ({ ...ref, icon: getHistoryItemIconDto(ref.icon) })) ?? undefined; + } + catch (err) { + this.logService.error('ExtHostSCM#$provideHistoryItemRefs', err); + return undefined; + } } async $provideHistoryItems(sourceControlHandle: number, options: any, token: CancellationToken): Promise { - const historyProvider = this._sourceControls.get(sourceControlHandle)?.historyProvider; - const historyItems = await historyProvider?.provideHistoryItems(options, token); + try { + const historyProvider = this._sourceControls.get(sourceControlHandle)?.historyProvider; + const historyItems = await historyProvider?.provideHistoryItems(options, token); - return historyItems?.map(item => toSCMHistoryItemDto(item)) ?? undefined; + return historyItems?.map(item => toSCMHistoryItemDto(item)) ?? undefined; + } + catch (err) { + this.logService.error('ExtHostSCM#$provideHistoryItems', err); + return undefined; + } } async $provideHistoryItemChanges(sourceControlHandle: number, historyItemId: string, historyItemParentId: string | undefined, token: CancellationToken): Promise { - const historyProvider = this._sourceControls.get(sourceControlHandle)?.historyProvider; - return await historyProvider?.provideHistoryItemChanges(historyItemId, historyItemParentId, token) ?? undefined; + try { + const historyProvider = this._sourceControls.get(sourceControlHandle)?.historyProvider; + const changes = await historyProvider?.provideHistoryItemChanges(historyItemId, historyItemParentId, token); + + return changes ?? undefined; + } + catch (err) { + this.logService.error('ExtHostSCM#$provideHistoryItemChanges', err); + return undefined; + } } } From 1c45703db2d3eca3feac95d8ebd4ff4d6f3ea83e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 30 Sep 2024 11:13:55 +0200 Subject: [PATCH 06/15] debt - update colors (#230103) --- build/lib/stylelint/vscode-known-variables.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build/lib/stylelint/vscode-known-variables.json b/build/lib/stylelint/vscode-known-variables.json index 8e5ac9f6143..3f82544faa2 100644 --- a/build/lib/stylelint/vscode-known-variables.json +++ b/build/lib/stylelint/vscode-known-variables.json @@ -17,6 +17,10 @@ "--vscode-activityBarTop-dropBorder", "--vscode-activityBarTop-foreground", "--vscode-activityBarTop-inactiveForeground", + "--vscode-activityErrorBadge-background", + "--vscode-activityErrorBadge-foreground", + "--vscode-activityWarningBadge-background", + "--vscode-activityWarningBadge-foreground", "--vscode-badge-background", "--vscode-badge-foreground", "--vscode-banner-background", @@ -547,14 +551,16 @@ "--vscode-scmGraph-foreground1", "--vscode-scmGraph-foreground2", "--vscode-scmGraph-foreground3", + "--vscode-scmGraph-foreground4", + "--vscode-scmGraph-foreground5", "--vscode-scmGraph-historyItemBaseRefColor", - "--vscode-scmGraph-historyItemRefColor", - "--vscode-scmGraph-historyItemRemoteRefColor", "--vscode-scmGraph-historyItemHoverAdditionsForeground", "--vscode-scmGraph-historyItemHoverDefaultLabelBackground", "--vscode-scmGraph-historyItemHoverDefaultLabelForeground", "--vscode-scmGraph-historyItemHoverDeletionsForeground", "--vscode-scmGraph-historyItemHoverLabelForeground", + "--vscode-scmGraph-historyItemRefColor", + "--vscode-scmGraph-historyItemRemoteRefColor", "--vscode-scrollbar-shadow", "--vscode-scrollbarSlider-activeBackground", "--vscode-scrollbarSlider-background", @@ -882,4 +888,4 @@ "--widget-color", "--text-link-decoration" ] -} +} \ No newline at end of file From 4a8c46ede06a9f3c9e3bdb958959d9ed365ebb72 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Mon, 30 Sep 2024 11:18:03 +0200 Subject: [PATCH 07/15] Adding box around composition in light and dark high contrast themes (#230104) adding special CSS for light and dark high constrast themes --- .../editContext/native/nativeEditContext.css | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/browser/controller/editContext/native/nativeEditContext.css b/src/vs/editor/browser/controller/editContext/native/nativeEditContext.css index 7095c41aa93..bfdb765a37b 100644 --- a/src/vs/editor/browser/controller/editContext/native/nativeEditContext.css +++ b/src/vs/editor/browser/controller/editContext/native/nativeEditContext.css @@ -18,10 +18,18 @@ border-bottom: none; } -.monaco-editor .edit-context-composition-secondary { +.monaco-editor :not(.hc-black, .hc-light) .edit-context-composition-secondary { border-bottom: 1px solid var(--vscode-editor-compositionBorder); } -.monaco-editor .edit-context-composition-primary { +.monaco-editor :not(.hc-black, .hc-light) .edit-context-composition-primary { border-bottom: 2px solid var(--vscode-editor-compositionBorder); } + +.monaco-editor :is(.hc-black, .hc-light) .edit-context-composition-secondary { + border: 1px solid var(--vscode-editor-compositionBorder); +} + +.monaco-editor :is(.hc-black, .hc-light) .edit-context-composition-primary { + border: 2px solid var(--vscode-editor-compositionBorder); +} From 84c18c543e3a506bc08153c423c089ac98a17a82 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 30 Sep 2024 11:20:59 +0200 Subject: [PATCH 08/15] esm - more cleanup of rules and files (#230083) --- .eslintrc.json | 12 +- build/buildfile.js | 21 ++-- src/bootstrap-esm.ts | 2 - src/bootstrap-fork.ts | 2 - src/bootstrap-import.ts | 2 - src/bootstrap-meta.ts | 2 - src/bootstrap-node.ts | 2 - src/bootstrap-window.ts | 39 +++--- src/cli.ts | 2 - src/main.ts | 2 - src/server-cli.ts | 2 - src/server-main.ts | 2 - src/tsconfig.json | 27 +---- src/vs/base/browser/defaultWorkerFactory.ts | 12 +- src/vs/base/common/worker/simpleWorker.ts | 8 +- .../processExplorer/processExplorer.ts | 11 +- .../processExplorer/processExplorerMain.ts | 4 + .../electron-sandbox/workbench/workbench.ts | 114 +++++++++--------- ...orker.esm.ts => editorSimpleWorkerMain.ts} | 0 .../standalone/browser/standaloneServices.ts | 2 +- .../standalone/browser/standaloneWebWorker.ts | 2 +- ...er.esm.ts => profileAnalysisWorkerMain.ts} | 0 .../window/electron-sandbox/window.ts | 11 +- ...rker.esm.ts => extensionHostWorkerMain.ts} | 0 .../issue/electron-sandbox/issueReporter.ts | 11 +- .../electron-sandbox/issueReporterMain.ts | 5 +- ...ker.esm.ts => notebookSimpleWorkerMain.ts} | 0 ...puter.esm.ts => outputLinkComputerMain.ts} | 0 .../electron-sandbox/desktop.main.ts | 4 + .../browser/webWorkerExtensionHost.ts | 2 +- ...s => languageDetectionSimpleWorkerMain.ts} | 0 ...leSearch.esm.ts => localFileSearchMain.ts} | 0 ... textMateTokenizationWorker.workerMain.ts} | 0 33 files changed, 142 insertions(+), 161 deletions(-) rename src/vs/editor/common/services/{editorSimpleWorker.esm.ts => editorSimpleWorkerMain.ts} (100%) rename src/vs/platform/profiling/electron-sandbox/{profileAnalysisWorker.esm.ts => profileAnalysisWorkerMain.ts} (100%) rename src/vs/workbench/api/worker/{extensionHostWorker.esm.ts => extensionHostWorkerMain.ts} (100%) rename src/vs/workbench/contrib/notebook/common/services/{notebookSimpleWorker.esm.ts => notebookSimpleWorkerMain.ts} (100%) rename src/vs/workbench/contrib/output/common/{outputLinkComputer.esm.ts => outputLinkComputerMain.ts} (100%) rename src/vs/workbench/services/languageDetection/browser/{languageDetectionSimpleWorker.esm.ts => languageDetectionSimpleWorkerMain.ts} (100%) rename src/vs/workbench/services/search/worker/{localFileSearch.esm.ts => localFileSearchMain.ts} (100%) rename src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/{textMateTokenizationWorker.worker.esm.ts => textMateTokenizationWorker.workerMain.ts} (100%) diff --git a/.eslintrc.json b/.eslintrc.json index 27a94df6dcc..a78e8562a59 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1133,8 +1133,18 @@ "restrictions": [] }, { - "target": "src/{bootstrap-cli.ts,bootstrap-esm.ts,bootstrap-fork.ts,bootstrap-node.ts,bootstrap-import.ts,bootstrap-meta.ts,bootstrap-window.ts,cli.ts,main.ts,server-cli.ts,server-main.ts,bootstrap-server.ts}", + "target": "src/bootstrap-window.ts", "restrictions": [] + }, + { + "target": "src/{bootstrap-cli.ts,bootstrap-esm.ts,bootstrap-fork.ts,bootstrap-import.ts,bootstrap-meta.ts,bootstrap-node.ts,bootstrap-server.ts,cli.ts,main.ts,server-cli.ts,server-main.ts}", + "restrictions": [ + "vs/**/common/*", + "vs/**/node/*", + "vs/nls.js", + "src/*.js", + "*" // node.js + ] } ] } diff --git a/build/buildfile.js b/build/buildfile.js index f4a2a5e322a..eee9ecbcefd 100644 --- a/build/buildfile.js +++ b/build/buildfile.js @@ -26,20 +26,17 @@ function createModuleDescription(name, exclude) { * @param {string} name */ function createEditorWorkerModuleDescription(name) { - const description = createModuleDescription(name, ['vs/base/common/worker/simpleWorker', 'vs/editor/common/services/editorSimpleWorker']); - description.name = `${description.name}.esm`; - - return description; + return createModuleDescription(name, ['vs/base/common/worker/simpleWorker', 'vs/editor/common/services/editorSimpleWorker']); } -exports.workerEditor = createEditorWorkerModuleDescription('vs/editor/common/services/editorSimpleWorker'); -exports.workerExtensionHost = createEditorWorkerModuleDescription('vs/workbench/api/worker/extensionHostWorker'); -exports.workerNotebook = createEditorWorkerModuleDescription('vs/workbench/contrib/notebook/common/services/notebookSimpleWorker'); -exports.workerLanguageDetection = createEditorWorkerModuleDescription('vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker'); -exports.workerLocalFileSearch = createEditorWorkerModuleDescription('vs/workbench/services/search/worker/localFileSearch'); -exports.workerProfileAnalysis = createEditorWorkerModuleDescription('vs/platform/profiling/electron-sandbox/profileAnalysisWorker'); -exports.workerOutputLinks = createEditorWorkerModuleDescription('vs/workbench/contrib/output/common/outputLinkComputer'); -exports.workerBackgroundTokenization = createEditorWorkerModuleDescription('vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker'); +exports.workerEditor = createEditorWorkerModuleDescription('vs/editor/common/services/editorSimpleWorkerMain'); +exports.workerExtensionHost = createEditorWorkerModuleDescription('vs/workbench/api/worker/extensionHostWorkerMain'); +exports.workerNotebook = createEditorWorkerModuleDescription('vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain'); +exports.workerLanguageDetection = createEditorWorkerModuleDescription('vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorkerMain'); +exports.workerLocalFileSearch = createEditorWorkerModuleDescription('vs/workbench/services/search/worker/localFileSearchMain'); +exports.workerProfileAnalysis = createEditorWorkerModuleDescription('vs/platform/profiling/electron-sandbox/profileAnalysisWorkerMain'); +exports.workerOutputLinks = createEditorWorkerModuleDescription('vs/workbench/contrib/output/common/outputLinkComputerMain'); +exports.workerBackgroundTokenization = createEditorWorkerModuleDescription('vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.workerMain'); exports.workbenchDesktop = [ createModuleDescription('vs/workbench/contrib/debug/node/telemetryApp'), diff --git a/src/bootstrap-esm.ts b/src/bootstrap-esm.ts index b0c6d142a4f..7256c0230e5 100644 --- a/src/bootstrap-esm.ts +++ b/src/bootstrap-esm.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* eslint-disable local/code-import-patterns */ - import * as path from 'path'; import * as fs from 'fs'; import { fileURLToPath } from 'url'; diff --git a/src/bootstrap-fork.ts b/src/bootstrap-fork.ts index 3303d442ee7..aa523399126 100644 --- a/src/bootstrap-fork.ts +++ b/src/bootstrap-fork.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* eslint-disable local/code-import-patterns */ - import * as performance from './vs/base/common/performance.js'; import { removeGlobalNodeJsModuleLookupPaths, devInjectNodeModuleLookupPath } from './bootstrap-node.js'; import { load } from './bootstrap-esm.js'; diff --git a/src/bootstrap-import.ts b/src/bootstrap-import.ts index c280170efb9..8869058159d 100644 --- a/src/bootstrap-import.ts +++ b/src/bootstrap-import.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* eslint-disable local/code-import-patterns */ - // ********************************************************************* // * * // * We need this to redirect to node_modules from the remote-folder. * diff --git a/src/bootstrap-meta.ts b/src/bootstrap-meta.ts index c17716c8d31..2e704fd5704 100644 --- a/src/bootstrap-meta.ts +++ b/src/bootstrap-meta.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* eslint-disable local/code-import-patterns */ - import { createRequire } from 'node:module'; import type { IProductConfiguration } from './vs/base/common/product.js'; diff --git a/src/bootstrap-node.ts b/src/bootstrap-node.ts index 0fc29f14d2c..c0d5cd3693c 100644 --- a/src/bootstrap-node.ts +++ b/src/bootstrap-node.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* eslint-disable local/code-import-patterns */ - import * as path from 'path'; import * as fs from 'fs'; import { fileURLToPath } from 'url'; diff --git a/src/bootstrap-window.ts b/src/bootstrap-window.ts index c9f49fe1113..1b2cedf68b4 100644 --- a/src/bootstrap-window.ts +++ b/src/bootstrap-window.ts @@ -8,32 +8,27 @@ (function () { type ISandboxConfiguration = import('vs/base/parts/sandbox/common/sandboxTypes.js').ISandboxConfiguration; + type ILoadResult = import('vs/platform/window/electron-sandbox/window.js').ILoadResult; type ILoadOptions = import('vs/platform/window/electron-sandbox/window.js').ILoadOptions; type IMainWindowSandboxGlobals = import('./vs/base/parts/sandbox/electron-sandbox/globals.js').IMainWindowSandboxGlobals; const preloadGlobals: IMainWindowSandboxGlobals = (window as any).vscode; // defined by preload.ts const safeProcess = preloadGlobals.process; - // increase number of stack frames(from 10, https://github.com/v8/v8/wiki/Stack-Trace-API) - Error.stackTraceLimit = 100; - - async function load(esModule: string, resultCallback: (result: any, configuration: T) => Promise | undefined, options: ILoadOptions): Promise { + async function load(esModule: string, options: ILoadOptions): Promise> { // Window Configuration from Preload Script const configuration = await resolveWindowConfiguration(); - // Signal can modify DOM - options?.canModifyDOM?.(configuration); + // Signal before import() + options?.beforeImport?.(configuration); // Developer settings - const { enableDeveloperKeybindings, removeDeveloperKeybindingsAfterLoad, developerDeveloperKeybindingsDisposable } = setupDeveloperKeybindings(configuration, options); + const { enableDeveloperKeybindings, removeDeveloperKeybindingsAfterLoad, developerDeveloperKeybindingsDisposable, forceDisableShowDevtoolsOnError } = setupDeveloperKeybindings(configuration, options); // NLS setupNLS(configuration); - // Signal before import() - options?.beforeImport?.(configuration); - // Compute base URL and set as global const baseUrl = new URL(`${fileUriFromPath(configuration.appRoot, { isWindows: safeProcess.platform === 'win32', scheme: 'vscode-file', fallbackAuthority: 'vscode-app' })}/out/`); globalThis._VSCODE_FILE_ROOT = baseUrl.toString(); @@ -45,16 +40,15 @@ try { const result = await import(new URL(`${esModule}.js`, baseUrl).href); - const callbackResult = resultCallback(result, configuration); - if (callbackResult instanceof Promise) { - await callbackResult; - - if (developerDeveloperKeybindingsDisposable && removeDeveloperKeybindingsAfterLoad) { - developerDeveloperKeybindingsDisposable(); - } + if (developerDeveloperKeybindingsDisposable && removeDeveloperKeybindingsAfterLoad) { + developerDeveloperKeybindingsDisposable(); } + + return { result, configuration }; } catch (error) { - onUnexpectedError(error, enableDeveloperKeybindings); + onUnexpectedError(error, enableDeveloperKeybindings && !forceDisableShowDevtoolsOnError); + + throw error; } } @@ -74,11 +68,13 @@ const { forceEnableDeveloperKeybindings, disallowReloadKeybinding, - removeDeveloperKeybindingsAfterLoad + removeDeveloperKeybindingsAfterLoad, + forceDisableShowDevtoolsOnError } = typeof options?.configureDeveloperSettings === 'function' ? options.configureDeveloperSettings(configuration) : { forceEnableDeveloperKeybindings: false, disallowReloadKeybinding: false, - removeDeveloperKeybindingsAfterLoad: false + removeDeveloperKeybindingsAfterLoad: false, + forceDisableShowDevtoolsOnError: false }; const isDev = !!safeProcess.env['VSCODE_DEV']; @@ -91,7 +87,8 @@ return { enableDeveloperKeybindings, removeDeveloperKeybindingsAfterLoad, - developerDeveloperKeybindingsDisposable + developerDeveloperKeybindingsDisposable, + forceDisableShowDevtoolsOnError }; } diff --git a/src/cli.ts b/src/cli.ts index 8ffb6fd1426..cead01847d6 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* eslint-disable local/code-import-patterns */ - import './bootstrap-cli.js'; // this MUST come before other imports as it changes global state import * as path from 'path'; import { fileURLToPath } from 'url'; diff --git a/src/main.ts b/src/main.ts index 3d08e8d6417..f676dca148c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* eslint-disable local/code-import-patterns */ - import * as path from 'path'; import * as fs from 'original-fs'; import * as os from 'os'; diff --git a/src/server-cli.ts b/src/server-cli.ts index c9de28372e4..fabe8900b3f 100644 --- a/src/server-cli.ts +++ b/src/server-cli.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* eslint-disable local/code-import-patterns */ - import './bootstrap-server.js'; // this MUST come before other imports as it changes global state import * as path from 'path'; import { fileURLToPath } from 'url'; diff --git a/src/server-main.ts b/src/server-main.ts index 3b6f45f2f96..d70a856f854 100644 --- a/src/server-main.ts +++ b/src/server-main.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* eslint-disable local/code-import-patterns */ - import './bootstrap-server.js'; // this MUST come before other imports as it changes global state import * as path from 'path'; import * as http from 'http'; diff --git a/src/tsconfig.json b/src/tsconfig.json index 6865667ad28..88d3daa0f29 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -26,31 +26,10 @@ ] }, "include": [ - "./bootstrap-esm.ts", - "./bootstrap-cli.ts", - "./bootstrap-fork.ts", - "./bootstrap-import.ts", - "./bootstrap-meta.ts", - "./bootstrap-node.ts", - "./bootstrap-server.ts", - "./bootstrap-window.ts", - "./cli.ts", - "./main.ts", - "./server-main.ts", - "./server-cli.ts", - "./vs/base/common/jsonc.ts", - "./vs/base/common/performance.ts", - "./vs/base/node/unc.ts", - "./vs/base/node/nls.ts", - "./vs/platform/environment/node/userDataPath.ts", - "./vs/base/parts/sandbox/electron-sandbox/preload-aux.ts", - "./vs/base/parts/sandbox/electron-sandbox/preload.ts", - "./vs/code/electron-sandbox/processExplorer/processExplorer.ts", - "./vs/code/electron-sandbox/workbench/workbench.ts", - "./vs/workbench/contrib/issue/electron-sandbox/issueReporter.ts", + "./*.ts", "./typings", "./vs/**/*.ts", - "vscode-dts/vscode.proposed.*.d.ts", - "vscode-dts/vscode.d.ts" + "./vscode-dts/vscode.proposed.*.d.ts", + "./vscode-dts/vscode.d.ts" ] } diff --git a/src/vs/base/browser/defaultWorkerFactory.ts b/src/vs/base/browser/defaultWorkerFactory.ts index c72296fd700..f6054bf6402 100644 --- a/src/vs/base/browser/defaultWorkerFactory.ts +++ b/src/vs/base/browser/defaultWorkerFactory.ts @@ -119,7 +119,7 @@ class WebWorker extends Disposable implements IWorker { private readonly label: string; private worker: Promise | null; - constructor(esmWorkerLocation: URI | undefined, amdModuleId: string, id: number, label: string, onMessageCallback: IWorkerCallback, onErrorCallback: (err: any) => void) { + constructor(esmWorkerLocation: URI | undefined, moduleId: string, id: number, label: string, onMessageCallback: IWorkerCallback, onErrorCallback: (err: any) => void) { super(); this.id = id; this.label = label; @@ -129,7 +129,7 @@ class WebWorker extends Disposable implements IWorker { } else { this.worker = Promise.resolve(workerOrPromise); } - this.postMessage(amdModuleId, []); + this.postMessage(moduleId, []); this.worker.then((w) => { w.onmessage = function (ev) { onMessageCallback(ev.data); @@ -171,10 +171,10 @@ export class WorkerDescriptor implements IWorkerDescriptor { public readonly esmModuleLocation: URI | undefined; constructor( - public readonly amdModuleId: string, + public readonly moduleId: string, readonly label: string | undefined, ) { - this.esmModuleLocation = FileAccess.asBrowserUri(`${amdModuleId}.esm.js` as AppResourcePath); + this.esmModuleLocation = FileAccess.asBrowserUri(`${moduleId}Main.js` as AppResourcePath); } } @@ -194,7 +194,7 @@ class DefaultWorkerFactory implements IWorkerFactory { throw this._webWorkerFailedBeforeError; } - return new WebWorker(desc.esmModuleLocation, desc.amdModuleId, workerId, desc.label || 'anonymous' + workerId, onMessageCallback, (err) => { + return new WebWorker(desc.esmModuleLocation, desc.moduleId, workerId, desc.label || 'anonymous' + workerId, onMessageCallback, (err) => { logOnceWebWorkerWarning(err); this._webWorkerFailedBeforeError = err; onErrorCallback(err); @@ -202,7 +202,7 @@ class DefaultWorkerFactory implements IWorkerFactory { } } -export function createWebWorker(amdModuleId: string, label: string | undefined): IWorkerClient; +export function createWebWorker(moduleId: string, label: string | undefined): IWorkerClient; export function createWebWorker(workerDescriptor: IWorkerDescriptor): IWorkerClient; export function createWebWorker(arg0: string | IWorkerDescriptor, arg1?: string | undefined): IWorkerClient { const workerDescriptor = (typeof arg0 === 'string' ? new WorkerDescriptor(arg0, arg1) : arg0); diff --git a/src/vs/base/common/worker/simpleWorker.ts b/src/vs/base/common/worker/simpleWorker.ts index 6b55d53d1e1..70a328db53f 100644 --- a/src/vs/base/common/worker/simpleWorker.ts +++ b/src/vs/base/common/worker/simpleWorker.ts @@ -29,7 +29,7 @@ export interface IWorkerFactory { } export interface IWorkerDescriptor { - readonly amdModuleId: string; + readonly moduleId: string; readonly esmModuleLocation: URI | undefined; readonly label: string | undefined; } @@ -332,7 +332,7 @@ export class SimpleWorkerClient extends Disposable implements this._worker = this._register(workerFactory.create( { - amdModuleId: 'vs/base/common/worker/simpleWorker', + moduleId: 'vs/base/common/worker/simpleWorker', esmModuleLocation: workerDescriptor.esmModuleLocation, label: workerDescriptor.label }, @@ -375,12 +375,12 @@ export class SimpleWorkerClient extends Disposable implements this._onModuleLoaded = this._protocol.sendMessage(DEFAULT_CHANNEL, INITIALIZE, [ this._worker.getId(), JSON.parse(JSON.stringify(loaderConfiguration)), - workerDescriptor.amdModuleId, + workerDescriptor.moduleId, ]); this.proxy = this._protocol.createProxyToRemoteChannel(DEFAULT_CHANNEL, async () => { await this._onModuleLoaded; }); this._onModuleLoaded.catch((e) => { - this._onError('Worker failed to load ' + workerDescriptor.amdModuleId, e); + this._onError('Worker failed to load ' + workerDescriptor.moduleId, e); }); } diff --git a/src/vs/code/electron-sandbox/processExplorer/processExplorer.ts b/src/vs/code/electron-sandbox/processExplorer/processExplorer.ts index 11c86bbfe92..6df8c102be9 100644 --- a/src/vs/code/electron-sandbox/processExplorer/processExplorer.ts +++ b/src/vs/code/electron-sandbox/processExplorer/processExplorer.ts @@ -5,18 +5,21 @@ /* eslint-disable no-restricted-globals */ -(function () { +(async function () { type IBootstrapWindow = import('vs/platform/window/electron-sandbox/window.js').IBootstrapWindow; + type IProcessExplorerMain = import('vs/code/electron-sandbox/processExplorer/processExplorerMain.js').IProcessExplorerMain; + type ProcessExplorerWindowConfiguration = import('vs/platform/issue/common/issue.js').ProcessExplorerWindowConfiguration; + const bootstrapWindow: IBootstrapWindow = (window as any).MonacoBootstrapWindow; // defined by bootstrap-window.ts - bootstrapWindow.load('vs/code/electron-sandbox/processExplorer/processExplorerMain', function (processExplorer, configuration) { - return processExplorer.startup(configuration); - }, { + const { result, configuration } = await bootstrapWindow.load('vs/code/electron-sandbox/processExplorer/processExplorerMain', { configureDeveloperSettings: function () { return { forceEnableDeveloperKeybindings: true }; }, }); + + result.startup(configuration); }()); diff --git a/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts b/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts index 6ee7d3e2963..d9f79c61fbb 100644 --- a/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts +++ b/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts @@ -591,6 +591,10 @@ function createCodiconStyleSheet() { delayer.schedule(); } +export interface IProcessExplorerMain { + startup(configuration: ProcessExplorerWindowConfiguration): void; +} + export function startup(configuration: ProcessExplorerWindowConfiguration): void { const platformClass = configuration.data.platform === 'win32' ? 'windows' : configuration.data.platform === 'linux' ? 'linux' : 'mac'; mainWindow.document.body.classList.add(platformClass); // used by our fonts diff --git a/src/vs/code/electron-sandbox/workbench/workbench.ts b/src/vs/code/electron-sandbox/workbench/workbench.ts index 011514bdbfb..280cee11697 100644 --- a/src/vs/code/electron-sandbox/workbench/workbench.ts +++ b/src/vs/code/electron-sandbox/workbench/workbench.ts @@ -5,72 +5,22 @@ /* eslint-disable no-restricted-globals */ -(function () { - - type INativeWindowConfiguration = import('vs/platform/window/common/window.ts').INativeWindowConfiguration; - type NativeParsedArgs = import('vs/platform/environment/common/argv.js').NativeParsedArgs; - type IBootstrapWindow = import('vs/platform/window/electron-sandbox/window.js').IBootstrapWindow; - type IMainWindowSandboxGlobals = import('vs/base/parts/sandbox/electron-sandbox/globals.js').IMainWindowSandboxGlobals; - - const bootstrapWindow: IBootstrapWindow = (window as any).MonacoBootstrapWindow; // defined by bootstrap-window.ts - const preloadGlobals: IMainWindowSandboxGlobals = (window as any).vscode; // defined by preload.ts +(async function () { // Add a perf entry right from the top performance.mark('code/didStartRenderer'); - // Load workbench main JS and CSS all in parallel. This is an - // optimization to prevent a waterfall of loading to happen, because - // we know for a fact that workbench.desktop.main will depend on - // the related CSS counterpart. - bootstrapWindow.load('vs/workbench/workbench.desktop.main', - function (desktopMain, configuration) { + type INativeWindowConfiguration = import('vs/platform/window/common/window.ts').INativeWindowConfiguration; + type IBootstrapWindow = import('vs/platform/window/electron-sandbox/window.js').IBootstrapWindow; + type IMainWindowSandboxGlobals = import('vs/base/parts/sandbox/electron-sandbox/globals.js').IMainWindowSandboxGlobals; + type IDesktopMain = import('vs/workbench/electron-sandbox/desktop.main.js').IDesktopMain; - // Mark start of workbench - performance.mark('code/didLoadWorkbenchMain'); + const bootstrapWindow: IBootstrapWindow = (window as any).MonacoBootstrapWindow; // defined by bootstrap-window.ts + const preloadGlobals: IMainWindowSandboxGlobals = (window as any).vscode; // defined by preload.ts - return desktopMain.main(configuration); - }, - { - configureDeveloperSettings: function (windowConfig) { - return { - // disable automated devtools opening on error when running extension tests - // as this can lead to nondeterministic test execution (devtools steals focus) - forceDisableShowDevtoolsOnError: typeof windowConfig.extensionTestsPath === 'string' || windowConfig['enable-smoke-test-driver'] === true, - // enable devtools keybindings in extension development window - forceEnableDeveloperKeybindings: Array.isArray(windowConfig.extensionDevelopmentPath) && windowConfig.extensionDevelopmentPath.length > 0, - removeDeveloperKeybindingsAfterLoad: true - }; - }, - canModifyDOM: function (windowConfig) { - showSplash(windowConfig); - }, - beforeImport: function (windowConfig) { - performance.mark('code/willLoadWorkbenchMain'); + //#region Splash Screen Helpers - // Code windows have a `vscodeWindowId` property to identify them - Object.defineProperty(window, 'vscodeWindowId', { - get: () => windowConfig.windowId - }); - - // It looks like browsers only lazily enable - // the element when needed. Since we - // leverage canvas elements in our code in many - // locations, we try to help the browser to - // initialize canvas when it is idle, right - // before we wait for the scripts to be loaded. - window.requestIdleCallback(() => { - const canvas = document.createElement('canvas'); - const context = canvas.getContext('2d'); - context?.clearRect(0, 0, canvas.width, canvas.height); - canvas.remove(); - }, { timeout: 50 }); - } - } - ); - - //#region Helpers - - function showSplash(configuration: INativeWindowConfiguration & NativeParsedArgs) { + function showSplash(configuration: INativeWindowConfiguration) { performance.mark('code/willShowPartsSplash'); let data = configuration.partsSplash; @@ -275,4 +225,50 @@ } //#endregion + + const { result, configuration } = await bootstrapWindow.load('vs/workbench/workbench.desktop.main', + { + configureDeveloperSettings: function (windowConfig) { + return { + // disable automated devtools opening on error when running extension tests + // as this can lead to nondeterministic test execution (devtools steals focus) + forceDisableShowDevtoolsOnError: typeof windowConfig.extensionTestsPath === 'string' || windowConfig['enable-smoke-test-driver'] === true, + // enable devtools keybindings in extension development window + removeDeveloperKeybindingsAfterLoad: true + }; + }, + beforeImport: function (windowConfig) { + + // Show our splash as early as possible + showSplash(windowConfig); + + // Code windows have a `vscodeWindowId` property to identify them + Object.defineProperty(window, 'vscodeWindowId', { + get: () => windowConfig.windowId + }); + + // It looks like browsers only lazily enable + // the element when needed. Since we + // leverage canvas elements in our code in many + // locations, we try to help the browser to + // initialize canvas when it is idle, right + // before we wait for the scripts to be loaded. + window.requestIdleCallback(() => { + const canvas = document.createElement('canvas'); + const context = canvas.getContext('2d'); + context?.clearRect(0, 0, canvas.width, canvas.height); + canvas.remove(); + }, { timeout: 50 }); + + // Track import() perf + performance.mark('code/willLoadWorkbenchMain'); + } + } + ); + + // Mark start of workbench + performance.mark('code/didLoadWorkbenchMain'); + + // Load workbench + result.main(configuration); }()); diff --git a/src/vs/editor/common/services/editorSimpleWorker.esm.ts b/src/vs/editor/common/services/editorSimpleWorkerMain.ts similarity index 100% rename from src/vs/editor/common/services/editorSimpleWorker.esm.ts rename to src/vs/editor/common/services/editorSimpleWorkerMain.ts diff --git a/src/vs/editor/standalone/browser/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts index 085ca6352f2..0e6637019c1 100644 --- a/src/vs/editor/standalone/browser/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts @@ -1077,7 +1077,7 @@ class StandaloneContextMenuService extends ContextMenuService { } export const standaloneEditorWorkerDescriptor: IWorkerDescriptor = { - amdModuleId: 'vs/editor/common/services/editorSimpleWorker', + moduleId: 'vs/editor/common/services/editorSimpleWorker', esmModuleLocation: undefined, label: 'editorWorkerService' }; diff --git a/src/vs/editor/standalone/browser/standaloneWebWorker.ts b/src/vs/editor/standalone/browser/standaloneWebWorker.ts index 22d073a4850..5f1d0947c94 100644 --- a/src/vs/editor/standalone/browser/standaloneWebWorker.ts +++ b/src/vs/editor/standalone/browser/standaloneWebWorker.ts @@ -71,7 +71,7 @@ class MonacoWebWorkerImpl extends EditorWorkerClient implement constructor(modelService: IModelService, opts: IWebWorkerOptions) { const workerDescriptor: IWorkerDescriptor = { - amdModuleId: standaloneEditorWorkerDescriptor.amdModuleId, + moduleId: standaloneEditorWorkerDescriptor.moduleId, esmModuleLocation: standaloneEditorWorkerDescriptor.esmModuleLocation, label: opts.label, }; diff --git a/src/vs/platform/profiling/electron-sandbox/profileAnalysisWorker.esm.ts b/src/vs/platform/profiling/electron-sandbox/profileAnalysisWorkerMain.ts similarity index 100% rename from src/vs/platform/profiling/electron-sandbox/profileAnalysisWorker.esm.ts rename to src/vs/platform/profiling/electron-sandbox/profileAnalysisWorkerMain.ts diff --git a/src/vs/platform/window/electron-sandbox/window.ts b/src/vs/platform/window/electron-sandbox/window.ts index 233f3cdeb78..c9914e2117e 100644 --- a/src/vs/platform/window/electron-sandbox/window.ts +++ b/src/vs/platform/window/electron-sandbox/window.ts @@ -73,16 +73,19 @@ export interface ILoadOptions void; beforeImport?: (config: T) => void; } +export interface ILoadResult { + readonly result: M; + readonly configuration: T; +} + export interface IBootstrapWindow { - load( + load( esModule: string, - resultCallback: (result: any, configuration: T) => Promise | undefined, options: ILoadOptions - ): Promise; + ): Promise>; } //#endregion diff --git a/src/vs/workbench/api/worker/extensionHostWorker.esm.ts b/src/vs/workbench/api/worker/extensionHostWorkerMain.ts similarity index 100% rename from src/vs/workbench/api/worker/extensionHostWorker.esm.ts rename to src/vs/workbench/api/worker/extensionHostWorkerMain.ts diff --git a/src/vs/workbench/contrib/issue/electron-sandbox/issueReporter.ts b/src/vs/workbench/contrib/issue/electron-sandbox/issueReporter.ts index 3aeee60b74a..629a6185ccb 100644 --- a/src/vs/workbench/contrib/issue/electron-sandbox/issueReporter.ts +++ b/src/vs/workbench/contrib/issue/electron-sandbox/issueReporter.ts @@ -5,14 +5,15 @@ /* eslint-disable no-restricted-globals */ -(function () { +(async function () { type IBootstrapWindow = import('vs/platform/window/electron-sandbox/window.js').IBootstrapWindow; + type IIssueReporterMain = import('vs/workbench/contrib/issue/electron-sandbox/issueReporterMain').IIssueReporterMain; + type OldIssueReporterWindowConfiguration = import('vs/platform/issue/common/issue.js').OldIssueReporterWindowConfiguration; + const bootstrapWindow: IBootstrapWindow = (window as any).MonacoBootstrapWindow; // defined by bootstrap-window.ts - bootstrapWindow.load('vs/workbench/contrib/issue/electron-sandbox/issueReporterMain', function (issueReporter, configuration) { - return issueReporter.startup(configuration); - }, { + const { result, configuration } = await bootstrapWindow.load('vs/workbench/contrib/issue/electron-sandbox/issueReporterMain', { configureDeveloperSettings: function () { return { forceEnableDeveloperKeybindings: true, @@ -20,4 +21,6 @@ }; } }); + + result.startup(configuration); }()); diff --git a/src/vs/workbench/contrib/issue/electron-sandbox/issueReporterMain.ts b/src/vs/workbench/contrib/issue/electron-sandbox/issueReporterMain.ts index f8c92af7fa9..fa1628e3be8 100644 --- a/src/vs/workbench/contrib/issue/electron-sandbox/issueReporterMain.ts +++ b/src/vs/workbench/contrib/issue/electron-sandbox/issueReporterMain.ts @@ -21,8 +21,11 @@ import BaseHtml from '../browser/issueReporterPage.js'; import { IProcessMainService, IIssueMainService, OldIssueReporterWindowConfiguration } from '../../../../platform/issue/common/issue.js'; import { IssueReporter } from './issueReporterService.js'; +export interface IIssueReporterMain { + startup(configuration: OldIssueReporterWindowConfiguration): void; +} -export function startup(configuration: OldIssueReporterWindowConfiguration) { +export function startup(configuration: OldIssueReporterWindowConfiguration): void { const platformClass = isWindows ? 'windows' : isLinux ? 'linux' : 'mac'; mainWindow.document.body.classList.add(platformClass); // used by our fonts diff --git a/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.esm.ts b/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.ts similarity index 100% rename from src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.esm.ts rename to src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.ts diff --git a/src/vs/workbench/contrib/output/common/outputLinkComputer.esm.ts b/src/vs/workbench/contrib/output/common/outputLinkComputerMain.ts similarity index 100% rename from src/vs/workbench/contrib/output/common/outputLinkComputer.esm.ts rename to src/vs/workbench/contrib/output/common/outputLinkComputerMain.ts diff --git a/src/vs/workbench/electron-sandbox/desktop.main.ts b/src/vs/workbench/electron-sandbox/desktop.main.ts index 24d89f630d0..40cfd9c7ec3 100644 --- a/src/vs/workbench/electron-sandbox/desktop.main.ts +++ b/src/vs/workbench/electron-sandbox/desktop.main.ts @@ -397,6 +397,10 @@ export class DesktopMain extends Disposable { } } +export interface IDesktopMain { + main(configuration: INativeWindowConfiguration): Promise; +} + export function main(configuration: INativeWindowConfiguration): Promise { const workbench = new DesktopMain(configuration); diff --git a/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts b/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts index 7776811b727..54fc51bb873 100644 --- a/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts +++ b/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts @@ -186,7 +186,7 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost iframe.contentWindow!.postMessage({ type: event.data.type, data: { - workerUrl: FileAccess.asBrowserUri('vs/workbench/api/worker/extensionHostWorker.esm.js').toString(true), + workerUrl: FileAccess.asBrowserUri('vs/workbench/api/worker/extensionHostWorkerMain.js').toString(true), fileRoot: globalThis._VSCODE_FILE_ROOT, nls: { messages: getNLSMessages(), diff --git a/src/vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker.esm.ts b/src/vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorkerMain.ts similarity index 100% rename from src/vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker.esm.ts rename to src/vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorkerMain.ts diff --git a/src/vs/workbench/services/search/worker/localFileSearch.esm.ts b/src/vs/workbench/services/search/worker/localFileSearchMain.ts similarity index 100% rename from src/vs/workbench/services/search/worker/localFileSearch.esm.ts rename to src/vs/workbench/services/search/worker/localFileSearchMain.ts diff --git a/src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker.esm.ts b/src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.workerMain.ts similarity index 100% rename from src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker.esm.ts rename to src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.workerMain.ts From 3c945e4722bfe9fb73ad060c90279d2bcc1bea39 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 30 Sep 2024 11:33:24 +0200 Subject: [PATCH 09/15] fix #203141 - postpone restarting until settings sync is turned on (#230106) --- .../common/userDataSyncService.ts | 43 +++++++++++-------- .../browser/relauncher.contribution.ts | 34 ++++++++++----- .../browser/userDataSyncWorkbenchService.ts | 4 ++ .../userDataSync/common/userDataSync.ts | 2 + 4 files changed, 54 insertions(+), 29 deletions(-) diff --git a/src/vs/platform/userDataSync/common/userDataSyncService.ts b/src/vs/platform/userDataSync/common/userDataSyncService.ts index 09b10731cf3..400e1d9582c 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncService.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncService.ts @@ -254,29 +254,34 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ } private async applyManualSync(manifest: IUserDataManifest | null, executionId: string, token: CancellationToken): Promise { - const profileSynchronizers = this.getActiveProfileSynchronizers(); - for (const profileSynchronizer of profileSynchronizers) { - if (token.isCancellationRequested) { + try { + this.setStatus(SyncStatus.Syncing); + const profileSynchronizers = this.getActiveProfileSynchronizers(); + for (const profileSynchronizer of profileSynchronizers) { + if (token.isCancellationRequested) { + return; + } + await profileSynchronizer.apply(executionId, token); + } + + const defaultProfileSynchronizer = profileSynchronizers.find(s => s.profile.isDefault); + if (!defaultProfileSynchronizer) { return; } - await profileSynchronizer.apply(executionId, token); - } - const defaultProfileSynchronizer = profileSynchronizers.find(s => s.profile.isDefault); - if (!defaultProfileSynchronizer) { - return; - } + const userDataProfileManifestSynchronizer = defaultProfileSynchronizer.enabled.find(s => s.resource === SyncResource.Profiles); + if (!userDataProfileManifestSynchronizer) { + return; + } - const userDataProfileManifestSynchronizer = defaultProfileSynchronizer.enabled.find(s => s.resource === SyncResource.Profiles); - if (!userDataProfileManifestSynchronizer) { - return; - } - - // Sync remote profiles which are not synced locally - const remoteProfiles = (await (userDataProfileManifestSynchronizer as UserDataProfilesManifestSynchroniser).getRemoteSyncedProfiles(manifest?.latest ?? null)) || []; - const remoteProfilesToSync = remoteProfiles.filter(remoteProfile => profileSynchronizers.every(s => s.profile.id !== remoteProfile.id)); - if (remoteProfilesToSync.length) { - await this.syncRemoteProfiles(remoteProfilesToSync, manifest, false, executionId, token); + // Sync remote profiles which are not synced locally + const remoteProfiles = (await (userDataProfileManifestSynchronizer as UserDataProfilesManifestSynchroniser).getRemoteSyncedProfiles(manifest?.latest ?? null)) || []; + const remoteProfilesToSync = remoteProfiles.filter(remoteProfile => profileSynchronizers.every(s => s.profile.id !== remoteProfile.id)); + if (remoteProfilesToSync.length) { + await this.syncRemoteProfiles(remoteProfilesToSync, manifest, false, executionId, token); + } + } finally { + this.setStatus(SyncStatus.Idle); } } diff --git a/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts b/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts index 56166ad831a..3cb188be749 100644 --- a/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts +++ b/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts @@ -20,6 +20,8 @@ import { LifecyclePhase } from '../../../services/lifecycle/common/lifecycle.js' import { IDialogService } from '../../../../platform/dialogs/common/dialogs.js'; import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js'; import { IProductService } from '../../../../platform/product/common/productService.js'; +import { IUserDataSyncEnablementService, IUserDataSyncService, SyncStatus } from '../../../../platform/userDataSync/common/userDataSync.js'; +import { IUserDataSyncWorkbenchService } from '../../../services/userDataSync/common/userDataSync.js'; interface IConfiguration extends IWindowsConfiguration { update?: { mode?: string }; @@ -65,21 +67,37 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo constructor( @IHostService private readonly hostService: IHostService, @IConfigurationService private readonly configurationService: IConfigurationService, + @IUserDataSyncService private readonly userDataSyncService: IUserDataSyncService, + @IUserDataSyncEnablementService private readonly userDataSyncEnablementService: IUserDataSyncEnablementService, + @IUserDataSyncWorkbenchService userDataSyncWorkbenchService: IUserDataSyncWorkbenchService, @IProductService private readonly productService: IProductService, @IDialogService private readonly dialogService: IDialogService ) { super(); - this.onConfigurationChange(undefined); + this.update(false); this._register(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationChange(e))); + this._register(userDataSyncWorkbenchService.onDidTurnOnSync(e => this.update(true))); } - private onConfigurationChange(e: IConfigurationChangeEvent | undefined): void { + private onConfigurationChange(e: IConfigurationChangeEvent): void { if (e && !SettingsChangeRelauncher.SETTINGS.some(key => e.affectsConfiguration(key))) { return; } + // Skip if turning on sync is in progress + if (this.isTurningOnSyncInProgress()) { + return; + } + this.update(e.source !== ConfigurationTarget.DEFAULT /* do not ask to relaunch if defaults changed */); + } + + private isTurningOnSyncInProgress(): boolean { + return !this.userDataSyncEnablementService.isEnabled() && this.userDataSyncService.status === SyncStatus.Syncing; + } + + private update(askToRelaunch: boolean): void { let changed = false; function processChanged(didChange: boolean) { @@ -131,9 +149,7 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo // Profiles processChanged(this.productService.quality !== 'stable' && this.enablePPEExtensionsGallery.handleChange(config._extensionsGallery?.enablePPE)); - // Notify only when changed from an event and the change - // was not triggerd programmatically (e.g. from experiments) - if (changed && e && e.source !== ConfigurationTarget.DEFAULT) { + if (askToRelaunch && changed && this.hostService.hasFocus) { this.doConfirm( isNative ? localize('relaunchSettingMessage', "A setting has changed that requires a restart to take effect.") : @@ -150,11 +166,9 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo } private async doConfirm(message: string, detail: string, primaryButton: string, confirmedFn: () => void): Promise { - if (this.hostService.hasFocus) { - const { confirmed } = await this.dialogService.confirm({ message, detail, primaryButton }); - if (confirmed) { - confirmedFn(); - } + const { confirmed } = await this.dialogService.confirm({ message, detail, primaryButton }); + if (confirmed) { + confirmedFn(); } } } diff --git a/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts b/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts index 70762620851..1eff5f1a2e8 100644 --- a/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts +++ b/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts @@ -79,6 +79,9 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat private readonly _onDidChangeAccountStatus = this._register(new Emitter()); readonly onDidChangeAccountStatus = this._onDidChangeAccountStatus.event; + private readonly _onDidTurnOnSync = this._register(new Emitter()); + readonly onDidTurnOnSync = this._onDidTurnOnSync.event; + private _current: UserDataSyncAccount | undefined; get current(): UserDataSyncAccount | undefined { return this._current; } @@ -324,6 +327,7 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat } this.notificationService.info(localize('sync turned on', "{0} is turned on", SYNC_TITLE.value)); + this._onDidTurnOnSync.fire(); } async turnoff(everywhere: boolean): Promise { diff --git a/src/vs/workbench/services/userDataSync/common/userDataSync.ts b/src/vs/workbench/services/userDataSync/common/userDataSync.ts index 1b398df7b6f..c3e5e5fa0dd 100644 --- a/src/vs/workbench/services/userDataSync/common/userDataSync.ts +++ b/src/vs/workbench/services/userDataSync/common/userDataSync.ts @@ -34,6 +34,8 @@ export interface IUserDataSyncWorkbenchService { readonly accountStatus: AccountStatus; readonly onDidChangeAccountStatus: Event; + readonly onDidTurnOnSync: Event; + turnOn(): Promise; turnoff(everyWhere: boolean): Promise; signIn(): Promise; From 4b7e7ce09884e9472bcfd36c00fd4add7a70a136 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Mon, 30 Sep 2024 11:41:49 +0200 Subject: [PATCH 10/15] Refactoring EditContext work (#230107) debt --- .../{editContextUtils.ts => editContext.ts} | 1 - .../editContext/native/nativeEditContext.ts | 11 +++++------ .../editContext/textArea/textAreaEditContext.ts | 11 +++++------ src/vs/editor/browser/view.ts | 14 ++++++-------- 4 files changed, 16 insertions(+), 21 deletions(-) rename src/vs/editor/browser/controller/editContext/{editContextUtils.ts => editContext.ts} (92%) diff --git a/src/vs/editor/browser/controller/editContext/editContextUtils.ts b/src/vs/editor/browser/controller/editContext/editContext.ts similarity index 92% rename from src/vs/editor/browser/controller/editContext/editContextUtils.ts rename to src/vs/editor/browser/controller/editContext/editContext.ts index 19f284b10c0..edcf2be3361 100644 --- a/src/vs/editor/browser/controller/editContext/editContextUtils.ts +++ b/src/vs/editor/browser/controller/editContext/editContext.ts @@ -10,7 +10,6 @@ import { ViewPart } from '../../view/viewPart.js'; export abstract class AbstractEditContext extends ViewPart { abstract domNode: FastDomNode; - abstract appendTo(overflowGuardContainer: FastDomNode): void; abstract focus(): void; abstract isFocused(): boolean; abstract refreshFocusState(): void; diff --git a/src/vs/editor/browser/controller/editContext/native/nativeEditContext.ts b/src/vs/editor/browser/controller/editContext/native/nativeEditContext.ts index 67cdd3b0bb0..b3cca2d4166 100644 --- a/src/vs/editor/browser/controller/editContext/native/nativeEditContext.ts +++ b/src/vs/editor/browser/controller/editContext/native/nativeEditContext.ts @@ -18,7 +18,7 @@ import { ViewContext } from '../../../../common/viewModel/viewContext.js'; import { RestrictedRenderingContext, RenderingContext } from '../../../view/renderingContext.js'; import { ViewController } from '../../../view/viewController.js'; import { ClipboardStoredMetadata, getDataToCopy, InMemoryClipboardMetadataManager } from '../clipboardUtils.js'; -import { AbstractEditContext } from '../editContextUtils.js'; +import { AbstractEditContext } from '../editContext.js'; import { editContextAddDisposableListener, FocusTracker, ITypeData } from './nativeEditContextUtils.js'; import { ScreenReaderSupport } from './screenReaderSupport.js'; import { Range } from '../../../../common/core/range.js'; @@ -51,6 +51,7 @@ export class NativeEditContext extends AbstractEditContext { constructor( context: ViewContext, + overflowGuardContainer: FastDomNode, viewController: ViewController, private readonly _visibleRangeProvider: IVisibleRangeProvider, @IInstantiationService instantiationService: IInstantiationService, @@ -62,6 +63,9 @@ export class NativeEditContext extends AbstractEditContext { this.domNode.setClassName(`native-edit-context`); this._updateDomAttributes(); + overflowGuardContainer.appendChild(this.domNode); + this._parent = overflowGuardContainer.domNode; + this._focusTracker = this._register(new FocusTracker(this.domNode.domNode, (newFocusValue: boolean) => this._context.viewModel.setHasFocus(newFocusValue))); this._editContext = new EditContext(); @@ -123,11 +127,6 @@ export class NativeEditContext extends AbstractEditContext { super.dispose(); } - public appendTo(overflowGuardContainer: FastDomNode): void { - overflowGuardContainer.appendChild(this.domNode); - this._parent = overflowGuardContainer.domNode; - } - public setAriaOptions(): void { this._screenReaderSupport.setAriaOptions(); } diff --git a/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.ts b/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.ts index acbc89e9e8e..72887583691 100644 --- a/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.ts +++ b/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.ts @@ -34,7 +34,7 @@ import { Color } from '../../../../../base/common/color.js'; import { IME } from '../../../../../base/common/ime.js'; import { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js'; import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js'; -import { AbstractEditContext } from '../editContextUtils.js'; +import { AbstractEditContext } from '../editContext.js'; import { ICompositionData, IPasteData, ITextAreaInputHost, TextAreaInput, TextAreaWrapper } from './textAreaEditContextInput.js'; import { ariaLabelForScreenReaderContent, ISimpleModel, newlinecount, PagedScreenReaderStrategy } from '../screenReaderUtils.js'; import { ClipboardDataToCopy, getDataToCopy } from '../clipboardUtils.js'; @@ -148,6 +148,7 @@ export class TextAreaEditContext extends AbstractEditContext { constructor( context: ViewContext, + overflowGuardContainer: FastDomNode, viewController: ViewController, visibleRangeProvider: IVisibleRangeProvider, @IKeybindingService private readonly _keybindingService: IKeybindingService, @@ -201,6 +202,9 @@ export class TextAreaEditContext extends AbstractEditContext { this.textAreaCover = createFastDomNode(document.createElement('div')); this.textAreaCover.setPosition('absolute'); + overflowGuardContainer.appendChild(this.textArea); + overflowGuardContainer.appendChild(this.textAreaCover); + const simpleModel: ISimpleModel = { getLineCount: (): number => { return this._context.viewModel.getLineCount(); @@ -466,11 +470,6 @@ export class TextAreaEditContext extends AbstractEditContext { return this.textArea; } - appendTo(overflowGuardContainer: FastDomNode): void { - overflowGuardContainer.appendChild(this.textArea); - overflowGuardContainer.appendChild(this.textAreaCover); - } - public writeScreenReaderContent(reason: string): void { this._textAreaInput.writeNativeTextAreaContent(reason); } diff --git a/src/vs/editor/browser/view.ts b/src/vs/editor/browser/view.ts index a094abf538c..239621d32b2 100644 --- a/src/vs/editor/browser/view.ts +++ b/src/vs/editor/browser/view.ts @@ -57,7 +57,7 @@ import { IInstantiationService } from '../../platform/instantiation/common/insta import { IColorTheme, getThemeTypeSelector } from '../../platform/theme/common/themeService.js'; import { ViewGpuContext } from './gpu/viewGpuContext.js'; import { ViewLinesGpu } from './viewParts/viewLinesGpu/viewLinesGpu.js'; -import { AbstractEditContext } from './controller/editContext/editContextUtils.js'; +import { AbstractEditContext } from './controller/editContext/editContext.js'; import { IVisibleRangeProvider, TextAreaEditContext } from './controller/editContext/textArea/textAreaEditContext.js'; import { NativeEditContext } from './controller/editContext/native/nativeEditContext.js'; import { RulersGpu } from './viewParts/rulersGpu/rulersGpu.js'; @@ -124,6 +124,10 @@ export class View extends ViewEventHandler { this._selections = [new Selection(1, 1, 1, 1)]; this._renderAnimationFrame = null; + this._overflowGuardContainer = createFastDomNode(document.createElement('div')); + PartFingerprints.write(this._overflowGuardContainer, PartFingerprint.OverflowGuard); + this._overflowGuardContainer.setClassName('overflow-guard'); + this._viewController = new ViewController(configuration, model, userInputEvents, commandDelegate); // The view context is passed on to most classes (basically to reduce param. counts in ctors) @@ -154,10 +158,6 @@ export class View extends ViewEventHandler { this._viewGpuContext = this._instantiationService.createInstance(ViewGpuContext, this._context); } - this._overflowGuardContainer = createFastDomNode(document.createElement('div')); - PartFingerprints.write(this._overflowGuardContainer, PartFingerprint.OverflowGuard); - this._overflowGuardContainer.setClassName('overflow-guard'); - this._scrollbar = new EditorScrollbar(this._context, this._linesContent, this.domNode, this._overflowGuardContainer); this._viewParts.push(this._scrollbar); @@ -247,7 +247,6 @@ export class View extends ViewEventHandler { this._overflowGuardContainer.appendChild(this._viewGpuContext.canvas); } this._overflowGuardContainer.appendChild(scrollDecoration.getDomNode()); - this._editContext.appendTo(this._overflowGuardContainer); this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()); this._overflowGuardContainer.appendChild(minimap.getDomNode()); this._overflowGuardContainer.appendChild(blockOutline.domNode); @@ -268,7 +267,7 @@ export class View extends ViewEventHandler { } private _instantiateEditContext(experimentalEditContextEnabled: boolean): AbstractEditContext { - return this._instantiationService.createInstance(experimentalEditContextEnabled ? NativeEditContext : TextAreaEditContext, this._context, this._viewController, this._createTextAreaHandlerHelper()); + return this._instantiationService.createInstance(experimentalEditContextEnabled ? NativeEditContext : TextAreaEditContext, this._context, this._overflowGuardContainer, this._viewController, this._createTextAreaHandlerHelper()); } private _updateEditContext(): void { @@ -279,7 +278,6 @@ export class View extends ViewEventHandler { this._experimentalEditContextEnabled = experimentalEditContextEnabled; this._editContext.dispose(); this._editContext = this._instantiateEditContext(experimentalEditContextEnabled); - this._editContext.appendTo(this._overflowGuardContainer); // Replace the view parts with the new edit context const indexOfEditContextHandler = this._viewParts.indexOf(this._editContext); if (indexOfEditContextHandler !== -1) { From a5979c9b3c213971810df2d079f9c19928a60850 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 30 Sep 2024 12:11:56 +0200 Subject: [PATCH 11/15] esm - more cleanup and polish (#230109) --- src/bootstrap-esm.ts | 21 ++- src/bootstrap-fork.ts | 2 +- src/cli.ts | 4 +- src/main.ts | 9 +- src/server-cli.ts | 6 +- src/server-main.ts | 36 ++-- .../electron-sandbox/workbench/workbench.ts | 160 +++++++++--------- 7 files changed, 115 insertions(+), 123 deletions(-) diff --git a/src/bootstrap-esm.ts b/src/bootstrap-esm.ts index 7256c0230e5..fc0e86d005d 100644 --- a/src/bootstrap-esm.ts +++ b/src/bootstrap-esm.ts @@ -118,18 +118,17 @@ async function doSetupNLS(): Promise { //#region ESM Loading -export function load(esModule: string | undefined, onLoad?: (value: any) => void, onError?: (err: Error) => void): void { - if (!esModule) { - return; +export async function load(esModule: string): Promise { + try { + // NLS comes first + await setupNLS(); + + // Then load the ES module + return await import([`./${esModule}.js`].join('/') /* workaround to prevent esbuild from inlining this */); + } catch (error) { + console.error(`Unable to load ${esModule}: ${error}`); + throw error; } - - onLoad = onLoad || function () { }; - onError = onError || function (err) { console.error(err); }; - - setupNLS().then(() => { - performance.mark(`code/fork/willLoadCode`); - import([`./${esModule}.js`].join('/') /* workaround to prevent esbuild from inlining this */).then(onLoad, onError); - }); } //#endregion diff --git a/src/bootstrap-fork.ts b/src/bootstrap-fork.ts index aa523399126..129fc7c040f 100644 --- a/src/bootstrap-fork.ts +++ b/src/bootstrap-fork.ts @@ -35,7 +35,7 @@ if (process.env['VSCODE_PARENT_PID']) { } // Load ESM entry point -load(process.env['VSCODE_ESM_ENTRYPOINT']); +load(process.env['VSCODE_ESM_ENTRYPOINT']!); //#region Helpers diff --git a/src/cli.ts b/src/cli.ts index cead01847d6..8042aee4f80 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import './bootstrap-cli.js'; // this MUST come before other imports as it changes global state -import * as path from 'path'; +import { dirname } from 'path'; import { fileURLToPath } from 'url'; import { configurePortable } from './bootstrap-node.js'; import { load } from './bootstrap-esm.js'; import { resolveNLSConfiguration } from './vs/base/node/nls.js'; import { product } from './bootstrap-meta.js'; -const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const __dirname = dirname(fileURLToPath(import.meta.url)); // NLS const nlsConfiguration = await resolveNLSConfiguration({ userLocale: 'en', osLocale: 'en', commit: product.commit, userDataPath: '', nlsMetadataPath: __dirname }); diff --git a/src/main.ts b/src/main.ts index f676dca148c..3324f2b9dfd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -160,7 +160,7 @@ async function onReady() { resolveNlsConfiguration() ]); - startup(codeCachePath, nlsConfig); + await startup(codeCachePath, nlsConfig); } catch (error) { console.error(error); } @@ -169,14 +169,13 @@ async function onReady() { /** * Main startup routine */ -function startup(codeCachePath: string | undefined, nlsConfig: INLSConfiguration): void { +async function startup(codeCachePath: string | undefined, nlsConfig: INLSConfiguration): Promise { process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig); process.env['VSCODE_CODE_CACHE_PATH'] = codeCachePath || ''; perf.mark('code/willLoadMainBundle'); - load('vs/code/electron-main/main', () => { - perf.mark('code/didLoadMainBundle'); - }); + await load('vs/code/electron-main/main'); + perf.mark('code/didLoadMainBundle'); } function configureCommandlineSwitchesSync(cliArgs: NativeParsedArgs) { diff --git a/src/server-cli.ts b/src/server-cli.ts index fabe8900b3f..5639dd95032 100644 --- a/src/server-cli.ts +++ b/src/server-cli.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import './bootstrap-server.js'; // this MUST come before other imports as it changes global state -import * as path from 'path'; +import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; import { devInjectNodeModuleLookupPath } from './bootstrap-node.js'; import { load } from './bootstrap-esm.js'; import { resolveNLSConfiguration } from './vs/base/node/nls.js'; import { product } from './bootstrap-meta.js'; -const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const __dirname = dirname(fileURLToPath(import.meta.url)); // NLS const nlsConfiguration = await resolveNLSConfiguration({ userLocale: 'en', osLocale: 'en', commit: product.commit, userDataPath: '', nlsMetadataPath: __dirname }); @@ -20,7 +20,7 @@ process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfiguration); // required if (process.env['VSCODE_DEV']) { // When running out of sources, we need to load node modules from remote/node_modules, // which are compiled against nodejs, not electron - process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH'] = process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH'] || path.join(__dirname, '..', 'remote', 'node_modules'); + process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH'] = process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH'] || join(__dirname, '..', 'remote', 'node_modules'); devInjectNodeModuleLookupPath(process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH']); } else { delete process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH']; diff --git a/src/server-main.ts b/src/server-main.ts index d70a856f854..f20c36722ae 100644 --- a/src/server-main.ts +++ b/src/server-main.ts @@ -228,29 +228,27 @@ async function findFreePort(host: string | undefined, start: number, end: number } function loadCode(nlsConfiguration: INLSConfiguration): Promise { - return new Promise((resolve, reject) => { - // required for `bootstrap-esm` to pick up NLS messages - process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfiguration); + // required for `bootstrap-esm` to pick up NLS messages + process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfiguration); - // See https://github.com/microsoft/vscode-remote-release/issues/6543 - // We would normally install a SIGPIPE listener in bootstrap-node.js - // But in certain situations, the console itself can be in a broken pipe state - // so logging SIGPIPE to the console will cause an infinite async loop - process.env['VSCODE_HANDLES_SIGPIPE'] = 'true'; + // See https://github.com/microsoft/vscode-remote-release/issues/6543 + // We would normally install a SIGPIPE listener in bootstrap-node.js + // But in certain situations, the console itself can be in a broken pipe state + // so logging SIGPIPE to the console will cause an infinite async loop + process.env['VSCODE_HANDLES_SIGPIPE'] = 'true'; - if (process.env['VSCODE_DEV']) { - // When running out of sources, we need to load node modules from remote/node_modules, - // which are compiled against nodejs, not electron - process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH'] = process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH'] || path.join(__dirname, '..', 'remote', 'node_modules'); - devInjectNodeModuleLookupPath(process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH']); - } else { - delete process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH']; - } + if (process.env['VSCODE_DEV']) { + // When running out of sources, we need to load node modules from remote/node_modules, + // which are compiled against nodejs, not electron + process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH'] = process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH'] || path.join(__dirname, '..', 'remote', 'node_modules'); + devInjectNodeModuleLookupPath(process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH']); + } else { + delete process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH']; + } - // Load Server - load('vs/server/node/server.main', resolve, reject); - }); + // Load Server + return load('vs/server/node/server.main'); } function hasStdinWithoutTty(): boolean { diff --git a/src/vs/code/electron-sandbox/workbench/workbench.ts b/src/vs/code/electron-sandbox/workbench/workbench.ts index 280cee11697..daddd15eb07 100644 --- a/src/vs/code/electron-sandbox/workbench/workbench.ts +++ b/src/vs/code/electron-sandbox/workbench/workbench.ts @@ -24,17 +24,14 @@ performance.mark('code/willShowPartsSplash'); let data = configuration.partsSplash; - if (data) { - // high contrast mode has been turned by the OS -> ignore stored colors and layouts if (configuration.autoDetectHighContrast && configuration.colorScheme.highContrast) { if ((configuration.colorScheme.dark && data.baseTheme !== 'hc-black') || (!configuration.colorScheme.dark && data.baseTheme !== 'hc-light')) { - data = undefined; + data = undefined; // high contrast mode has been turned by the OS -> ignore stored colors and layouts } } else if (configuration.autoDetectColorScheme) { - // OS color scheme is tracked and has changed if ((configuration.colorScheme.dark && data.baseTheme !== 'vs-dark') || (!configuration.colorScheme.dark && data.baseTheme !== 'vs')) { - data = undefined; + data = undefined; // OS color scheme is tracked and has changed } } } @@ -77,12 +74,7 @@ const style = document.createElement('style'); style.className = 'initialShellColors'; window.document.head.appendChild(style); - style.textContent = `body { - background-color: ${shellBackground}; - color: ${shellForeground}; - margin: 0; - padding: 0; - }`; + style.textContent = `body { background-color: ${shellBackground}; color: ${shellForeground}; margin: 0; padding: 0; }`; // set zoom level as soon as possible if (typeof data?.zoomLevel === 'number' && typeof preloadGlobals?.webFrame?.setZoomLevel === 'function') { @@ -98,12 +90,10 @@ splash.className = baseTheme ?? 'vs-dark'; if (layoutInfo.windowBorder && colorInfo.windowBorder) { - splash.setAttribute('style', ` - position: relative; - height: calc(100vh - 2px); - width: calc(100vw - 2px); - border: 1px solid var(--window-border-color); - `); + splash.style.position = 'relative'; + splash.style.height = 'calc(100vh - 2px)'; + splash.style.width = 'calc(100vw - 2px)'; + splash.style.border = `1px solid var(--window-border-color)`; splash.style.setProperty('--window-border-color', colorInfo.windowBorder); if (layoutInfo.windowBorderRadius) { @@ -116,52 +106,53 @@ // part: title const titleDiv = document.createElement('div'); - titleDiv.setAttribute('style', ` - position: absolute; - width: 100%; - height: ${layoutInfo.titleBarHeight}px; - left: 0; - top: 0; - background-color: ${colorInfo.titleBarBackground}; - -webkit-app-region: drag; - `); + titleDiv.style.position = 'absolute'; + titleDiv.style.width = '100%'; + titleDiv.style.height = `${layoutInfo.titleBarHeight}px`; + titleDiv.style.left = '0'; + titleDiv.style.top = '0'; + titleDiv.style.backgroundColor = `${colorInfo.titleBarBackground}`; + (titleDiv.style as any)['-webkit-app-region'] = 'drag'; splash.appendChild(titleDiv); if (colorInfo.titleBarBorder && layoutInfo.titleBarHeight > 0) { const titleBorder = document.createElement('div'); - titleBorder.setAttribute('style', ` - position: absolute; - width: 100%; - height: 1px; - left: 0; - bottom: 0; - border-bottom: 1px solid ${colorInfo.titleBarBorder}; - `); + titleBorder.style.position = 'absolute'; + titleBorder.style.width = '100%'; + titleBorder.style.height = '1px'; + titleBorder.style.left = '0'; + titleBorder.style.bottom = '0'; + titleBorder.style.borderBottom = `1px solid ${colorInfo.titleBarBorder}`; titleDiv.appendChild(titleBorder); } // part: activity bar const activityDiv = document.createElement('div'); - activityDiv.setAttribute('style', ` - position: absolute; - width: ${layoutInfo.activityBarWidth}px; - height: calc(100% - ${layoutInfo.titleBarHeight + layoutInfo.statusBarHeight}px); - top: ${layoutInfo.titleBarHeight}px; - ${layoutInfo.sideBarSide}: 0; - background-color: ${colorInfo.activityBarBackground}; - `); + activityDiv.style.position = 'absolute'; + activityDiv.style.width = `${layoutInfo.activityBarWidth}px`; + activityDiv.style.height = `calc(100% - ${layoutInfo.titleBarHeight + layoutInfo.statusBarHeight}px)`; + activityDiv.style.top = `${layoutInfo.titleBarHeight}px`; + if (layoutInfo.sideBarSide === 'left') { + activityDiv.style.left = '0'; + } else { + activityDiv.style.right = '0'; + } + activityDiv.style.backgroundColor = `${colorInfo.activityBarBackground}`; splash.appendChild(activityDiv); if (colorInfo.activityBarBorder && layoutInfo.activityBarWidth > 0) { const activityBorderDiv = document.createElement('div'); - activityBorderDiv.setAttribute('style', ` - position: absolute; - width: 1px; - height: 100%; - top: 0; - ${layoutInfo.sideBarSide === 'left' ? 'right' : 'left'}: 0; - ${layoutInfo.sideBarSide === 'left' ? 'border-right' : 'border-left'}: 1px solid ${colorInfo.activityBarBorder}; - `); + activityBorderDiv.style.position = 'absolute'; + activityBorderDiv.style.width = '1px'; + activityBorderDiv.style.height = '100%'; + activityBorderDiv.style.top = '0'; + if (layoutInfo.sideBarSide === 'left') { + activityBorderDiv.style.right = '0'; + activityBorderDiv.style.borderRight = `1px solid ${colorInfo.activityBarBorder}`; + } else { + activityBorderDiv.style.left = '0'; + activityBorderDiv.style.borderLeft = `1px solid ${colorInfo.activityBarBorder}`; + } activityDiv.appendChild(activityBorderDiv); } @@ -169,52 +160,56 @@ // folder or workspace -> status bar color, sidebar if (configuration.workspace) { const sideDiv = document.createElement('div'); - sideDiv.setAttribute('style', ` - position: absolute; - width: ${layoutInfo.sideBarWidth}px; - height: calc(100% - ${layoutInfo.titleBarHeight + layoutInfo.statusBarHeight}px); - top: ${layoutInfo.titleBarHeight}px; - ${layoutInfo.sideBarSide}: ${layoutInfo.activityBarWidth}px; - background-color: ${colorInfo.sideBarBackground}; - `); + sideDiv.style.position = 'absolute'; + sideDiv.style.width = `${layoutInfo.sideBarWidth}px`; + sideDiv.style.height = `calc(100% - ${layoutInfo.titleBarHeight + layoutInfo.statusBarHeight}px)`; + sideDiv.style.top = `${layoutInfo.titleBarHeight}px`; + if (layoutInfo.sideBarSide === 'left') { + sideDiv.style.left = `${layoutInfo.activityBarWidth}px`; + } else { + sideDiv.style.right = `${layoutInfo.activityBarWidth}px`; + } + sideDiv.style.backgroundColor = `${colorInfo.sideBarBackground}`; splash.appendChild(sideDiv); if (colorInfo.sideBarBorder && layoutInfo.sideBarWidth > 0) { const sideBorderDiv = document.createElement('div'); - sideBorderDiv.setAttribute('style', ` - position: absolute; - width: 1px; - height: 100%; - top: 0; - right: 0; - ${layoutInfo.sideBarSide === 'left' ? 'right' : 'left'}: 0; - ${layoutInfo.sideBarSide === 'left' ? 'border-right' : 'border-left'}: 1px solid ${colorInfo.sideBarBorder}; - `); + sideBorderDiv.style.position = 'absolute'; + sideBorderDiv.style.width = '1px'; + sideBorderDiv.style.height = '100%'; + sideBorderDiv.style.top = '0'; + sideBorderDiv.style.right = '0'; + if (layoutInfo.sideBarSide === 'left') { + sideBorderDiv.style.borderRight = `1px solid ${colorInfo.sideBarBorder}`; + } else { + sideBorderDiv.style.left = '0'; + sideBorderDiv.style.borderLeft = `1px solid ${colorInfo.sideBarBorder}`; + } sideDiv.appendChild(sideBorderDiv); } } // part: statusbar const statusDiv = document.createElement('div'); - statusDiv.setAttribute('style', ` - position: absolute; - width: 100%; - height: ${layoutInfo.statusBarHeight}px; - bottom: 0; - left: 0; - background-color: ${configuration.workspace ? colorInfo.statusBarBackground : colorInfo.statusBarNoFolderBackground}; - `); + statusDiv.style.position = 'absolute'; + statusDiv.style.width = '100%'; + statusDiv.style.height = `${layoutInfo.statusBarHeight}px`; + statusDiv.style.bottom = '0'; + statusDiv.style.left = '0'; + if (configuration.workspace && colorInfo.statusBarBackground) { + statusDiv.style.backgroundColor = colorInfo.statusBarBackground; + } else if (!configuration.workspace && colorInfo.statusBarNoFolderBackground) { + statusDiv.style.backgroundColor = colorInfo.statusBarNoFolderBackground; + } splash.appendChild(statusDiv); if (colorInfo.statusBarBorder && layoutInfo.statusBarHeight > 0) { const statusBorderDiv = document.createElement('div'); - statusBorderDiv.setAttribute('style', ` - position: absolute; - width: 100%; - height: 1px; - top: 0; - border-top: 1px solid ${colorInfo.statusBarBorder}; - `); + statusBorderDiv.style.position = 'absolute'; + statusBorderDiv.style.width = '100%'; + statusBorderDiv.style.height = '1px'; + statusBorderDiv.style.top = '0'; + statusBorderDiv.style.borderTop = `1px solid ${colorInfo.statusBarBorder}`; statusDiv.appendChild(statusBorderDiv); } @@ -234,6 +229,7 @@ // as this can lead to nondeterministic test execution (devtools steals focus) forceDisableShowDevtoolsOnError: typeof windowConfig.extensionTestsPath === 'string' || windowConfig['enable-smoke-test-driver'] === true, // enable devtools keybindings in extension development window + forceEnableDeveloperKeybindings: Array.isArray(windowConfig.extensionDevelopmentPath) && windowConfig.extensionDevelopmentPath.length > 0, removeDeveloperKeybindingsAfterLoad: true }; }, From b6630c0a1ebe5184e22595c57ae8f979bf5ebdcf Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 30 Sep 2024 12:27:40 +0200 Subject: [PATCH 12/15] esm - remove `MonacoEnvironment` use in ext host worker (#230111) --- .../extensions/worker/webWorkerExtensionHostIframe.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html b/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html index 21fa5056564..88407e89f16 100644 --- a/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html +++ b/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html @@ -4,7 +4,7 @@ @@ -78,7 +78,7 @@ return; } const { data } = event.data; - createWorker(data.baseUrl, data.workerUrl, data.fileRoot, data.nls.messages, data.nls.language); + createWorker(data.workerUrl, data.fileRoot, data.nls.messages, data.nls.language); }; window.parent.postMessage({ @@ -87,7 +87,7 @@ }, '*'); } - function createWorker(baseUrl, workerUrl, fileRoot, nlsMessages, nlsLanguage) { + function createWorker(workerUrl, fileRoot, nlsMessages, nlsLanguage) { try { if (globalThis.crossOriginIsolated) { workerUrl += '?vscode-coi=2'; // COEP @@ -99,7 +99,6 @@ const blob = new Blob([[ `/*extensionHostWorker*/`, - `globalThis.MonacoEnvironment = { baseUrl: ${JSON.stringify(baseUrl)} };`, `globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify(nlsMessages)};`, `globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify(nlsLanguage)};`, `globalThis._VSCODE_FILE_ROOT = ${JSON.stringify(fileRoot)};`, From ef44e6778365479de6808e49662ffd8340908775 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 30 Sep 2024 15:18:32 +0200 Subject: [PATCH 13/15] Improve unusable slowness of tree sitter syntax highlighting (#229951) * Improve unusable slowness of tree sitter syntax highlighting Part of #229935 * Improve improvement as discussed with Martin * Fix score * Fix test error --- .../test-issue11_ts.json | 16 ++--- .../test-issue5431_ts.json | 12 ++-- .../test-issue5566_ts.json | 16 ++--- .../test-keywords_ts.json | 2 +- .../colorize-tree-sitter-results/test_ts.json | 10 +-- .../languages/highlights/typescript.scm | 10 +-- .../services/themes/common/colorThemeData.ts | 68 ++++++------------- .../test/node/tokenStyleResolving.test.ts | 3 + .../browser/treeSitterTokenizationFeature.ts | 4 +- 9 files changed, 55 insertions(+), 86 deletions(-) diff --git a/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue11_ts.json b/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue11_ts.json index 60fc1bedb81..6fb2651c7c5 100644 --- a/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue11_ts.json +++ b/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue11_ts.json @@ -1989,7 +1989,7 @@ }, { "c": "=>", - "t": "keyword.operator storage.type", + "t": "storage.type", "r": { "dark_plus": "storage.type: #569CD6", "light_plus": "storage.type: #0000FF", @@ -2507,7 +2507,7 @@ }, { "c": "=>", - "t": "keyword.operator storage.type", + "t": "storage.type", "r": { "dark_plus": "storage.type: #569CD6", "light_plus": "storage.type: #0000FF", @@ -2801,16 +2801,16 @@ }, { "c": "t", - "t": "variable variable.other.constant", + "t": "variable", "r": { - "dark_plus": "variable.other.constant: #4FC1FF", - "light_plus": "variable.other.constant: #0070C1", + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", "hc_black": "variable: #9CDCFE", - "dark_modern": "variable.other.constant: #4FC1FF", - "hc_light": "variable.other.constant: #02715D", - "light_modern": "variable.other.constant: #0070C1" + "dark_modern": "variable: #9CDCFE", + "hc_light": "variable: #001080", + "light_modern": "variable: #001080" } }, { diff --git a/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue5431_ts.json b/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue5431_ts.json index d5508bf6b0a..2f99899f2a1 100644 --- a/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue5431_ts.json +++ b/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue5431_ts.json @@ -155,16 +155,16 @@ }, { "c": "timeRange", - "t": "variable variable.other.constant", + "t": "variable", "r": { - "dark_plus": "variable.other.constant: #4FC1FF", - "light_plus": "variable.other.constant: #0070C1", + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", "hc_black": "variable: #9CDCFE", - "dark_modern": "variable.other.constant: #4FC1FF", - "hc_light": "variable.other.constant: #02715D", - "light_modern": "variable.other.constant: #0070C1" + "dark_modern": "variable: #9CDCFE", + "hc_light": "variable: #001080", + "light_modern": "variable: #001080" } }, { diff --git a/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue5566_ts.json b/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue5566_ts.json index edcd005f61c..e055f0ae7ca 100644 --- a/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue5566_ts.json +++ b/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-issue5566_ts.json @@ -85,16 +85,16 @@ }, { "c": "foo", - "t": "variable entity.name.function variable.other.constant", + "t": "variable entity.name.function", "r": { - "dark_plus": "variable.other.constant: #4FC1FF", - "light_plus": "variable.other.constant: #0070C1", + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE", - "dark_modern": "variable.other.constant: #4FC1FF", - "hc_light": "variable.other.constant: #02715D", - "light_modern": "variable.other.constant: #0070C1" + "hc_black": "entity.name.function: #DCDCAA", + "dark_modern": "entity.name.function: #DCDCAA", + "hc_light": "entity.name.function: #5E2CBC", + "light_modern": "entity.name.function: #795E26" } }, { @@ -169,7 +169,7 @@ }, { "c": "=>", - "t": "keyword.operator storage.type", + "t": "storage.type", "r": { "dark_plus": "storage.type: #569CD6", "light_plus": "storage.type: #0000FF", diff --git a/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-keywords_ts.json b/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-keywords_ts.json index 88e4148cc63..f7b50872f0a 100644 --- a/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-keywords_ts.json +++ b/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-keywords_ts.json @@ -85,7 +85,7 @@ }, { "c": "=>", - "t": "keyword.operator storage.type", + "t": "storage.type", "r": { "dark_plus": "storage.type: #569CD6", "light_plus": "storage.type: #0000FF", diff --git a/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test_ts.json b/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test_ts.json index 75a2bd87904..ca9e2cdd3a4 100644 --- a/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test_ts.json +++ b/extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test_ts.json @@ -323,7 +323,7 @@ }, { "c": "constructor", - "t": "variable meta.definition.method entity.name.function storage.type", + "t": "variable meta.definition.method storage.type", "r": { "dark_plus": "storage.type: #569CD6", "light_plus": "storage.type: #0000FF", @@ -1457,7 +1457,7 @@ }, { "c": "constructor", - "t": "variable meta.definition.method entity.name.function storage.type", + "t": "variable meta.definition.method storage.type", "r": { "dark_plus": "storage.type: #569CD6", "light_plus": "storage.type: #0000FF", @@ -2717,7 +2717,7 @@ }, { "c": "=>", - "t": "keyword.operator storage.type", + "t": "storage.type", "r": { "dark_plus": "storage.type: #569CD6", "light_plus": "storage.type: #0000FF", @@ -3319,7 +3319,7 @@ }, { "c": "=>", - "t": "keyword.operator storage.type", + "t": "storage.type", "r": { "dark_plus": "storage.type: #569CD6", "light_plus": "storage.type: #0000FF", @@ -3879,7 +3879,7 @@ }, { "c": "=>", - "t": "keyword.operator storage.type", + "t": "storage.type", "r": { "dark_plus": "storage.type: #569CD6", "light_plus": "storage.type: #0000FF", diff --git a/src/vs/editor/common/languages/highlights/typescript.scm b/src/vs/editor/common/languages/highlights/typescript.scm index d6f52638659..5f6a6796883 100644 --- a/src/vs/editor/common/languages/highlights/typescript.scm +++ b/src/vs/editor/common/languages/highlights/typescript.scm @@ -61,9 +61,10 @@ (function_declaration name: (identifier) @entity.name.function) (method_definition - name: (property_identifier) @meta.definition.method @entity.name.function) + name: (property_identifier) @meta.definition.method @entity.name.function + (#not-eq? @entity.name.function "constructor")) (method_definition - name: (property_identifier) @storage.type + name: (property_identifier) @meta.definition.method @storage.type (#eq? @storage.type "constructor")) (method_signature name: (property_identifier) @meta.definition.method @entity.name.function) @@ -109,10 +110,6 @@ (predefined_type (["string" "boolean" "number" "any"])) @support.type.primitive (type_identifier) @entity.name.type -(("const") - (variable_declarator - name: (identifier) @variable.other.constant)) - ([ (identifier) (shorthand_property_identifier) @@ -192,7 +189,6 @@ "<<=" "==" "!=" - "=>" ">>" ">>=" ">>>" diff --git a/src/vs/workbench/services/themes/common/colorThemeData.ts b/src/vs/workbench/services/themes/common/colorThemeData.ts index c648e65d0a9..d6674cb5ab0 100644 --- a/src/vs/workbench/services/themes/common/colorThemeData.ts +++ b/src/vs/workbench/services/themes/common/colorThemeData.ts @@ -26,7 +26,6 @@ import { ThemeConfiguration } from './themeConfiguration.js'; import { ColorScheme } from '../../../../platform/theme/common/theme.js'; import { ColorId, FontStyle, MetadataConsts } from '../../../../editor/common/encodedTokenAttributes.js'; import { toStandardTokenType } from '../../../../editor/common/languages/supports/tokenization.js'; -import { findMatchingThemeRule } from '../../textMate/common/TMHelper.js'; const colorRegistry = Registry.as(ColorRegistryExtensions.ColorContribution); @@ -817,34 +816,25 @@ const defaultThemeColors: { [baseTheme: string]: ITextMateThemingRule[] } = { const noMatch = (_scope: ProbeScope) => -1; -function nameMatcher(identifers: string[], scope: ProbeScope): number { - function findInIdents(s: string, lastIndent: number): number { - for (let i = lastIndent - 1; i >= 0; i--) { - if (scopesAreMatching(s, identifers[i])) { - return i; - } - } +function nameMatcher(identifiers: string[], scopes: ProbeScope): number { + if (scopes.length < identifiers.length) { return -1; } - if (scope.length < identifers.length) { - return -1; - } - let lastScopeIndex = scope.length - 1; - let lastIdentifierIndex = findInIdents(scope[lastScopeIndex--], identifers.length); - if (lastIdentifierIndex >= 0) { - const score = (lastIdentifierIndex + 1) * 0x10000 + identifers[lastIdentifierIndex].length; - while (lastScopeIndex >= 0) { - lastIdentifierIndex = findInIdents(scope[lastScopeIndex--], lastIdentifierIndex); - if (lastIdentifierIndex === -1) { - return -1; + + let lastIndex = 0; + let score: number | undefined = undefined; + const every = identifiers.every((identifier, identifierIndex) => { + for (let i = lastIndex; i < scopes.length; i++) { + if (scopesAreMatching(scopes[i], identifier)) { + score = (identifierIndex + 1) * 0x10000 + identifier.length; + lastIndex = i + 1; + return true; } } - return score; - } - return -1; + return false; + }); + return every && score !== undefined ? score : -1; } - - function scopesAreMatching(thisScopeName: string, scopeName: string): boolean { if (!thisScopeName) { return false; @@ -906,18 +896,15 @@ export function findMetadata(colorThemeData: ColorThemeData, captureNames: strin metadata |= (languageId << MetadataConsts.LANGUAGEID_OFFSET); - const themeRule = findMatchingThemeRule(colorThemeData, captureNames); - let tokenStyle: TokenStyle | undefined; - if (!themeRule) { - tokenStyle = colorThemeData.resolveScopes(captureNames.map(name => [name]).reverse()); - } + const definitions: TextMateThemingRuleDefinitions = {}; + const tokenStyle = colorThemeData.resolveScopes([captureNames], definitions); if (captureNames.length > 0) { const standardToken = toStandardTokenType(captureNames[captureNames.length - 1]); metadata |= (standardToken << MetadataConsts.TOKEN_TYPE_OFFSET); } - switch (themeRule?.settings.fontStyle) { + switch (definitions.foreground?.settings.fontStyle) { case 'italic': metadata |= FontStyle.Italic | MetadataConsts.ITALIC_MASK; break; @@ -930,26 +917,9 @@ export function findMetadata(colorThemeData: ColorThemeData, captureNames: strin case 'strikethrough': metadata |= FontStyle.Strikethrough | MetadataConsts.STRIKETHROUGH_MASK; break; - default: - if (typeof tokenStyle?.italic !== 'undefined') { - const italicbit = (tokenStyle?.italic ? FontStyle.Italic : 0); - metadata |= italicbit | MetadataConsts.ITALIC_MASK; - } - if (typeof tokenStyle?.bold !== 'undefined') { - const boldBit = (tokenStyle?.bold ? FontStyle.Bold : 0); - metadata |= boldBit | MetadataConsts.BOLD_MASK; - } - if (typeof tokenStyle?.underline !== 'undefined') { - const underlineBit = (tokenStyle?.underline ? FontStyle.Underline : 0); - metadata |= underlineBit | MetadataConsts.UNDERLINE_MASK; - } - if (typeof tokenStyle?.strikethrough !== 'undefined') { - const strikethroughBit = (tokenStyle?.strikethrough ? FontStyle.Strikethrough : 0); - metadata |= strikethroughBit | MetadataConsts.STRIKETHROUGH_MASK; - } } - const foreground = themeRule ? themeRule.settings.foreground : tokenStyle?.foreground; - const tokenStyleForeground = foreground ? colorThemeData.getTokenColorIndex().get(foreground) : ColorId.DefaultForeground; + const foreground = tokenStyle?.foreground; + const tokenStyleForeground = (foreground !== undefined) ? colorThemeData.getTokenColorIndex().get(foreground) : ColorId.DefaultForeground; metadata |= tokenStyleForeground << MetadataConsts.FOREGROUND_OFFSET; return metadata; diff --git a/src/vs/workbench/services/themes/test/node/tokenStyleResolving.test.ts b/src/vs/workbench/services/themes/test/node/tokenStyleResolving.test.ts index 1eafdcff84f..13c3b9caf20 100644 --- a/src/vs/workbench/services/themes/test/node/tokenStyleResolving.test.ts +++ b/src/vs/workbench/services/themes/test/node/tokenStyleResolving.test.ts @@ -192,6 +192,9 @@ suite('Themes - TokenStyleResolving', () => { tokenStyle = themeData.resolveScopes([['meta.structure.dictionary.json', 'string.quoted.double.json']]); assertTokenStyle(tokenStyle, ts('#66D9EF', undefined), 'json property'); + tokenStyle = themeData.resolveScopes([['source.json', 'meta.structure.dictionary.json', 'string.quoted.double.json']]); + assertTokenStyle(tokenStyle, ts('#66D9EF', undefined), 'json property'); + tokenStyle = themeData.resolveScopes([['keyword'], ['storage.type'], ['entity.name.class']]); assertTokenStyle(tokenStyle, ts('#66D9EF', { italic: true, bold: false, underline: false }), 'storage.type'); diff --git a/src/vs/workbench/services/treeSitter/browser/treeSitterTokenizationFeature.ts b/src/vs/workbench/services/treeSitter/browser/treeSitterTokenizationFeature.ts index 9bd32453f1e..0829476700c 100644 --- a/src/vs/workbench/services/treeSitter/browser/treeSitterTokenizationFeature.ts +++ b/src/vs/workbench/services/treeSitter/browser/treeSitterTokenizationFeature.ts @@ -220,8 +220,8 @@ class TreeSitterTokenizationSupport extends Disposable implements ITreeSitterTok // Check that the current token doesn't just replace the last token if ((previousTokenStartOffset + currentTokenLength) === originalPreviousTokenEndOffset) { - // Current token and previous token span the exact same characters - endOffsetsAndScopes[tokenIndex - 1].scopes.push(capture.name); + // Current token and previous token span the exact same characters, replace the last scope + endOffsetsAndScopes[tokenIndex - 1].scopes[endOffsetsAndScopes[tokenIndex - 1].scopes.length - 1] = capture.name; } else { // The current token is within the previous token. Adjust the end of the previous token. endOffsetsAndScopes[tokenIndex - 1].endOffset = intermediateTokenOffset; From 841d51da29d87958e95fc36f221060bb56efa883 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 30 Sep 2024 15:36:25 +0200 Subject: [PATCH 14/15] write our own little gulp-eslint which takes the eslint from our workspace root (#230115) --- build/eslint.js | 10 +- build/gulp-eslint.js | 78 ++ build/hygiene.js | 10 +- .../preview-src/activeLineMarker.ts | 6 +- .../preview-src/csp.ts | 34 +- .../preview-src/loading.ts | 20 +- package-lock.json | 1092 +---------------- package.json | 2 +- 8 files changed, 180 insertions(+), 1072 deletions(-) create mode 100644 build/gulp-eslint.js diff --git a/build/eslint.js b/build/eslint.js index 288917b35bf..55e11b277d9 100644 --- a/build/eslint.js +++ b/build/eslint.js @@ -8,17 +8,11 @@ const vfs = require('vinyl-fs'); const { eslintFilter } = require('./filters'); function eslint() { - const gulpeslint = require('gulp-eslint'); + const eslint = require('./gulp-eslint'); return vfs .src(eslintFilter, { base: '.', follow: true, allowEmpty: true }) .pipe( - gulpeslint({ - configFile: '.eslintrc.json' - }) - ) - .pipe(gulpeslint.formatEach('compact')) - .pipe( - gulpeslint.results((results) => { + eslint((results) => { if (results.warningCount > 0 || results.errorCount > 0) { throw new Error('eslint failed with warnings and/or errors'); } diff --git a/build/gulp-eslint.js b/build/gulp-eslint.js new file mode 100644 index 00000000000..3373171671b --- /dev/null +++ b/build/gulp-eslint.js @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +const { ESLint } = require('eslint'); +const { Transform } = require('stream'); +const { relative } = require('path'); +const fancyLog = require('fancy-log'); + +/** + * @param {Function} action - A function to handle all ESLint results + * @returns {stream} gulp file stream + */ +function eslint(action) { + const linter = new ESLint(); + const formatter = linter.loadFormatter('compact'); + + const results = []; + results.errorCount = 0; + results.warningCount = 0; + + return transform( + async (file, enc, cb) => { + const filePath = relative(process.cwd(), file.path); + + if (file.isNull()) { + cb(null, file); + return; + } + + if (file.isStream()) { + cb(new Error('vinyl files with Stream contents are not supported')); + return; + } + + try { + // TODO: Should this be checked? + if (await linter.isPathIgnored(filePath)) { + cb(null, file); + return; + } + + const result = (await linter.lintText(file.contents.toString(), { filePath }))[0]; + results.push(result); + results.errorCount += result.errorCount; + results.warningCount += result.warningCount; + + const message = (await formatter).format([result]); + if (message) { + fancyLog(message); + } + cb(null, file); + } catch (error) { + cb(error); + } + }, + (done) => { + try { + action(results); + done(); + } catch (error) { + done(error); + } + }); +} + +function transform(transform, flush) { + return new Transform({ + objectMode: true, + transform, + flush + }); +} + +module.exports = eslint; diff --git a/build/hygiene.js b/build/hygiene.js index 010967c49ff..2edd9470c0b 100644 --- a/build/hygiene.js +++ b/build/hygiene.js @@ -21,7 +21,7 @@ const copyrightHeaderLines = [ ]; function hygiene(some, linting = true) { - const gulpeslint = require('gulp-eslint'); + const eslint = require('./gulp-eslint'); const gulpstylelint = require('./stylelint'); const formatter = require('./lib/formatter'); @@ -172,13 +172,7 @@ function hygiene(some, linting = true) { result .pipe(filter(eslintFilter)) .pipe( - gulpeslint({ - configFile: '.eslintrc.json' - }) - ) - .pipe(gulpeslint.formatEach('compact')) - .pipe( - gulpeslint.results((results) => { + eslint((results) => { errorCount += results.warningCount; errorCount += results.errorCount; }) diff --git a/extensions/markdown-language-features/preview-src/activeLineMarker.ts b/extensions/markdown-language-features/preview-src/activeLineMarker.ts index 2fbffb7371d..75c1ed7cbc9 100644 --- a/extensions/markdown-language-features/preview-src/activeLineMarker.ts +++ b/extensions/markdown-language-features/preview-src/activeLineMarker.ts @@ -12,20 +12,20 @@ export class ActiveLineMarker { this._update(previous && (previous.codeElement || previous.element)); } - _update(before: HTMLElement | undefined) { + private _update(before: HTMLElement | undefined) { this._unmarkActiveElement(this._current); this._markActiveElement(before); this._current = before; } - _unmarkActiveElement(element: HTMLElement | undefined) { + private _unmarkActiveElement(element: HTMLElement | undefined) { if (!element) { return; } element.classList.toggle('code-active-line', false); } - _markActiveElement(element: HTMLElement | undefined) { + private _markActiveElement(element: HTMLElement | undefined) { if (!element) { return; } diff --git a/extensions/markdown-language-features/preview-src/csp.ts b/extensions/markdown-language-features/preview-src/csp.ts index 49d8cb1efe6..ea960dd4ad3 100644 --- a/extensions/markdown-language-features/preview-src/csp.ts +++ b/extensions/markdown-language-features/preview-src/csp.ts @@ -11,45 +11,45 @@ import { getStrings } from './strings'; * Shows an alert when there is a content security policy violation. */ export class CspAlerter { - private didShow = false; - private didHaveCspWarning = false; + private _didShow = false; + private _didHaveCspWarning = false; - private messaging?: MessagePoster; + private _messaging?: MessagePoster; constructor( - private readonly settingsManager: SettingsManager, + private readonly _settingsManager: SettingsManager, ) { document.addEventListener('securitypolicyviolation', () => { - this.onCspWarning(); + this._onCspWarning(); }); window.addEventListener('message', (event) => { if (event && event.data && event.data.name === 'vscode-did-block-svg') { - this.onCspWarning(); + this._onCspWarning(); } }); } public setPoster(poster: MessagePoster) { - this.messaging = poster; - if (this.didHaveCspWarning) { - this.showCspWarning(); + this._messaging = poster; + if (this._didHaveCspWarning) { + this._showCspWarning(); } } - private onCspWarning() { - this.didHaveCspWarning = true; - this.showCspWarning(); + private _onCspWarning() { + this._didHaveCspWarning = true; + this._showCspWarning(); } - private showCspWarning() { + private _showCspWarning() { const strings = getStrings(); - const settings = this.settingsManager.settings; + const settings = this._settingsManager.settings; - if (this.didShow || settings.disableSecurityWarnings || !this.messaging) { + if (this._didShow || settings.disableSecurityWarnings || !this._messaging) { return; } - this.didShow = true; + this._didShow = true; const notification = document.createElement('a'); notification.innerText = strings.cspAlertMessageText; @@ -59,7 +59,7 @@ export class CspAlerter { notification.setAttribute('role', 'button'); notification.setAttribute('aria-label', strings.cspAlertMessageLabel); notification.onclick = () => { - this.messaging!.postMessage('showPreviewSecuritySelector', { source: settings.source }); + this._messaging!.postMessage('showPreviewSecuritySelector', { source: settings.source }); }; document.body.appendChild(notification); } diff --git a/extensions/markdown-language-features/preview-src/loading.ts b/extensions/markdown-language-features/preview-src/loading.ts index c6439188766..bebd440374d 100644 --- a/extensions/markdown-language-features/preview-src/loading.ts +++ b/extensions/markdown-language-features/preview-src/loading.ts @@ -5,15 +5,15 @@ import { MessagePoster } from './messaging'; export class StyleLoadingMonitor { - private unloadedStyles: string[] = []; - private finishedLoading: boolean = false; + private _unloadedStyles: string[] = []; + private _finishedLoading: boolean = false; - private poster?: MessagePoster; + private _poster?: MessagePoster; constructor() { const onStyleLoadError = (event: any) => { const source = event.target.dataset.source; - this.unloadedStyles.push(source); + this._unloadedStyles.push(source); }; window.addEventListener('DOMContentLoaded', () => { @@ -25,18 +25,18 @@ export class StyleLoadingMonitor { }); window.addEventListener('load', () => { - if (!this.unloadedStyles.length) { + if (!this._unloadedStyles.length) { return; } - this.finishedLoading = true; - this.poster?.postMessage('previewStyleLoadError', { unloadedStyles: this.unloadedStyles }); + this._finishedLoading = true; + this._poster?.postMessage('previewStyleLoadError', { unloadedStyles: this._unloadedStyles }); }); } public setPoster(poster: MessagePoster): void { - this.poster = poster; - if (this.finishedLoading) { - poster.postMessage('previewStyleLoadError', { unloadedStyles: this.unloadedStyles }); + this._poster = poster; + if (this._finishedLoading) { + poster.postMessage('previewStyleLoadError', { unloadedStyles: this._unloadedStyles }); } } } diff --git a/package-lock.json b/package-lock.json index 114cfbd7604..9f7cecd26d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,6 +57,7 @@ "@swc/core": "1.3.62", "@types/cookie": "^0.3.3", "@types/debug": "^4.1.5", + "@types/eslint": "^8.56.10", "@types/gulp-svgmin": "^1.2.1", "@types/http-proxy-agent": "^2.0.1", "@types/kerberos": "^1.1.2", @@ -108,7 +109,6 @@ "gulp-bom": "^3.0.0", "gulp-buffer": "0.0.2", "gulp-concat": "^2.6.1", - "gulp-eslint": "^5.0.0", "gulp-filter": "^5.1.0", "gulp-flatmap": "^1.0.2", "gulp-gunzip": "^1.0.0", @@ -1094,23 +1094,23 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", - "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.0", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -1236,14 +1236,14 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "deprecated": "Use @eslint/config-array instead", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -1264,9 +1264,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "deprecated": "Use @eslint/object-schema instead", "dev": true }, @@ -2125,10 +2125,20 @@ "@types/ms": "*" } }, + "node_modules/@types/eslint": { + "version": "8.56.12", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.12.tgz", + "integrity": "sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true }, "node_modules/@types/expect": { @@ -3597,9 +3607,9 @@ } }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -3740,15 +3750,6 @@ "node": ">=0.10.0" } }, - "node_modules/ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/ansi-gray": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", @@ -4106,15 +4107,6 @@ "node": ">=0.10.0" } }, - "node_modules/astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/async-done": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", @@ -4719,12 +4711,6 @@ "node": ">=8" } }, - "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, "node_modules/charenc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", @@ -4954,12 +4940,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", - "dev": true - }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -6562,9 +6542,9 @@ "dev": true }, "node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -6572,27 +6552,9 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { @@ -6641,14 +6603,14 @@ "dev": true }, "node_modules/espree": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", - "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6657,19 +6619,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/esquery": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", @@ -6930,32 +6879,6 @@ "node": ">=0.10.0" } }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/external-editor/node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/extglob": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", @@ -7116,27 +7039,6 @@ "pend": "~1.2.0" } }, - "node_modules/figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/figures/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -7438,12 +7340,13 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.9", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { @@ -7451,16 +7354,16 @@ } }, "node_modules/flat-cache/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -7745,12 +7648,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -8304,9 +8201,9 @@ } }, "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -8976,454 +8873,6 @@ "node": ">= 0.10" } }, - "node_modules/gulp-eslint": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-5.0.0.tgz", - "integrity": "sha512-9GUqCqh85C7rP9120cpxXuZz2ayq3BZc85pCTuPJS03VQYxne0aWPIXWx6LSvsGPa3uRqtSO537vaugOh+5cXg==", - "dev": true, - "dependencies": { - "eslint": "^5.0.1", - "fancy-log": "^1.3.2", - "plugin-error": "^1.0.1" - } - }, - "node_modules/gulp-eslint/node_modules/acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/gulp-eslint/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/gulp-eslint/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/gulp-eslint/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/gulp-eslint/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/gulp-eslint/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/gulp-eslint/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/gulp-eslint/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/gulp-eslint/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/gulp-eslint/node_modules/eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^6.14.0 || ^8.10.0 || >=9.10.0" - } - }, - "node_modules/gulp-eslint/node_modules/eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/gulp-eslint/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/gulp-eslint/node_modules/espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", - "dev": true, - "dependencies": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/gulp-eslint/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/gulp-eslint/node_modules/file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", - "dev": true, - "dependencies": { - "flat-cache": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/gulp-eslint/node_modules/flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", - "dev": true, - "dependencies": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/gulp-eslint/node_modules/flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", - "dev": true - }, - "node_modules/gulp-eslint/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/gulp-eslint/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/gulp-eslint/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/gulp-eslint/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/gulp-eslint/node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/gulp-eslint/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/gulp-eslint/node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/gulp-eslint/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/gulp-eslint/node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/gulp-eslint/node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/gulp-eslint/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/gulp-eslint/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-eslint/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-eslint/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/gulp-eslint/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8= sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/gulp-eslint/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo= sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-eslint/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/gulp-eslint/node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/gulp-eslint/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/gulp-filter": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.1.0.tgz", @@ -10689,18 +10138,6 @@ "node": ">=0.8.0" } }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/icss-utils": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", @@ -10821,208 +10258,6 @@ "node": ">= 0.8.0" } }, - "node_modules/inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", - "dev": true, - "dependencies": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/inquirer/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/inquirer/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", - "dev": true, - "dependencies": { - "restore-cursor": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/inquirer/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/inquirer/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/inquirer/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368= sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", - "dev": true, - "dependencies": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true - }, - "node_modules/inquirer/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/string-width/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8= sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/inquirer/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", @@ -11762,9 +10997,9 @@ } }, "node_modules/js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", + "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", "dev": true, "funding": { "type": "opencollective", @@ -11960,9 +11195,9 @@ } }, "node_modules/keyv": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", - "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "dependencies": { "json-buffer": "3.0.1" @@ -13311,12 +12546,6 @@ "node": ">= 0.10" } }, - "node_modules/mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", - "dev": true - }, "node_modules/nan": { "version": "2.14.2", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", @@ -14073,9 +13302,9 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "dependencies": { "deep-is": "^0.1.3", @@ -14083,7 +13312,7 @@ "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -14436,12 +13665,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -15899,15 +15122,6 @@ "node": ">=0.10.0" } }, - "node_modules/regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", - "dev": true, - "engines": { - "node": ">=6.5.0" - } - }, "node_modules/remove-bom-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", @@ -16320,15 +15534,6 @@ "node": ">=8.0" } }, - "node_modules/run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/run-parallel": { "version": "1.1.10", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", @@ -16349,24 +15554,6 @@ } ] }, - "node_modules/rxjs": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", - "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", - "dev": true, - "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "npm": ">=2.0.0" - } - }, - "node_modules/rxjs/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -16381,12 +15568,6 @@ "ret": "~0.1.10" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, "node_modules/sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -16773,56 +15954,6 @@ "node": ">=8" } }, - "node_modules/slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -17789,71 +16920,6 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "dependencies": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/table/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/table/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/table/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/table/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/table/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/tapable": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", @@ -19463,9 +18529,9 @@ "optional": true }, "node_modules/word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -19557,30 +18623,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "node_modules/write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "dependencies": { - "mkdirp": "^0.5.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/write/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/xml": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", diff --git a/package.json b/package.json index 5c441319f43..3c5159f91c6 100644 --- a/package.json +++ b/package.json @@ -114,6 +114,7 @@ "@swc/core": "1.3.62", "@types/cookie": "^0.3.3", "@types/debug": "^4.1.5", + "@types/eslint": "^8.56.10", "@types/gulp-svgmin": "^1.2.1", "@types/http-proxy-agent": "^2.0.1", "@types/kerberos": "^1.1.2", @@ -165,7 +166,6 @@ "gulp-bom": "^3.0.0", "gulp-buffer": "0.0.2", "gulp-concat": "^2.6.1", - "gulp-eslint": "^5.0.0", "gulp-filter": "^5.1.0", "gulp-flatmap": "^1.0.2", "gulp-gunzip": "^1.0.0", From 7ff86e6dcdf8af5c62c877d081f64a8b4755e521 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Mon, 30 Sep 2024 15:39:34 +0200 Subject: [PATCH 15/15] Changing the wording of the color description for editor IME compositions (#230118) changing the wording of the color description --- src/vs/platform/theme/common/colors/editorColors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/platform/theme/common/colors/editorColors.ts b/src/vs/platform/theme/common/colors/editorColors.ts index a45e35a5c84..662fc637dc8 100644 --- a/src/vs/platform/theme/common/colors/editorColors.ts +++ b/src/vs/platform/theme/common/colors/editorColors.ts @@ -136,7 +136,7 @@ export const editorSelectionHighlightBorder = registerColor('editor.selectionHig export const editorCompositionBorder = registerColor('editor.compositionBorder', { light: '#000000', dark: '#ffffff', hcLight: '#000000', hcDark: '#ffffff' }, - nls.localize('editorCompositionBorder', "The border color for the composition.")); + nls.localize('editorCompositionBorder', "The border color for an IME composition.")); // ----- editor find