mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 11:08:31 -05:00
Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 (#14050)
* Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 * Fix breaks * Extension management fixes * Fix breaks in windows bundling * Fix/skip failing tests * Update distro * Add clear to nuget.config * Add hygiene task * Bump distro * Fix hygiene issue * Add build to hygiene exclusion * Update distro * Update hygiene * Hygiene exclusions * Update tsconfig * Bump distro for server breaks * Update build config * Update darwin path * Add done calls to notebook tests * Skip failing tests * Disable smoke tests
This commit is contained in:
@@ -18,7 +18,7 @@ import { getErrorMessage } from 'vs/base/common/errors';
|
||||
|
||||
let notebookMoreActionMsg = localize('notebook.failed', "Please select active cell and try again");
|
||||
const emptyExecutionCountLabel = '[ ]';
|
||||
const HIDE_ICON_CLASS = ' hideIcon';
|
||||
const HIDE_ICON_CLASS = 'hideIcon';
|
||||
|
||||
function hasModelAndCell(context: CellContext, notificationService: INotificationService): boolean {
|
||||
if (!context || !context.model) {
|
||||
|
||||
@@ -18,7 +18,7 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { IColorTheme } from 'vs/platform/theme/common/themeService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IMarkdownRenderResult } from 'vs/editor/contrib/markdown/markdownRenderer';
|
||||
import { IMarkdownRenderResult } from 'vs/editor/browser/core/markdownRenderer';
|
||||
|
||||
import { NotebookMarkdownRenderer } from 'sql/workbench/contrib/notebook/browser/outputs/notebookMarkdown';
|
||||
import { CellView } from 'sql/workbench/contrib/notebook/browser/cellViews/interfaces';
|
||||
|
||||
@@ -509,7 +509,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
action.tooltip = action.label;
|
||||
action.label = '';
|
||||
}
|
||||
return new LabeledMenuItemActionItem(action, this.keybindingService, this.contextMenuService, this.notificationService, 'notebook-button fixed-width');
|
||||
return new LabeledMenuItemActionItem(action, this.keybindingService, this.notificationService, 'notebook-button');
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ import { registerCellComponent } from 'sql/platform/notebooks/common/outputRegis
|
||||
import { TextCellComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/textCell.component';
|
||||
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
|
||||
import { NotebookThemingContribution } from 'sql/workbench/contrib/notebook/browser/notebookThemingContribution';
|
||||
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
|
||||
import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode';
|
||||
import { NotebookExplorerViewletViewsContribution, OpenNotebookExplorerViewletAction } from 'sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet';
|
||||
import 'vs/css!./media/notebook.contribution';
|
||||
|
||||
@@ -443,7 +443,7 @@ export const NOTEBOOK_VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(View
|
||||
id: VIEWLET_ID,
|
||||
name: localize('notebookExplorer.name', "Notebooks"),
|
||||
ctorDescriptor: new SyncDescriptor(NotebookExplorerViewPaneContainer),
|
||||
icon: 'book',
|
||||
icon: { id: 'book' },
|
||||
order: 6,
|
||||
storageId: `${VIEWLET_ID}.state`
|
||||
}, ViewContainerLocation.Sidebar);
|
||||
|
||||
@@ -27,7 +27,7 @@ import { ISearchHistoryService } from 'vs/workbench/contrib/search/common/search
|
||||
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
@@ -87,7 +87,7 @@ export class NotebookSearchView extends SearchView {
|
||||
super(options, fileService, editorService, progressService, notificationService, dialogService, contextViewService, instantiationService, viewDescriptorService, configurationService, contextService, searchWorkbenchService, contextKeyService, replaceService, textFileService, preferencesService, themeService, searchHistoryService, contextMenuService, menuService, accessibilityService, keybindingService, storageService, openerService, telemetryService);
|
||||
|
||||
this.memento = new Memento(this.id, storageService);
|
||||
this.viewletState = this.memento.getMemento(StorageScope.WORKSPACE);
|
||||
this.viewletState = this.memento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
||||
this.viewActions = [
|
||||
this._register(this.instantiationService.createInstance(ClearSearchResultsAction, ClearSearchResultsAction.ID, ClearSearchResultsAction.LABEL)),
|
||||
];
|
||||
@@ -146,7 +146,7 @@ export class NotebookSearchView extends SearchView {
|
||||
e.browserEvent.stopPropagation();
|
||||
|
||||
const actions: IAction[] = [];
|
||||
const actionsDisposable = createAndFillInContextMenuActions(this.contextMenu, { shouldForwardArgs: true }, actions, this.contextMenuService);
|
||||
const actionsDisposable = createAndFillInContextMenuActions(this.contextMenu, { shouldForwardArgs: true }, actions);
|
||||
|
||||
this.contextMenuService.showContextMenu({
|
||||
getAnchor: () => e.anchor,
|
||||
@@ -240,7 +240,7 @@ export class NotebookSearchView extends SearchView {
|
||||
public startSearch(query: ITextQuery, excludePatternText: string, includePatternText: string, triggeredOnType: boolean, searchWidget: NotebookSearchWidget): Thenable<void> {
|
||||
let progressComplete: () => void;
|
||||
this.progressService.withProgress({ location: this.getProgressLocation(), delay: triggeredOnType ? 300 : 0 }, _progress => {
|
||||
return new Promise(resolve => progressComplete = resolve);
|
||||
return new Promise<void>(resolve => progressComplete = resolve);
|
||||
});
|
||||
|
||||
this.state = SearchUIState.Searching;
|
||||
@@ -551,7 +551,7 @@ class CancelSearchAction extends Action {
|
||||
constructor(id: string, label: string,
|
||||
@IViewsService private readonly viewsService: IViewsService
|
||||
) {
|
||||
super(id, label, 'search-action ' + searchStopIcon.classNames);
|
||||
super(id, label, 'search-action ' + searchStopIcon.id);
|
||||
this.update();
|
||||
}
|
||||
|
||||
@@ -578,7 +578,7 @@ class ExpandAllAction extends Action {
|
||||
constructor(id: string, label: string,
|
||||
@IViewsService private readonly viewsService: IViewsService
|
||||
) {
|
||||
super(id, label, 'search-action ' + searchExpandAllIcon.classNames);
|
||||
super(id, label, 'search-action ' + searchExpandAllIcon.id);
|
||||
this.update();
|
||||
}
|
||||
|
||||
@@ -607,7 +607,7 @@ class CollapseDeepestExpandedLevelAction extends Action {
|
||||
constructor(id: string, label: string,
|
||||
@IViewsService private readonly viewsService: IViewsService
|
||||
) {
|
||||
super(id, label, 'search-action ' + searchCollapseAllIcon.classNames);
|
||||
super(id, label, 'search-action ' + searchCollapseAllIcon.id);
|
||||
this.update();
|
||||
}
|
||||
|
||||
@@ -663,7 +663,7 @@ class ClearSearchResultsAction extends Action {
|
||||
constructor(id: string, label: string,
|
||||
@IViewsService private readonly viewsService: IViewsService
|
||||
) {
|
||||
super(id, label, 'search-action ' + searchClearIcon.classNames);
|
||||
super(id, label, 'search-action ' + searchClearIcon.id);
|
||||
this.update();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import * as path from 'vs/base/common/path';
|
||||
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IMarkdownString, removeMarkdownEscapes } from 'vs/base/common/htmlContent';
|
||||
import { IMarkdownRenderResult } from 'vs/editor/contrib/markdown/markdownRenderer';
|
||||
import { IMarkdownRenderResult } from 'vs/editor/browser/core/markdownRenderer';
|
||||
import * as marked from 'vs/base/common/marked/marked';
|
||||
import { defaultGenerator } from 'vs/base/common/idGenerator';
|
||||
import { revive } from 'vs/base/common/marshalling';
|
||||
@@ -56,7 +56,7 @@ export class NotebookMarkdownRenderer {
|
||||
|
||||
// signal to code-block render that the element has been created
|
||||
let signalInnerHTML: () => void;
|
||||
const withInnerHTML = new Promise(c => signalInnerHTML = c);
|
||||
const withInnerHTML = new Promise<void>(c => signalInnerHTML = c);
|
||||
|
||||
let notebookFolder = this._notebookURI ? path.join(path.dirname(this._notebookURI.fsPath), path.sep) : '';
|
||||
if (!this._baseUrls.some(x => x === notebookFolder)) {
|
||||
@@ -150,15 +150,15 @@ export class NotebookMarkdownRenderer {
|
||||
withInnerHTML.then(e => {
|
||||
const span = element.querySelector(`div[data-code="${id}"]`);
|
||||
if (span) {
|
||||
span.innerHTML = strValue;
|
||||
span.innerHTML = strValue.innerHTML;
|
||||
}
|
||||
}).catch(err => {
|
||||
// ignore
|
||||
});
|
||||
});
|
||||
|
||||
if (options.codeBlockRenderCallback) {
|
||||
promise.then(options.codeBlockRenderCallback);
|
||||
if (options.asyncRenderCallback) {
|
||||
promise.then(options.asyncRenderCallback);
|
||||
}
|
||||
|
||||
return `<div class="code" data-code="${id}">${escape(code)}</div>`;
|
||||
|
||||
@@ -39,7 +39,7 @@ import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
||||
import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
@@ -57,7 +57,6 @@ import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/commo
|
||||
import { workbenchInstantiationService } from 'vs/workbench/test/browser/workbenchTestServices';
|
||||
import { IProductService } from 'vs/platform/product/common/productService';
|
||||
import { IHostColorSchemeService } from 'vs/workbench/services/themes/common/hostColorSchemeService';
|
||||
import { ColorScheme } from 'vs/platform/theme/common/theme';
|
||||
import { CellModel } from 'sql/workbench/services/notebook/browser/models/cell';
|
||||
|
||||
class NotebookModelStub extends stubs.NotebookModelStub {
|
||||
@@ -87,7 +86,8 @@ class NotebookModelStub extends stubs.NotebookModelStub {
|
||||
suite('Test class NotebookEditor:', () => {
|
||||
let instantiationService = <TestInstantiationService>workbenchInstantiationService();
|
||||
instantiationService.stub(IHostColorSchemeService, {
|
||||
colorScheme: ColorScheme.DARK,
|
||||
dark: true,
|
||||
highContrast: false,
|
||||
onDidChangeColorScheme: new Emitter<void>().event
|
||||
});
|
||||
let workbenchThemeService = instantiationService.createInstance(WorkbenchThemeService);
|
||||
|
||||
@@ -384,6 +384,7 @@ suite.skip('NotebookService:', function (): void {
|
||||
}
|
||||
},
|
||||
isBuiltin: false,
|
||||
isUserBuiltin: false,
|
||||
isUnderDevelopment: true,
|
||||
extensionLocation: URI.parse('extLocation1'),
|
||||
enableProposedApi: false,
|
||||
|
||||
@@ -245,7 +245,7 @@ suite('NotebookViewModel', function (): void {
|
||||
notificationService = TypeMoq.Mock.ofType(TestNotificationService, TypeMoq.MockBehavior.Loose);
|
||||
capabilitiesService = TypeMoq.Mock.ofType(TestCapabilitiesService);
|
||||
memento = TypeMoq.Mock.ofType(Memento, TypeMoq.MockBehavior.Loose, '');
|
||||
memento.setup(x => x.getMemento(TypeMoq.It.isAny())).returns(() => void 0);
|
||||
memento.setup(x => x.getMemento(TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(() => void 0);
|
||||
queryConnectionService = TypeMoq.Mock.ofType(TestConnectionManagementService, TypeMoq.MockBehavior.Loose, memento.object, undefined, new TestStorageService());
|
||||
queryConnectionService.callBase = true;
|
||||
let serviceCollection = new ServiceCollection();
|
||||
|
||||
@@ -135,7 +135,7 @@ suite('NotebookViews', function (): void {
|
||||
notificationService = TypeMoq.Mock.ofType(TestNotificationService, TypeMoq.MockBehavior.Loose);
|
||||
capabilitiesService = TypeMoq.Mock.ofType(TestCapabilitiesService);
|
||||
memento = TypeMoq.Mock.ofType(Memento, TypeMoq.MockBehavior.Loose, '');
|
||||
memento.setup(x => x.getMemento(TypeMoq.It.isAny())).returns(() => void 0);
|
||||
memento.setup(x => x.getMemento(TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(() => void 0);
|
||||
queryConnectionService = TypeMoq.Mock.ofType(TestConnectionManagementService, TypeMoq.MockBehavior.Loose, memento.object, undefined, new TestStorageService());
|
||||
queryConnectionService.callBase = true;
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ suite('Notebook Editor Model', function (): void {
|
||||
const logService = new NullLogService();
|
||||
const notificationService = TypeMoq.Mock.ofType(TestNotificationService, TypeMoq.MockBehavior.Loose);
|
||||
let memento = TypeMoq.Mock.ofType(Memento, TypeMoq.MockBehavior.Loose, '');
|
||||
memento.setup(x => x.getMemento(TypeMoq.It.isAny())).returns(() => void 0);
|
||||
memento.setup(x => x.getMemento(TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(() => void 0);
|
||||
let testinstantiationService = new TestInstantiationService();
|
||||
testinstantiationService.stub(IStorageService, new TestStorageService());
|
||||
testinstantiationService.stub(IProductService, { quality: 'stable' });
|
||||
|
||||
@@ -82,7 +82,8 @@ suite('Notebook Find Model', function (): void {
|
||||
notificationService = TypeMoq.Mock.ofType(TestNotificationService, TypeMoq.MockBehavior.Loose);
|
||||
capabilitiesService = TypeMoq.Mock.ofType(TestCapabilitiesService);
|
||||
memento = TypeMoq.Mock.ofType(Memento, TypeMoq.MockBehavior.Loose, '');
|
||||
memento.setup(x => x.getMemento(TypeMoq.It.isAny())).returns(() => void 0);
|
||||
memento.setup(x => x.getMemento(TypeMoq.It.isAny(), TypeMoq.It.isAny()
|
||||
)).returns(() => void 0);
|
||||
queryConnectionService = TypeMoq.Mock.ofType(TestConnectionManagementService, TypeMoq.MockBehavior.Loose, memento.object, undefined, new TestStorageService());
|
||||
queryConnectionService.callBase = true;
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ suite('notebook model', function (): void {
|
||||
notificationService = TypeMoq.Mock.ofType(TestNotificationService, TypeMoq.MockBehavior.Loose);
|
||||
capabilitiesService = new TestCapabilitiesService();
|
||||
memento = TypeMoq.Mock.ofType(Memento, TypeMoq.MockBehavior.Loose, '');
|
||||
memento.setup(x => x.getMemento(TypeMoq.It.isAny())).returns(() => void 0);
|
||||
memento.setup(x => x.getMemento(TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(() => void 0);
|
||||
queryConnectionService = TypeMoq.Mock.ofType(TestConnectionManagementService, TypeMoq.MockBehavior.Loose, memento.object, undefined, new TestStorageService());
|
||||
queryConnectionService.callBase = true;
|
||||
let serviceCollection = new ServiceCollection();
|
||||
|
||||
Reference in New Issue
Block a user