mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-05 06:28:47 -04:00
fix: can resolve package with version prefixed with v
This commit is contained in:
@@ -97,7 +97,7 @@ async function resolveNpm (
|
||||
let version: string | undefined
|
||||
switch (spec.type) {
|
||||
case 'version':
|
||||
version = spec.fetchSpec
|
||||
version = semver.clean(spec.fetchSpec) as string
|
||||
break
|
||||
case 'tag':
|
||||
version = meta['dist-tags'][spec.fetchSpec]
|
||||
|
||||
@@ -18,6 +18,7 @@ export default function parsePref (pref: string, alias?: string): RegistryPackag
|
||||
if (!name) {
|
||||
return null
|
||||
}
|
||||
// TODO: this should also return the clean version of the spec (what semver.valid returns)
|
||||
const type = getVersionSelectorType(pref, true)
|
||||
if (type) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user