directory icon indicating copy to clipboard operation
directory copied to clipboard

Download count not displayed for packages with names starting with `@`

Open JairajJangle opened this issue 8 months ago โ€ข 4 comments

I noticed that the download count, watchers, and issues count are not shown for the @futurejj/react-native-visibility-sensor library on React Native Directory.

This is a module I maintain, and not displaying these stats might potentially affect its directory score. The module is not new, it has been consistently getting around 6k downloads per week and has the issues tab enabled on its GitHub repository.

Could you please look into why these stats arenโ€™t being displayed? Let me know if you need any more information from my side.

GitHub repo: https://github.com/JairajJangle/react-native-visibility-sensor NPM page: https://www.npmjs.com/package/@futurejj/react-native-visibility-sensor React Native Directory search result: https://reactnative.directory/?search=%40futurejj%2Freact-native-visibility-sensor

Thank you for your help! ๐Ÿ™

JairajJangle avatar May 11 '25 19:05 JairajJangle

Hey @JairajJangle, there is nothing wrong with that entry. If stars and issues count is 0 we do not show the line.

When it comes to the npm downloads, this unfortunately happens randomly, and it's related to NPM API call timeouts, rate limiting and in general certain unavailability of NPM API. We already store the results of previous fetches, and backfill the data on each update, but still this do not guarantee 3rd party data presence.

To address this properly, we would need to migrate from file storage to database, and refactor completely how we fetch, sync and update data.

Simek avatar May 12 '25 08:05 Simek

Hey @Simek,

Got it, thanks for the clarification! I understand the NPM API limitations and the challenges with consistent data. Migrating to a database sounds like a big task.

Appreciate the update! ๐Ÿ˜Š

JairajJangle avatar May 12 '25 17:05 JairajJangle

Hi @Simek,

I noticed that the download count isnโ€™t displayed for any package whose name starts with the @ character. For reference, you can check this out: React Native Directory Search - @. None of the packages, regardless of their popularity, show a download count.

It seems like there might be an issue with how special characters like @ are handled in the utility that fetches the download count.

I hope these findings prove helpful. Let me know if you need any more information! ๐Ÿ˜Š

JairajJangle avatar May 15 '25 14:05 JairajJangle

Thanks for the investigation, will look at this soon! ๐Ÿ™

Simek avatar May 15 '25 14:05 Simek