Merge vscode source through 1.62 release (#19981)

* Build breaks 1

* Build breaks

* Build breaks

* Build breaks

* More build breaks

* Build breaks (#2512)

* Runtime breaks

* Build breaks

* Fix dialog location break

* Update typescript

* Fix ASAR break issue

* Unit test breaks

* Update distro

* Fix breaks in ADO builds (#2513)

* Bump to node 16

* Fix hygiene errors

* Bump distro

* Remove reference to node type

* Delete vscode specific extension

* Bump to node 16 in CI yaml

* Skip integration tests in CI builds (while fixing)

* yarn.lock update

* Bump moment dependency in remote yarn

* Fix drop-down chevron style

* Bump to node 16

* Remove playwrite from ci.yaml

* Skip building build scripts in hygine check
This commit is contained in:
Karl Burtram
2022-07-11 14:09:32 -07:00
committed by GitHub
parent fa0fcef303
commit 26455e9113
1876 changed files with 72050 additions and 37997 deletions

View File

@@ -129,6 +129,7 @@ export class BackupRestoreUrlBrowserDialog extends Modal {
let linkAccountText = localize('backupRestoreUrlBrowserDialog.linkAccount', "Link account");
let linkAccountButton = DialogHelper.appendRow(tableContainer, '', 'url-input-label', 'url-input-box');
const linkAccount: Link = this._register(this._instantiationService.createInstance(Link,
linkAccountButton,
{
label: linkAccountText,
title: linkAccountText,

View File

@@ -6,11 +6,11 @@
import { NgModuleRef, PlatformRef, Provider, enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { IInstantiationService, _util, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { IEditorInput } from 'vs/workbench/common/editor';
import { Trace } from 'vs/platform/instantiation/common/instantiationService';
import { IModuleFactory, IBootstrapParams } from 'sql/workbench/services/bootstrap/common/bootstrapParams';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { ILogService } from 'vs/platform/log/common/log';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
const selectorCounter = new Map<string, number>();
@@ -39,7 +39,7 @@ function createUniqueSelector(selector: string): string {
let platform: PlatformRef;
export function bootstrapAngular<T>(accessor: ServicesAccessor, moduleType: IModuleFactory<T>, container: HTMLElement, selectorString: string, params: IBootstrapParams, input?: IEditorInput, callbackSetModule?: (value: NgModuleRef<T>) => void): string {
export function bootstrapAngular<T>(accessor: ServicesAccessor, moduleType: IModuleFactory<T>, container: HTMLElement, selectorString: string, params: IBootstrapParams, input?: EditorInput, callbackSetModule?: (value: NgModuleRef<T>) => void): string {
// Create the uniqueSelectorString
let uniqueSelectorString = createUniqueSelector(selectorString);
let selector = document.createElement(uniqueSelectorString);

View File

@@ -45,9 +45,10 @@ import { ConnectionBrowseTab } from 'sql/workbench/services/connection/browser/c
import { ElementSizeObserver } from 'vs/editor/browser/config/elementSizeObserver';
import { ConnectionProviderAndExtensionMap, ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService';
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { VIEWLET_ID as ExtensionsViewletID } from 'vs/workbench/contrib/extensions/common/extensions';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite';
import { ViewContainerLocation } from 'vs/workbench/common/views';
export interface OnShowUIResponse {
selectedProviderDisplayName: string;
@@ -130,7 +131,7 @@ export class ConnectionDialogWidget extends Modal {
@IConfigurationService private _configurationService: IConfigurationService,
@ICapabilitiesService private _capabilitiesService: ICapabilitiesService,
@INotificationService private _notificationService: INotificationService,
@IViewletService private _viewletService: IViewletService,
@IPaneCompositePartService private _paneCompositeService: IPaneCompositePartService,
@ICommandService private _commandService: ICommandService
) {
super(
@@ -426,7 +427,7 @@ export class ConnectionDialogWidget extends Modal {
label: localize('connectionDialog.viewExtensions', "View Extensions"),
run: async () => {
this.close();
await this._viewletService.openViewlet(ExtensionsViewletID, true);
await this._paneCompositeService.openPaneComposite(ExtensionsViewletID, ViewContainerLocation.Sidebar);
}
}]);
}

View File

@@ -18,8 +18,8 @@ import { IViewDescriptorService } from 'vs/workbench/common/views';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite';
export class TestConnectionDialogWidget extends ConnectionDialogWidget {
constructor(
@@ -41,9 +41,9 @@ export class TestConnectionDialogWidget extends ConnectionDialogWidget {
@IConfigurationService configurationService: IConfigurationService,
@ICapabilitiesService capabilitiesService: ICapabilitiesService,
@INotificationService notificationService: INotificationService,
@IViewletService viewletService: IViewletService,
@IPaneCompositePartService paneCompositeService: IPaneCompositePartService,
@ICommandService commandService: ICommandService
) {
super(providerDisplayNameOptions, selectedProviderType, providerNameToDisplayNameMap, _instantiationService, _connectionManagementService, _contextMenuService, _contextViewService, themeService, layoutService, telemetryService, contextKeyService, clipboardService, logService, textResourcePropertiesService, configurationService, capabilitiesService, notificationService, viewletService, commandService);
super(providerDisplayNameOptions, selectedProviderType, providerNameToDisplayNameMap, _instantiationService, _connectionManagementService, _contextMenuService, _contextViewService, themeService, layoutService, telemetryService, contextKeyService, clipboardService, logService, textResourcePropertiesService, configurationService, capabilitiesService, notificationService, paneCompositeService, commandService);
}
}

View File

@@ -85,7 +85,7 @@ suite('Insights Utils tests', function () {
new Workspace(
'TestWorkspace',
[toWorkspaceFolder(URI.file(queryFileDir))],
undefined, undefined
undefined, undefined, undefined
));
const configurationResolverService = new ConfigurationResolverService(
undefined,
@@ -118,7 +118,7 @@ suite('Insights Utils tests', function () {
new Workspace(
'TestWorkspace',
[toWorkspaceFolder(URI.file(os.tmpdir()))],
undefined, undefined)
undefined, undefined, undefined)
);
const configurationResolverService = new ConfigurationResolverService(
undefined,
@@ -154,7 +154,7 @@ suite('Insights Utils tests', function () {
const contextService = new TestContextService(
new Workspace(
'TestWorkspace',
undefined, undefined, undefined));
undefined, undefined, undefined, undefined));
const configurationResolverService = new ConfigurationResolverService(
undefined,
undefined,
@@ -186,7 +186,7 @@ suite('Insights Utils tests', function () {
test.skip('resolveQueryFilePath resolves path correctly with env var and empty workspace', async () => {
const contextService = new TestContextService(
new Workspace('TestWorkspace',
undefined, undefined, undefined));
undefined, undefined, undefined, undefined));
const environmentService = new MockWorkbenchEnvironmentService({ TEST_PATH: queryFileDir });
@@ -217,7 +217,7 @@ suite('Insights Utils tests', function () {
test('resolveQueryFilePath resolves path correctly with env var and non-empty workspace', async () => {
const contextService = new TestContextService(
new Workspace('TestWorkspace', [toWorkspaceFolder(URI.file(os.tmpdir()))], undefined, undefined));
new Workspace('TestWorkspace', [toWorkspaceFolder(URI.file(os.tmpdir()))], undefined, undefined, undefined));
const environmentService = new MockWorkbenchEnvironmentService({ TEST_PATH: queryFileDir });

View File

@@ -4,18 +4,17 @@
*--------------------------------------------------------------------------------------------*/
import { Registry } from 'vs/platform/registry/common/platform';
import { IEditorInput } from 'vs/workbench/common/editor';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
import { ServicesAccessor, IInstantiationService, BrandedService } from 'vs/platform/instantiation/common/instantiation';
import { IDisposable, toDisposable } from 'vs/base/common/lifecycle';
export type InputCreator = (servicesAccessor: ServicesAccessor, activeEditor: IEditorInput) => EditorInput | undefined;
export type BaseInputCreator = (activeEditor: IEditorInput) => IEditorInput;
export type InputCreator = (servicesAccessor: ServicesAccessor, activeEditor: EditorInput) => EditorInput | undefined;
export type BaseInputCreator = (activeEditor: EditorInput) => EditorInput;
export interface ILanguageAssociation {
convertInput(activeEditor: IEditorInput): Promise<EditorInput | undefined> | EditorInput | undefined;
syncConvertInput?(activeEditor: IEditorInput): EditorInput | undefined;
createBase(activeEditor: IEditorInput): IEditorInput;
convertInput(activeEditor: EditorInput): Promise<EditorInput | undefined> | EditorInput | undefined;
syncConvertInput?(activeEditor: EditorInput): EditorInput | undefined;
createBase(activeEditor: EditorInput): EditorInput;
}
type ILanguageAssociationSignature<Services extends BrandedService[]> = new (...services: Services) => ILanguageAssociation;

View File

@@ -7,16 +7,16 @@ import { URI } from 'vs/base/common/uri';
import { Event } from 'vs/base/common/event';
import { IContentLoader } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
import { IStandardKernelWithProvider } from 'sql/workbench/services/notebook/browser/models/notebookUtils';
import { IEditorInput } from 'vs/workbench/common/editor';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
export interface INotebookInput extends IEditorInput {
export abstract class INotebookInput extends EditorInput {
defaultKernel?: azdata.nb.IKernelSpec;
connectionProfile?: azdata.IConnectionProfile;
setNotebookContents(contents: azdata.nb.INotebookContents): void;
isDirty(): boolean;
setDirty(boolean);
setNotebookContents(contents: azdata.nb.INotebookContents): void { }
//isDirty(): boolean { return false; }
setDirty(boolean) { }
readonly notebookUri: URI;
updateModel(): Promise<void>;
updateModel(): Promise<void> { return undefined; }
readonly editorOpenedTimestamp: number;
readonly layoutChanged: Event<void>;
readonly contentLoader: IContentLoader;

View File

@@ -17,10 +17,12 @@ import { NotebookChangeType, CellType } from 'sql/workbench/services/notebook/co
import { IBootstrapParams } from 'sql/workbench/services/bootstrap/common/bootstrapParams';
import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor';
import { Range } from 'vs/editor/common/core/range';
import { IEditorInput, IEditorPane } from 'vs/workbench/common/editor';
import { IEditorPane } from 'vs/workbench/common/editor';
import { INotebookInput } from 'sql/workbench/services/notebook/browser/interface';
import { INotebookShowOptions } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { NotebookViewsExtension } from 'sql/workbench/services/notebook/browser/notebookViews/notebookViewsExtension';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
import { ICodeEditorViewState } from 'vs/editor/common/editorCommon';
export const SERVICE_ID = 'sqlNotebookService';
export const INotebookService = createDecorator<INotebookService>(SERVICE_ID);
@@ -139,7 +141,7 @@ export interface INotebookService {
*/
notifyCellExecutionStarted(): void;
createNotebookInputFromContents(providerId: string, contents?: azdata.nb.INotebookContents, resource?: UriComponents): Promise<IEditorInput | undefined>;
createNotebookInputFromContents(providerId: string, contents?: azdata.nb.INotebookContents, resource?: UriComponents): Promise<EditorInput | undefined>;
openNotebook(resource: UriComponents, options: INotebookShowOptions): Promise<IEditorPane | undefined>;
@@ -196,7 +198,7 @@ export interface ICellEditorProvider {
hasEditor(): boolean;
isCellOutput: boolean;
cellGuid(): string;
getEditor(): BaseTextEditor;
getEditor(): BaseTextEditor<ICodeEditorViewState>;
deltaDecorations(newDecorationsRange: NotebookRange | NotebookRange[], oldDecorationsRange: NotebookRange | NotebookRange[]): void;
}

View File

@@ -47,12 +47,13 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService';
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IEditorInput, IEditorPane } from 'vs/workbench/common/editor';
import { IEditorPane } from 'vs/workbench/common/editor';
import { isINotebookInput } from 'sql/workbench/services/notebook/browser/interface';
import { INotebookShowOptions } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { DEFAULT_NB_LANGUAGE_MODE, INTERACTIVE_LANGUAGE_MODE, INTERACTIVE_PROVIDER_ID, JUPYTER_PROVIDER_ID, NotebookLanguage } from 'sql/workbench/common/constants';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { SqlSerializationProvider } from 'sql/workbench/services/notebook/browser/sql/sqlSerializationProvider';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
const languageAssociationRegistry = Registry.as<ILanguageAssociationRegistry>(LanguageAssociationExtensions.LanguageAssociations);
@@ -185,7 +186,7 @@ export class NotebookService extends Disposable implements INotebookService {
private _trustedCacheQueue: URI[] = [];
private _unTrustedCacheQueue: URI[] = [];
private _onCodeCellExecutionStart: Emitter<void> = new Emitter<void>();
private _notebookInputsMap: Map<string, IEditorInput> = new Map();
private _notebookInputsMap: Map<string, EditorInput> = new Map();
constructor(
@ILifecycleService lifecycleService: ILifecycleService,
@@ -260,7 +261,7 @@ export class NotebookService extends Disposable implements INotebookService {
return uri;
}
public async createNotebookInputFromContents(providerId: string, contents?: nb.INotebookContents, resource?: UriComponents): Promise<IEditorInput> {
public async createNotebookInputFromContents(providerId: string, contents?: nb.INotebookContents, resource?: UriComponents): Promise<EditorInput> {
let uri: URI;
if (resource) {
uri = URI.revive(resource);
@@ -276,7 +277,7 @@ export class NotebookService extends Disposable implements INotebookService {
return this.createNotebookInput(options, resource);
}
private async createNotebookInput(options: INotebookShowOptions, resource?: UriComponents): Promise<IEditorInput | undefined> {
private async createNotebookInput(options: INotebookShowOptions, resource?: UriComponents): Promise<EditorInput | undefined> {
let uri: URI;
if (resource) {
uri = URI.revive(resource);
@@ -288,7 +289,7 @@ export class NotebookService extends Disposable implements INotebookService {
}
let isUntitled: boolean = uri.scheme === Schemas.untitled;
let fileInput: IEditorInput;
let fileInput: EditorInput;
let languageMode = options.providerId === INTERACTIVE_PROVIDER_ID ? INTERACTIVE_LANGUAGE_MODE : DEFAULT_NB_LANGUAGE_MODE;
let initialStringContents: string;
if (options.initialContent) {
@@ -307,7 +308,8 @@ export class NotebookService extends Disposable implements INotebookService {
const model = this._untitledEditorService.create({ untitledResource: uri, mode: languageMode, initialValue: initialStringContents });
fileInput = this._instantiationService.createInstance(UntitledTextEditorInput, model);
} else {
fileInput = this._editorService.createEditorInput({ forceFile: true, resource: uri, mode: languageMode });
let input: any = { forceFile: true, resource: uri, mode: languageMode };
fileInput = this._editorService.createEditorInput(input);
}
}

View File

@@ -17,7 +17,7 @@ suite('Query Editor Service', () => {
const editorService = instantiationService.invokeFunction(accessor => accessor.get(IEditorService));
const untitledService = instantiationService.invokeFunction(accessor => accessor.get(IUntitledTextEditorService));
const openStub = sinon.stub(editorService, 'openEditor').callsFake(() => Promise.resolve(undefined));
sinon.stub(editorService, 'createEditorInput').callsFake(() => instantiationService.createInstance(UntitledTextEditorInput, untitledService.create()));
sinon.stub(editorService, 'createEditorInput').callsFake(() => <any>instantiationService.createInstance(UntitledTextEditorInput, untitledService.create()));
const queryEditorService = instantiationService.createInstance(QueryEditorService);
await queryEditorService.newSqlEditor({ open: true });
@@ -30,7 +30,7 @@ suite('Query Editor Service', () => {
const editorService = instantiationService.invokeFunction(accessor => accessor.get(IEditorService));
const untitledService = instantiationService.invokeFunction(accessor => accessor.get(IUntitledTextEditorService));
const openStub = sinon.stub(editorService, 'openEditor').callsFake(() => Promise.resolve(undefined));
sinon.stub(editorService, 'createEditorInput').callsFake(() => instantiationService.createInstance(UntitledTextEditorInput, untitledService.create()));
sinon.stub(editorService, 'createEditorInput').callsFake(() => <any>instantiationService.createInstance(UntitledTextEditorInput, untitledService.create()));
const queryEditorService = instantiationService.createInstance(QueryEditorService);
await queryEditorService.newSqlEditor();
@@ -43,7 +43,7 @@ suite('Query Editor Service', () => {
const editorService = instantiationService.invokeFunction(accessor => accessor.get(IEditorService));
const untitledService = instantiationService.invokeFunction(accessor => accessor.get(IUntitledTextEditorService));
const openStub = sinon.stub(editorService, 'openEditor').callsFake(() => Promise.resolve(undefined));
sinon.stub(editorService, 'createEditorInput').callsFake(() => instantiationService.createInstance(UntitledTextEditorInput, untitledService.create()));
sinon.stub(editorService, 'createEditorInput').callsFake(() => <any>instantiationService.createInstance(UntitledTextEditorInput, untitledService.create()));
const queryEditorService = instantiationService.createInstance(QueryEditorService);
await queryEditorService.newSqlEditor({ open: false });