File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed
Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff 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 ( / ^ \/ v 1 \/ p a c k a g e s \/ n p m \/ ( .+ ) $ / )
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 }
You can’t perform that action at this time.
0 commit comments