File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { defineCommand } from 'citty'
66import { resolve } from 'pathe'
77import consola from 'consola'
88import { addDependency } from 'nypm'
9+ import { joinURL } from 'ufo'
910import { $fetch } from 'ofetch'
1011import { satisfies } from 'semver'
1112import { updateConfig } from 'c12/update'
@@ -221,7 +222,7 @@ async function resolveModule(
221222 // Fetch package on npm
222223 pkgVersion = pkgVersion || 'latest'
223224 const registry = await detectNpmRegistry ( )
224- const pkg = await $fetch ( `${ registry } / ${ pkgName } /${ pkgVersion } ` )
225+ const pkg = await $fetch ( joinURL ( registry , `${ pkgName } /${ pkgVersion } ` ) )
225226 const pkgDependencies = Object . assign (
226227 pkg . dependencies || { } ,
227228 pkg . devDependencies || { } ,
You can’t perform that action at this time.
0 commit comments