Skip to content

Conversation

@thevrus
Copy link
Contributor

@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

@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for tanstack ready!

Name Link
🔨 Latest commit 30b520f
🔍 Latest deploy log https://app.netlify.com/projects/tanstack/deploys/69128074d2f9750008eee5b7
😎 Deploy Preview https://deploy-preview-496--tanstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 19 (no change from production)
Accessibility: 83 (no change from production)
Best Practices: 83 (no change from production)
SEO: 98 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

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.
@SeanCassiere SeanCassiere merged commit 71c9f58 into TanStack:main Nov 11, 2025
6 checks passed
LeCarbonator pushed a commit to LeCarbonator/tanstack.com that referenced this pull request Jan 11, 2026
* fix: handle empty frameworks in getStats function

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.

* chore: remove comment
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