File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
server/api/registry/badge/[type] Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -383,7 +383,7 @@ const badgeStrategies = {
383383
384384 const { pkg, typesPackage, files } = await fetchPackageWithTypesAndFiles (
385385 pkgData . name ,
386- requestedVersion ,
386+ targetVersion ,
387387 )
388388
389389 const typesStatus = detectTypesStatus ( pkg , typesPackage , files )
Original file line number Diff line number Diff line change @@ -319,19 +319,10 @@ export function detectTypesStatus(
319319 typesPackageInfo ?: TypesPackageInfo ,
320320 files ?: Set < string > ,
321321) : TypesStatus {
322- // Check for built-in types
323- if ( pkg . types || pkg . typings ) {
322+ if ( hasBuiltInTypes ( pkg ) ) {
324323 return { kind : 'included' }
325324 }
326325
327- // Check exports field for types
328- if ( pkg . exports ) {
329- const exportInfo = analyzeExports ( pkg . exports )
330- if ( exportInfo . hasTypes ) {
331- return { kind : 'included' }
332- }
333- }
334-
335326 // Check for implicit types by deriving expected declaration file paths from
336327 // entry points (e.g. .d.mts for .mjs) and checking if they exist in the package
337328 if ( files && hasImplicitTypesForEntryPoints ( pkg , files ) ) {
You can’t perform that action at this time.
0 commit comments