Skip to content

Conversation

@serkodev
Copy link
Contributor

@serkodev serkodev commented Dec 9, 2025

Related vuejs/language-tools#5818

Review reference:
getImpliedNodeFormatForFileWorker param packageJsonInfoCache type allows undefined

@jasonlyu123
Copy link

The project version is updated on every keystroke. So, Performance-wise, it is better to do it only when the files in the project actually change. In TypeScript's TSServer, this is done by tracking a list of files that were tried in module resolution. But to do that properly, it might need quite a lot of changes. Alternatively, only tracking changes in project files might be a good enough compromise. Just feel like the original issue is an edge case, so it can wait for a fix without a big performance penalty.

@serkodev serkodev marked this pull request as draft December 10, 2025 06:23
@serkodev
Copy link
Contributor Author

Thanks for catching that. I did misunderstand the project version, just fixed.

@serkodev serkodev marked this pull request as ready for review December 10, 2025 07:11
@serkodev serkodev changed the title fix: clear module resolution cache when project version changes fix: clear module resolution cache when project files changes Dec 10, 2025
@serkodev serkodev changed the title fix: clear module resolution cache when project files changes feat: reuse module resolution cache from host Dec 10, 2025
@johnsoncodehk johnsoncodehk changed the title feat: reuse module resolution cache from host feat(typescript): reuse module resolution cache from host Dec 10, 2025
@johnsoncodehk johnsoncodehk merged commit c8ff4e8 into volarjs:master Dec 10, 2025
3 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.

3 participants