sussudio
Version:
An unofficial VS Code Internal API
38 lines (37 loc) • 2.02 kB
text/typescript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import Severity from "../../../base/common/severity.mjs";
import { URI } from "../../../base/common/uri.mjs";
import { IExtensionManifest } from "./extensions.mjs";
export interface IParsedVersion {
hasCaret: boolean;
hasGreaterEquals: boolean;
majorBase: number;
majorMustEqual: boolean;
minorBase: number;
minorMustEqual: boolean;
patchBase: number;
patchMustEqual: boolean;
preRelease: string | null;
}
export interface INormalizedVersion {
majorBase: number;
majorMustEqual: boolean;
minorBase: number;
minorMustEqual: boolean;
patchBase: number;
patchMustEqual: boolean;
notBefore: number;
isMinimum: boolean;
}
export declare function isValidVersionStr(version: string): boolean;
export declare function parseVersion(version: string): IParsedVersion | null;
export declare function normalizeVersion(version: IParsedVersion | null): INormalizedVersion | null;
export declare function isValidVersion(_inputVersion: string | INormalizedVersion, _inputDate: ProductDate, _desiredVersion: string | INormalizedVersion): boolean;
type ProductDate = string | Date | undefined;
export declare function validateExtensionManifest(productVersion: string, productDate: ProductDate, extensionLocation: URI, extensionManifest: IExtensionManifest, extensionIsBuiltin: boolean): readonly [Severity, string][];
export declare function isValidExtensionVersion(productVersion: string, productDate: ProductDate, extensionManifest: IExtensionManifest, extensionIsBuiltin: boolean, notices: string[]): boolean;
export declare function isEngineValid(engine: string, version: string, date: ProductDate): boolean;
export {};