Skip to content

Commit 1bb8b9e

Browse files
committed
fix: encode scoped package names as a single path segment
pkgPath now URL-encodes the package name so @babel/core becomes a single %40babel%2Fcore segment in manifest, files and downloads endpoints. Equivalent on npmmirror today and robust against registries that expect the scoped name to be encoded.
1 parent 2a0af00 commit 1bb8b9e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/web/app/lib/registry/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function registryJson<T>(path: string, init?: RequestInit): Promise<T> {
3131
}
3232

3333
function pkgPath(pkg: string) {
34-
return pkg;
34+
return encodeURIComponent(pkg);
3535
}
3636

3737
function ensureLeadingSlash(path: string) {

0 commit comments

Comments
 (0)