Skip to content

Commit 83abea9

Browse files
authored
fix
1 parent d48ce59 commit 83abea9

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

modules/runtime/server/cache.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -137,33 +137,6 @@ function getMockForUrl(url: string): MockResult | null {
137137
}
138138
}
139139

140-
// jsdelivr CDN - return 404 for README files, etc.
141-
if (host === 'cdn.jsdelivr.net') {
142-
// Return null data which will cause a 404 - README files are optional
143-
return { data: null }
144-
}
145-
146-
// jsdelivr data API - return mock file listing
147-
if (host === 'data.jsdelivr.com') {
148-
const packageMatch = decodeURIComponent(pathname).match(/^\/v1\/packages\/npm\/(.+)$/)
149-
if (packageMatch?.[1]) {
150-
const pkgWithVersion = packageMatch[1]
151-
const parsed = parseScopedPackageWithVersion(pkgWithVersion)
152-
return {
153-
data: {
154-
type: 'npm',
155-
name: parsed.name,
156-
version: parsed.version || 'latest',
157-
files: [
158-
{ name: 'package.json', hash: 'abc123', size: 1000 },
159-
{ name: 'index.js', hash: 'def456', size: 500 },
160-
{ name: 'README.md', hash: 'ghi789', size: 2000 },
161-
],
162-
},
163-
}
164-
}
165-
}
166-
167140
// Gravatar API - return 404 (avatars not needed in tests)
168141
if (host === 'www.gravatar.com') {
169142
return { data: null }

0 commit comments

Comments
 (0)