[npm] package.json latest vue version incorrect (#159315)

[npm] package.json latest vue version incorrect. FIxes #158850
This commit is contained in:
Martin Aeschlimann 2022-08-29 15:49:48 +02:00 committed by GitHub
parent 29ee89a281
commit c1dd46c2f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -314,9 +314,10 @@ export class PackageJSONContribution implements IJSONContribution {
headers: { agent: USER_AGENT }
});
const obj = JSON.parse(success.responseText);
const version = obj['dist-tags']?.latest || Object.keys(obj.versions).pop() || '';
return {
description: obj.description || '',
version: Object.keys(obj.versions).pop(),
version,
homepage: obj.homepage || ''
};
}