denoland / deno_graph

The module graph logic for Deno CLI
https://docs.rs/deno_graph
MIT License
111 stars 39 forks source link

fix: resolve jsxImportSource with types mode in absence of jsxImportSourceTypes #513

Closed nayeemrmn closed 3 weeks ago

nayeemrmn commented 4 weeks ago

When there is a jsxImportSource and no jsxImportSourceTypes, we need to try and resolve the same specifier with ResolutionMode::Types to see if it resolves somewhere else, as we do with ES deps.

I hit this bug in the LSP specifically when using jsx import source npm:preact with byonm.

dsherret commented 3 weeks ago

It looks like the lockfile changes occurred due to https://github.com/denoland/deno/pull/25059 -- I'm looking into why

dsherret commented 3 weeks ago

Confirmed that https://github.com/denoland/deno_lockfile/pull/34 fixes the issue. I will land this in Deno and then we can merge this PR.

nayeemrmn commented 3 weeks ago

@dsherret Thanks, it's green now