Skip to content

Commit

Permalink
fix: version mapping
Browse files Browse the repository at this point in the history
Should fix issue #2
  • Loading branch information
Morten Henriksen committed Nov 23, 2017
1 parent 927f2ce commit adf5749
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/get-last-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ module.exports = async ({publishConfig, name, publisher}, logger) => {
const [ {versions = []} ] = extensions.filter(({extensionName, publisher: { publisherName }}) => {
return extensionId === `${publisherName}.${extensionName}`;
});
const [version] = versions.sort(semver.compare);
const [version] = versions
.map(({ version }) => version)
.sort(semver.compare)
.reverse();

if (!version) {
logger.log('No version found of package %s found on %s', extensionId, registry);
Expand Down

0 comments on commit adf5749

Please sign in to comment.