-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix(check): CJS types importing dual ESM/CJS package should prefer CJS types #24492
Conversation
@@ -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>, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
// it's not ideal to share this across all scopes and to | ||
// never clear it, but it's fine for the time being |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #16370