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(check): CJS types importing dual ESM/CJS package should prefer CJS types #24492

Merged
merged 6 commits into from
Jul 10, 2024

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jul 9, 2024

Closes #16370

@dsherret dsherret requested a review from nayeemrmn July 9, 2024 23:22
@@ -66,8 +67,7 @@ pub struct ModuleCodeStringSource {

#[derive(Debug)]
pub struct CliNodeResolver {
// not used in the LSP
cjs_resolutions: Option<Arc<CjsResolutionStore>>,
cjs_resolutions: Arc<CjsResolutionStore>,
Copy link
Member Author

@dsherret dsherret Jul 9, 2024

Choose a reason for hiding this comment

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

This means we have this cache in two places for the LSP (here and in the JS code), which is not ideal.

Copy link
Member

Choose a reason for hiding this comment

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

I guess we can address this in a follow up?

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

Comment on lines +500 to +501
// it's not ideal to share this across all scopes and to
// never clear it, but it's fine for the time being
Copy link
Member

Choose a reason for hiding this comment

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

Add a TODO and open an issue so we don't forget?

Copy link
Member Author

@dsherret dsherret Jul 10, 2024

Choose a reason for hiding this comment

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

I initially had one, but removed it because it seems ok and we can fix this once we get a bug that causes us to need to fix it.

Copy link
Collaborator

@nayeemrmn nayeemrmn 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 merged commit a49d0bd into denoland:main Jul 10, 2024
17 checks passed
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.

Fix referrer node module kind when resolving types file with unspecified extension
3 participants