Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 (#12295)

* Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3

* Fix test build break

* Update distro

* Fix build errors

* Update distro

* Update REH build file

* Update build task names for REL

* Fix product build yaml

* Fix product REH task name

* Fix type in task name

* Update linux build step

* Update windows build tasks

* Turn off server publish

* Disable REH

* Fix typo

* Bump distro

* Update vscode tests

* Bump distro

* Fix type in disto

* Bump distro

* Turn off docker build

* Remove docker step from release

Co-authored-by: ADS Merger <andresse@microsoft.com>
Co-authored-by: Karl Burtram <karlb@microsoft.com>
This commit is contained in:
Christopher Suh
2020-10-03 14:42:05 -04:00
committed by GitHub
parent 58d02b76db
commit 6ff1e3866b
687 changed files with 10507 additions and 9104 deletions

View File

@@ -16,7 +16,6 @@ import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { UpdateAccountListEventParams } from 'sql/platform/accounts/common/eventTypes';
import { values } from 'vs/base/common/collections';
import { firstIndex } from 'vs/base/common/arrays';
@extHostNamedCustomer(SqlMainContext.MainThreadAccountManagement)
export class MainThreadAccountManagement extends Disposable implements MainThreadAccountManagementShape {
@@ -38,7 +37,7 @@ export class MainThreadAccountManagement extends Disposable implements MainThrea
return;
}
const providerMetadataIndex = firstIndex(values(this._providerMetadata), (providerMetadata: azdata.AccountProviderMetadata) => providerMetadata.id === e.providerId);
const providerMetadataIndex = values(this._providerMetadata).findIndex((providerMetadata: azdata.AccountProviderMetadata) => providerMetadata.id === e.providerId);
if (providerMetadataIndex === -1) {
return;
}

View File

@@ -7,7 +7,6 @@ import { MainThreadDashboardWebviewShape, SqlMainContext, ExtHostDashboardWebvie
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { IDashboardViewService, IDashboardWebview } from 'sql/platform/dashboard/browser/dashboardViewService';
import { find } from 'vs/base/common/arrays';
@extHostNamedCustomer(SqlMainContext.MainThreadDashboardWebview)
export class MainThreadDashboardWebview implements MainThreadDashboardWebviewShape {
@@ -24,7 +23,7 @@ export class MainThreadDashboardWebview implements MainThreadDashboardWebviewSha
) {
this._proxy = context.getProxy(SqlExtHostContext.ExtHostDashboardWebviews);
viewService.onRegisteredWebview(e => {
if (find(this.knownWidgets, x => x === e.id)) {
if (this.knownWidgets.find(x => x === e.id)) {
let handle = MainThreadDashboardWebview._handlePool++;
this._dialogs.set(handle, e);
this._proxy.$registerWidget(handle, e.id, e.connection, e.serverInfo);

View File

@@ -11,7 +11,6 @@ import { Disposable } from 'vs/base/common/lifecycle';
import { IModelViewService } from 'sql/platform/modelComponents/browser/modelViewService';
import { IItemConfig, IComponentShape, IModelView } from 'sql/platform/model/browser/modelViewService';
import { find } from 'vs/base/common/arrays';
@extHostNamedCustomer(SqlMainContext.MainThreadModelView)
@@ -29,7 +28,7 @@ export class MainThreadModelView extends Disposable implements MainThreadModelVi
super();
this._proxy = _context.getProxy(SqlExtHostContext.ExtHostModelView);
viewService.onRegisteredModelView(view => {
if (find(this.knownWidgets, x => x === view.id)) {
if (this.knownWidgets.find(x => x === view.id)) {
let handle = MainThreadModelView._handlePool++;
this._dialogs.set(handle, view);
this._proxy.$registerWidget(handle, view.id, view.connection, view.serverInfo);

View File

@@ -33,7 +33,6 @@ import { localize } from 'vs/nls';
import { IFileService } from 'vs/platform/files/common/files';
import { UntitledNotebookInput } from 'sql/workbench/contrib/notebook/browser/models/untitledNotebookInput';
import { FileNotebookInput } from 'sql/workbench/contrib/notebook/browser/models/fileNotebookInput';
import { find } from 'vs/base/common/arrays';
import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService';
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
import { FileEditorInput } from 'vs/workbench/contrib/files/common/editors/fileEditorInput';
@@ -384,7 +383,7 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
let cell: ICellModel;
if (cellUri) {
let uriString = URI.revive(cellUri).toString();
cell = find(editor.cells, c => c.cellUri.toString() === uriString);
cell = editor.cells.find(c => c.cellUri.toString() === uriString);
// If it's markdown what should we do? Show notification??
} else {
// Use the active cell in this case, or 1st cell if there's none active
@@ -406,11 +405,11 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
let endCell: ICellModel;
if (startCellUri) {
let uriString = URI.revive(startCellUri).toString();
startCell = find(editor.cells, c => c.cellUri.toString() === uriString);
startCell = editor.cells.find(c => c.cellUri.toString() === uriString);
}
if (endCellUri) {
let uriString = URI.revive(endCellUri).toString();
endCell = find(editor.cells, c => c.cellUri.toString() === uriString);
endCell = editor.cells.find(c => c.cellUri.toString() === uriString);
}
return editor.runAllCells(startCell, endCell);
}
@@ -424,7 +423,7 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
let cell: ICellModel;
if (cellUri) {
let uriString = URI.revive(cellUri).toString();
cell = find(editor.cells, c => c.cellUri.toString() === uriString);
cell = editor.cells.find(c => c.cellUri.toString() === uriString);
// If it's markdown what should we do? Show notification??
} else {
// Use the active cell in this case, or 1st cell if there's none active

View File

@@ -13,7 +13,6 @@ import {
import { AzureResource } from 'sql/workbench/api/common/sqlExtHostTypes';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Event, Emitter } from 'vs/base/common/event';
import { firstIndex } from 'vs/base/common/arrays';
import { values } from 'vs/base/common/collections';
export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
@@ -93,7 +92,7 @@ export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
return this.$getAllAccounts().then(() => {
for (const handle in this._accounts) {
const providerHandle = parseInt(handle);
if (firstIndex(this._accounts[handle], (acct) => acct.key.accountId === account.key.accountId) !== -1) {
if (this._accounts[handle].findIndex((acct) => acct.key.accountId === account.key.accountId) !== -1) {
return this._withProvider(providerHandle, (provider: azdata.AccountProvider) => provider.getSecurityToken(account, resource));
}
}
@@ -106,7 +105,7 @@ export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
return this.$getAllAccounts().then(() => {
for (const handle in this._accounts) {
const providerHandle = parseInt(handle);
if (firstIndex(this._accounts[handle], (acct) => acct.key.accountId === account.key.accountId) !== -1) {
if (this._accounts[handle].findIndex((acct) => acct.key.accountId === account.key.accountId) !== -1) {
return this._withProvider(providerHandle, (provider: azdata.AccountProvider) => provider.getAccountSecurityToken(account, tenant, resource));
}
}
@@ -128,7 +127,7 @@ export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
let self = this;
// Look for any account providers that have the same provider ID
let matchingProviderIndex = firstIndex(values(this._providers), (provider: AccountProviderWithMetadata) => {
let matchingProviderIndex = values(this._providers).findIndex((provider: AccountProviderWithMetadata) => {
return provider.metadata.id === providerMetadata.id;
});
if (matchingProviderIndex >= 0) {

View File

@@ -12,7 +12,6 @@ import { SqlMainContext, MainThreadDataProtocolShape, ExtHostDataProtocolShape }
import { DataProviderType } from 'sql/workbench/api/common/sqlExtHostTypes';
import { IURITransformer } from 'vs/base/common/uriIpc';
import { URI } from 'vs/base/common/uri';
import { find } from 'vs/base/common/arrays';
import { RunOnceScheduler } from 'vs/base/common/async';
import { mapToSerializable } from 'sql/base/common/map';
@@ -77,7 +76,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
if (!providersForType) {
return undefined;
}
return find(providersForType, provider => provider.providerId === providerId) as T;
return providersForType.find(provider => provider.providerId === providerId) as T;
}
public getProvidersByType<T extends azdata.DataProvider>(providerType: azdata.DataProviderType): T[] {

View File

@@ -17,7 +17,6 @@ import * as azdata from 'azdata';
import { SqlMainContext, ExtHostModelViewShape, MainThreadModelViewShape, ExtHostModelViewTreeViewsShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IItemConfig, ModelComponentTypes, IComponentShape, IComponentEventArgs, ComponentEventType, ColumnSizingMode, ModelViewAction } from 'sql/workbench/api/common/sqlExtHostTypes';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { firstIndex } from 'vs/base/common/arrays';
import { ILogService } from 'vs/platform/log/common/log';
import { onUnexpectedError } from 'vs/base/common/errors';
@@ -457,7 +456,7 @@ class FormContainerBuilder extends GenericContainerBuilder<azdata.FormContainer,
let result: boolean = false;
if (componentGroup && componentGroup.components !== undefined) {
let firstComponent = componentGroup.components[0];
let index = firstIndex(this._component.itemConfigs, x => x.component.id === firstComponent.component.id);
let index = this._component.itemConfigs.findIndex(x => x.component.id === firstComponent.component.id);
if (index !== -1) {
result = this._component.removeItemAt(index - 1);
}
@@ -709,7 +708,7 @@ class ComponentWrapper implements azdata.Component {
}
public removeItem(item: azdata.Component): boolean {
let index = firstIndex(this.itemConfigs, c => c.component.id === item.id);
let index = this.itemConfigs.findIndex(c => c.component.id === item.id);
if (index >= 0 && index < this.itemConfigs.length) {
return this.removeItemAt(index);
}

View File

@@ -13,7 +13,6 @@ import { readonly } from 'vs/base/common/errors';
import { MainThreadNotebookDocumentsAndEditorsShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostNotebookDocumentData } from 'sql/workbench/api/common/extHostNotebookDocumentData';
import { CellRange, ISingleNotebookEditOperation, ICellRange } from 'sql/workbench/api/common/sqlExtHostTypes';
import { find } from 'vs/base/common/arrays';
import { HideInputTag } from 'sql/platform/notebooks/common/outputRegistry';
export interface INotebookEditOperation {
@@ -96,7 +95,7 @@ export class NotebookEditorEdit {
value.metadata = { tags: [HideInputTag] };
} else if (!value.metadata.tags) {
value.metadata.tags = [HideInputTag];
} else if (!find(value.metadata.tags, x => x === HideInputTag)) {
} else if (!value.metadata.tags.find(x => x === HideInputTag)) {
value.metadata.tags.push(HideInputTag);
}
}

View File

@@ -12,7 +12,6 @@ import {
SqlMainContext,
} from 'sql/workbench/api/common/sqlExtHost.protocol';
import { values } from 'vs/base/common/collections';
import { firstIndex } from 'vs/base/common/arrays';
export class ExtHostResourceProvider extends ExtHostResourceProviderShape {
private _handlePool: number = 0;
@@ -38,7 +37,7 @@ export class ExtHostResourceProvider extends ExtHostResourceProviderShape {
let self = this;
// Look for any account providers that have the same provider ID
let matchingProviderIndex = firstIndex(values(this._providers), (provider: ResourceProviderWithMetadata) => {
let matchingProviderIndex = values(this._providers).findIndex((provider: ResourceProviderWithMetadata) => {
return provider.metadata.id === providerMetadata.id;
});
if (matchingProviderIndex >= 0) {