mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 18:22:34 -05:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as nls from 'vs/nls';
|
||||
import pkg from 'vs/platform/product/node/package';
|
||||
|
||||
export interface IParsedVersion {
|
||||
hasCaret: boolean;
|
||||
@@ -226,7 +225,7 @@ export function isValidExtensionVersion(version: string, extensionDesc: IReduced
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
export function isEngineValid(engine: string, version: string = pkg.version): boolean {
|
||||
export function isEngineValid(engine: string, version: string): boolean {
|
||||
// TODO@joao: discuss with alex '*' doesn't seem to be a valid engine version
|
||||
return engine === '*' || isVersionValid(version, engine);
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import { ILocalization } from 'vs/platform/localizations/common/localizations';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
@@ -109,24 +108,6 @@ export interface IExtensionContributions {
|
||||
|
||||
export type ExtensionKind = 'ui' | 'workspace';
|
||||
|
||||
export class ExtensionIdentifierWithVersion {
|
||||
constructor(
|
||||
readonly identifier: IExtensionIdentifier,
|
||||
readonly version: string
|
||||
) { }
|
||||
|
||||
key(): string {
|
||||
return `${this.identifier.id}-${this.version}`;
|
||||
}
|
||||
|
||||
equals(o: any): boolean {
|
||||
if (!(o instanceof ExtensionIdentifierWithVersion)) {
|
||||
return false;
|
||||
}
|
||||
return areSameExtensions(this.identifier, o.identifier) && this.version === o.version;
|
||||
}
|
||||
}
|
||||
|
||||
export function isIExtensionIdentifier(thing: any): thing is IExtensionIdentifier {
|
||||
return thing
|
||||
&& typeof thing === 'object'
|
||||
@@ -144,8 +125,8 @@ export interface IExtensionManifest {
|
||||
readonly displayName?: string;
|
||||
readonly publisher: string;
|
||||
readonly version: string;
|
||||
// {{SQL CARBON EDIT}}
|
||||
engines: { vscode: string; azdata?: string };
|
||||
readonly engines: { vscode: string; azdata?: string }; // {{SQL CARBON EDIT}} add field
|
||||
readonly forceReload?: boolean; // {{ SQL CARBON EDIT }} add field
|
||||
readonly description?: string;
|
||||
readonly main?: string;
|
||||
readonly icon?: string;
|
||||
@@ -160,6 +141,7 @@ export interface IExtensionManifest {
|
||||
readonly bugs?: { url: string; };
|
||||
readonly enableProposedApi?: boolean;
|
||||
readonly api?: string;
|
||||
readonly scripts?: { [key: string]: string; };
|
||||
}
|
||||
|
||||
export const enum ExtensionType {
|
||||
@@ -242,4 +224,4 @@ export interface IExtensionDescription extends IExtensionManifest {
|
||||
|
||||
export function isLanguagePackExtension(manifest: IExtensionManifest): boolean {
|
||||
return manifest.contributes && manifest.contributes.localizations ? manifest.contributes.localizations.length > 0 : false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as assert from 'assert';
|
||||
import { INormalizedVersion, IParsedVersion, IReducedExtensionDescription, isValidExtensionVersion, isValidVersion, isValidVersionStr, normalizeVersion, parseVersion } from 'vs/platform/extensions/node/extensionValidator';
|
||||
import { INormalizedVersion, IParsedVersion, IReducedExtensionDescription, isValidExtensionVersion, isValidVersion, isValidVersionStr, normalizeVersion, parseVersion } from 'vs/platform/extensions/common/extensionValidator';
|
||||
|
||||
suite('Extension Version Validator', () => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user