Skip to content

Commit c1dd46c

Browse files
authored
[npm] package.json latest vue version incorrect (microsoft#159315)
[npm] package.json latest vue version incorrect. FIxes microsoft#158850
1 parent 29ee89a commit c1dd46c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

extensions/npm/src/features/packageJSONContribution.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,10 @@ export class PackageJSONContribution implements IJSONContribution {
314314
headers: { agent: USER_AGENT }
315315
});
316316
const obj = JSON.parse(success.responseText);
317+
const version = obj['dist-tags']?.latest || Object.keys(obj.versions).pop() || '';
317318
return {
318319
description: obj.description || '',
319-
version: Object.keys(obj.versions).pop(),
320+
version,
320321
homepage: obj.homepage || ''
321322
};
322323
}

0 commit comments

Comments
 (0)