Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

nayeemrmn
Copy link
Collaborator

@nayeemrmn nayeemrmn commented Aug 16, 2024

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.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM

src/graph.rs Outdated Show resolved Hide resolved
@dsherret
Copy link
Member

It looks like the lockfile changes occurred due to denoland/deno#25059 -- I'm looking into why

@dsherret
Copy link
Member

Confirmed that denoland/deno_lockfile#34 fixes the issue. I will land this in Deno and then we can merge this PR.

@nayeemrmn
Copy link
Collaborator Author

@dsherret Thanks, it's green now

@nayeemrmn nayeemrmn merged commit d9fbc27 into denoland:main Aug 21, 2024
16 checks passed
@nayeemrmn nayeemrmn deleted the jsx-import-source-resolution-types-mode branch September 16, 2024 10:28
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.

3 participants