mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
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:
@@ -30,7 +30,6 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { testWorkspace } from 'vs/platform/workspace/test/common/testWorkspace';
|
||||
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
|
||||
import { IPager } from 'vs/base/common/paging';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { ConfigurationKey, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||
@@ -166,10 +165,9 @@ const noAssets: IGalleryExtensionAssets = {
|
||||
};
|
||||
|
||||
function aGalleryExtension(name: string, properties: any = {}, galleryExtensionProperties: any = {}, assets: IGalleryExtensionAssets = noAssets): IGalleryExtension {
|
||||
const galleryExtension = <IGalleryExtension>Object.create({});
|
||||
assign(galleryExtension, { name, publisher: 'pub', version: '1.0.0', properties: {}, assets: {} }, properties);
|
||||
assign(galleryExtension.properties, { dependencies: [] }, galleryExtensionProperties);
|
||||
assign(galleryExtension.assets, assets);
|
||||
const galleryExtension = <IGalleryExtension>Object.create({ name, publisher: 'pub', version: '1.0.0', properties: {}, assets: {}, ...properties });
|
||||
galleryExtension.properties = { ...galleryExtension.properties, dependencies: [], ...galleryExtensionProperties };
|
||||
galleryExtension.assets = { ...galleryExtension.assets, ...assets };
|
||||
galleryExtension.identifier = { id: getGalleryExtensionId(galleryExtension.publisher, galleryExtension.name), uuid: uuid.generateUuid() };
|
||||
return <IGalleryExtension>galleryExtension;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { IExtensionsWorkbenchService, ExtensionContainers } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||
import * as ExtensionsActions from 'vs/workbench/contrib/extensions/browser/extensionsActions';
|
||||
@@ -41,7 +40,6 @@ import { ILabelService, IFormatterChangeEvent } from 'vs/platform/label/common/l
|
||||
import { ExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService';
|
||||
import { IProductService } from 'vs/platform/product/common/productService';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { ProgressService } from 'vs/workbench/services/progress/browser/progressService';
|
||||
@@ -470,7 +468,7 @@ suite('ExtensionsActions', () => {
|
||||
testObject.extension = extensions[0];
|
||||
instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: local.identifier, version: '1.0.1' })));
|
||||
assert.ok(!testObject.enabled);
|
||||
return new Promise(c => {
|
||||
return new Promise<void>(c => {
|
||||
testObject.onDidChange(() => {
|
||||
if (testObject.enabled) {
|
||||
c();
|
||||
@@ -1026,7 +1024,7 @@ suite('ExtensionsActions', () => {
|
||||
.then(async () => {
|
||||
instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: local[0].identifier, version: '1.0.2' }), aGalleryExtension('b', { identifier: local[1].identifier, version: '1.0.2' }), aGalleryExtension('c', local[2].manifest)));
|
||||
assert.ok(!testObject.enabled);
|
||||
return new Promise(c => {
|
||||
return new Promise<void>(c => {
|
||||
testObject.onDidChange(() => {
|
||||
if (testObject.enabled) {
|
||||
c();
|
||||
@@ -1047,7 +1045,7 @@ suite('ExtensionsActions', () => {
|
||||
.then(async () => {
|
||||
instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(...gallery));
|
||||
assert.ok(!testObject.enabled);
|
||||
return new Promise(c => {
|
||||
return new Promise<void>(c => {
|
||||
installEvent.fire({ identifier: local[0].identifier, gallery: gallery[0] });
|
||||
testObject.onDidChange(() => {
|
||||
if (testObject.enabled) {
|
||||
@@ -1247,7 +1245,7 @@ suite('ReloadAction', () => {
|
||||
const extensions = await workbenchService.queryLocal();
|
||||
testObject.extension = extensions[0];
|
||||
|
||||
return new Promise(c => {
|
||||
return new Promise<void>(c => {
|
||||
testObject.onDidChange(() => {
|
||||
if (testObject.enabled && testObject.tooltip === 'Please reload Azure Data Studio to enable the updated extension.') { // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
|
||||
c();
|
||||
@@ -2494,20 +2492,20 @@ suite('LocalInstallAction', () => {
|
||||
});
|
||||
|
||||
function aLocalExtension(name: string = 'someext', manifest: any = {}, properties: any = {}): ILocalExtension {
|
||||
manifest = assign({ name, publisher: 'pub', version: '1.0.0' }, manifest);
|
||||
properties = assign({
|
||||
manifest = { name, publisher: 'pub', version: '1.0.0', ...manifest };
|
||||
properties = {
|
||||
type: ExtensionType.User,
|
||||
location: URI.file(`pub.${name}`),
|
||||
identifier: { id: getGalleryExtensionId(manifest.publisher, manifest.name) }
|
||||
}, properties);
|
||||
identifier: { id: getGalleryExtensionId(manifest.publisher, manifest.name) },
|
||||
...properties
|
||||
};
|
||||
return <ILocalExtension>Object.create({ manifest, ...properties });
|
||||
}
|
||||
|
||||
function aGalleryExtension(name: string, properties: any = {}, galleryExtensionProperties: any = {}, assets: any = {}): IGalleryExtension {
|
||||
const galleryExtension = <IGalleryExtension>Object.create({});
|
||||
assign(galleryExtension, { name, publisher: 'pub', version: '1.0.0', properties: {}, assets: {} }, properties);
|
||||
assign(galleryExtension.properties, { dependencies: [] }, galleryExtensionProperties);
|
||||
assign(galleryExtension.assets, assets);
|
||||
const galleryExtension = <IGalleryExtension>Object.create({ name, publisher: 'pub', version: '1.0.0', properties: {}, assets: {}, ...properties });
|
||||
galleryExtension.properties = { ...galleryExtension.properties, dependencies: [], ...galleryExtensionProperties };
|
||||
galleryExtension.assets = { ...galleryExtension.assets, ...assets };
|
||||
galleryExtension.identifier = { id: getGalleryExtensionId(galleryExtension.publisher, galleryExtension.name), uuid: generateUuid() };
|
||||
return <IGalleryExtension>galleryExtension;
|
||||
}
|
||||
@@ -2528,7 +2526,7 @@ function aSingleRemoteExtensionManagementServerService(instantiationService: Tes
|
||||
remoteExtensionManagementServer,
|
||||
webExtensionManagementServer: null,
|
||||
getExtensionManagementServer: (extension: IExtension) => {
|
||||
if (extension.location.scheme === REMOTE_HOST_SCHEME) {
|
||||
if (extension.location.scheme === Schemas.vscodeRemote) {
|
||||
return remoteExtensionManagementServer;
|
||||
}
|
||||
return null;
|
||||
@@ -2556,7 +2554,7 @@ function aMultiExtensionManagementServerService(instantiationService: TestInstan
|
||||
if (extension.location.scheme === Schemas.file) {
|
||||
return localExtensionManagementServer;
|
||||
}
|
||||
if (extension.location.scheme === REMOTE_HOST_SCHEME) {
|
||||
if (extension.location.scheme === Schemas.vscodeRemote) {
|
||||
return remoteExtensionManagementServer;
|
||||
}
|
||||
throw new Error('');
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { ExtensionsListView } from 'vs/workbench/contrib/extensions/browser/extensionsViews';
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
@@ -525,21 +524,21 @@ suite('ExtensionsListView Tests', () => {
|
||||
});
|
||||
|
||||
function aLocalExtension(name: string = 'someext', manifest: any = {}, properties: any = {}): ILocalExtension {
|
||||
manifest = assign({ name, publisher: 'pub', version: '1.0.0' }, manifest);
|
||||
properties = assign({
|
||||
manifest = { name, publisher: 'pub', version: '1.0.0', ...manifest };
|
||||
properties = {
|
||||
type: ExtensionType.User,
|
||||
location: URI.file(`pub.${name}`),
|
||||
identifier: { id: getGalleryExtensionId(manifest.publisher, manifest.name), uuid: undefined },
|
||||
metadata: { id: getGalleryExtensionId(manifest.publisher, manifest.name), publisherId: manifest.publisher, publisherDisplayName: 'somename' }
|
||||
}, properties);
|
||||
identifier: { id: getGalleryExtensionId(manifest.publisher, manifest.name) },
|
||||
metadata: { id: getGalleryExtensionId(manifest.publisher, manifest.name), publisherId: manifest.publisher, publisherDisplayName: 'somename' },
|
||||
...properties
|
||||
};
|
||||
return <ILocalExtension>Object.create({ manifest, ...properties });
|
||||
}
|
||||
|
||||
function aGalleryExtension(name: string, properties: any = {}, galleryExtensionProperties: any = {}, assets: any = {}): IGalleryExtension {
|
||||
const galleryExtension = <IGalleryExtension>Object.create({});
|
||||
assign(galleryExtension, { name, publisher: 'pub', version: '1.0.0', properties: {}, assets: {} }, properties);
|
||||
assign(galleryExtension.properties, { dependencies: [] }, galleryExtensionProperties);
|
||||
assign(galleryExtension.assets, assets);
|
||||
const galleryExtension = <IGalleryExtension>Object.create({ name, publisher: 'pub', version: '1.0.0', properties: {}, assets: {}, ...properties });
|
||||
galleryExtension.properties = { ...galleryExtension.properties, dependencies: [], ...galleryExtensionProperties };
|
||||
galleryExtension.assets = { ...galleryExtension.assets, ...assets };
|
||||
galleryExtension.identifier = { id: getGalleryExtensionId(galleryExtension.publisher, galleryExtension.name), uuid: generateUuid() };
|
||||
return <IGalleryExtension>galleryExtension;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
import * as sinon from 'sinon';
|
||||
import * as assert from 'assert';
|
||||
import * as fs from 'fs';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { IExtensionsWorkbenchService, ExtensionState, AutoCheckUpdatesConfigurationKey, AutoUpdateConfigurationKey } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||
import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService';
|
||||
@@ -47,7 +46,6 @@ import { IExperimentService } from 'vs/workbench/contrib/experiments/common/expe
|
||||
import { TestExperimentService } from 'vs/workbench/contrib/experiments/test/electron-browser/experimentService.test';
|
||||
import { ExtensionTipsService } from 'vs/platform/extensionManagement/node/extensionTipsService';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts';
|
||||
|
||||
suite('ExtensionsWorkbenchServiceTest', () => {
|
||||
|
||||
@@ -1368,12 +1366,13 @@ suite('ExtensionsWorkbenchServiceTest', () => {
|
||||
}
|
||||
|
||||
function aLocalExtension(name: string = 'someext', manifest: any = {}, properties: any = {}): ILocalExtension {
|
||||
manifest = assign({ name, publisher: 'pub', version: '1.0.0' }, manifest);
|
||||
properties = assign({
|
||||
manifest = { name, publisher: 'pub', version: '1.0.0', ...manifest };
|
||||
properties = {
|
||||
type: ExtensionType.User,
|
||||
location: URI.file(`pub.${name}`),
|
||||
identifier: { id: getGalleryExtensionId(manifest.publisher, manifest.name) }
|
||||
}, properties);
|
||||
identifier: { id: getGalleryExtensionId(manifest.publisher, manifest.name) },
|
||||
...properties
|
||||
};
|
||||
return <ILocalExtension>Object.create({ manifest, ...properties });
|
||||
}
|
||||
|
||||
@@ -1389,10 +1388,9 @@ suite('ExtensionsWorkbenchServiceTest', () => {
|
||||
};
|
||||
|
||||
function aGalleryExtension(name: string, properties: any = {}, galleryExtensionProperties: any = {}, assets: IGalleryExtensionAssets = noAssets): IGalleryExtension {
|
||||
const galleryExtension = <IGalleryExtension>Object.create({});
|
||||
assign(galleryExtension, { name, publisher: 'pub', version: '1.0.0', properties: {}, assets: {} }, properties);
|
||||
assign(galleryExtension.properties, { dependencies: [] }, galleryExtensionProperties);
|
||||
assign(galleryExtension.assets, assets);
|
||||
const galleryExtension = <IGalleryExtension>Object.create({ name, publisher: 'pub', version: '1.0.0', properties: {}, assets: {}, ...properties });
|
||||
galleryExtension.properties = { ...galleryExtension.properties, dependencies: [], ...galleryExtensionProperties };
|
||||
galleryExtension.assets = { ...galleryExtension.assets, ...assets };
|
||||
galleryExtension.identifier = { id: getGalleryExtensionId(galleryExtension.publisher, galleryExtension.name), uuid: generateUuid() };
|
||||
return <IGalleryExtension>galleryExtension;
|
||||
}
|
||||
@@ -1432,7 +1430,7 @@ suite('ExtensionsWorkbenchServiceTest', () => {
|
||||
if (extension.location.scheme === Schemas.file) {
|
||||
return localExtensionManagementServer;
|
||||
}
|
||||
if (extension.location.scheme === REMOTE_HOST_SCHEME) {
|
||||
if (extension.location.scheme === Schemas.vscodeRemote) {
|
||||
return remoteExtensionManagementServer;
|
||||
}
|
||||
throw new Error('');
|
||||
|
||||
Reference in New Issue
Block a user