Skip to content

Conversation

@dsherret
Copy link
Member

@dsherret dsherret commented Jan 16, 2026

Closes #31697

@dsherret dsherret changed the title fix(check): improve @types/ package resolution for the global resolver fix(check): improve @types/ package resolution for the global resolver Jan 16, 2026
let (_, nv) = find_definitely_typed_package(
types_package_name,
maybe_package_version,
snapshot.package_reqs().iter(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously we were only looking at top level npm packages, which would mean we wouldn't resolve a whole lot of @types packages. This bug fix should fix a lot of type checking issues with the global resolver.

@dsherret dsherret marked this pull request as ready for review January 16, 2026 20:33
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to add a real integration test for this one.

let resolved = deno_path_util::resolve_import(&specifier, referrer)?;
let ext = MediaType::from_specifier(&resolved).as_ts_extension();
return Ok((specifier, Some(ext)));
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We accidentally weren't resolving some of the files for the built-in @types/node package.

Copy link
Member

@nathanwhit nathanwhit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dsherret dsherret enabled auto-merge (squash) January 16, 2026 21:03
@dsherret dsherret merged commit 28184e1 into denoland:main Jan 16, 2026
25 checks passed
@KnorpelSenf
Copy link
Contributor

So cool!

@dsherret dsherret deleted the fix_types_package_resolution_global_resolver branch January 18, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deno check fails for Koa and Express since 2.6.0

3 participants