mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 10:12:34 -05:00
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -3,25 +3,9 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as semver from 'semver';
|
||||
import { adoptToGalleryExtensionId, LOCAL_EXTENSION_ID_REGEX } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import { IExtensionManifest } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { buffer } from 'vs/platform/node/zip';
|
||||
import { localize } from 'vs/nls';
|
||||
|
||||
export function getIdAndVersionFromLocalExtensionId(localExtensionId: string): { id: string, version: string | null } {
|
||||
const matches = LOCAL_EXTENSION_ID_REGEX.exec(localExtensionId);
|
||||
if (matches && matches[1] && matches[2]) {
|
||||
const version = semver.valid(matches[2]);
|
||||
if (version) {
|
||||
return { id: adoptToGalleryExtensionId(matches[1]), version };
|
||||
}
|
||||
}
|
||||
return {
|
||||
id: adoptToGalleryExtensionId(localExtensionId),
|
||||
version: null
|
||||
};
|
||||
}
|
||||
import { IExtensionManifest } from 'vs/platform/extensions/common/extensions';
|
||||
|
||||
export function getManifest(vsix: string): Promise<IExtensionManifest> {
|
||||
return buffer(vsix, 'extension/package.json')
|
||||
|
||||
Reference in New Issue
Block a user