-
-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: migrate to fast-npm-meta
#18
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
Conversation
# Conflicts: # src/providers/completion-item/version.ts
a854e47 to
e93c92f
Compare
# Conflicts: # src/utils/api/replacement.ts
# Conflicts: # src/providers/diagnostics/rules/vulnerability.ts # src/providers/hover/npmx.ts
# Conflicts: # src/providers/diagnostics/rules/replacement.ts
|
Regarding performance issues, I was thinking we could implement dependency-based caching. If the dependencies haven't changed (for example, if you only add whitespace characters), we shouldn't request them again. We can also report issues as soon as possible instead of waiting until everything has been checked. vscode-npmx/src/providers/diagnostics/index.ts Lines 37 to 76 in a7111ff
|
We do cache the result currently, see https://github.com/npmx-dev/vscode-npmx/blob/main/src/utils/memoize.ts#L18. But I think we can add a pre-validation to ensure the package name is legal.
I'll check it out. Thanks for your feedback! |
📝 WalkthroughWalkthroughThe PR migrates npm metadata fetching to fast-npm-meta and updates package.json and tsdown.config.ts. src/utils/api/package.ts now exposes a new PackageInfo (including a versionToTag Map) and getPackageInfo returns Promise<PackageInfo | null>. Call sites were adjusted to read version metadata from versionsMeta. Diagnostic rule types were updated to use PackageInfo. Hover provider link construction now uses new link helpers and the NPMJS_COM constant. The ModuleReplacement re-export was removed. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
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.
Actionable comments posted: 1
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.
Actionable comments posted: 2
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.
Actionable comments posted: 1
Oh, I see, do you mean caching |
Close #14