Skip to content

Commit

Permalink
fix(npm): use semver range for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Oct 12, 2021
1 parent 6ad0f41 commit 30768d2
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/npm/resolveLatestVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ function resolveLatestVersions(packages) {
versions[pkgName] = 'latest'
}

return pProps(versions, (range, pkgName) => getLatestVersion(pkgName, {range}), {
concurrency: 8,
})
return pProps(
versions,
async (range, pkgName) => {
const version = await getLatestVersion(pkgName, {range})
return rangeify(version)
},
{concurrency: 8}
)
}

function rangeify(version) {
return `^${version}`
}

0 comments on commit 30768d2

Please sign in to comment.