Skip to content

Conversation

@thevrus
Copy link

@thevrus thevrus commented Sep 25, 2025

Fix: Display correct NPM download count for TanStack Config

Previously, the NPM download count for TanStack Config was showing as NaN. This was due to the frameworks array being empty in src/libraries/config.tsx. The getNpmPackages function in convex/stats.ts was attempting to construct package names using a framework prefix (e.g., @tanstack/{framework}-config), which resulted in an empty list of package names when frameworks was empty.

This fix modifies the getNpmPackages logic to handle libraries like TanStack Config, which do not have framework-prefixed package names. If a library's frameworks array is empty, it now correctly uses @tanstack/{library.id} as the package name for fetching NPM download statistics.

image

Updated the getStats function to return a default package format when no frameworks are provided in the library argument. This ensures compatibility for libraries like @tanstack/config.
@netlify
Copy link

netlify bot commented Sep 25, 2025

‼️ Deploy request for tanstack rejected.

Name Link
🔨 Latest commit 912b67a

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.

2 participants