Open redbar0n opened 3 years ago
I proxy results of the official npm search API. I also noticed its limitations in the past and not being able to find certain packages. I was already in contact with npm team on this matter, but don't remember how exactly it was settled. Will probably raise the issue again In the meantime, I suggest specify package names directly in the URL https://moiva.io/?npm=cordova I'm thinking of adding such hint in the search results
Also, adding 'cordova-cli' from the Github search doesn't link it up to its npm counterpart 'cordova' on Moiva, even though they are linked in reality:
it's not that easy. When you search for an npm package, then getting a corresponding GitHub repo is straightforward you get it from the npm API (though there are some cases when the provided GitHub repo is not the correct one). In other direction it doesn't work that way - you can't unambiguously derive the npm package from a GitHub repo, because
The only reliable solution I came up with was to maintain a catalog where I specify all the relationships between npm and github https://github.com/aantipov/moiva-catalog
Long story short,
Thanks for the good explanations!
Great, thanks for the workaround!
Ah, ofc. Makes sense! Maybe the catalog could be automatically updated by users manually linking when coming across such scenarios?
Maybe the catalog could be automatically updated by users manually linking when coming across such scenarios?
Interesting idea. I'll think about it
BUG on npm search:
1. Trying to add 'cordova' https://www.npmjs.com/package/cordova
Instead turns up 'cordova-plugin-device' https://www.npmjs.com/package/cordova-plugin-device
2. Also, adding 'cordova-cli' from the Github search doesn't link it up to its npm counterpart 'cordova' on Moiva, even though they are linked in reality:
https://www.npmjs.com/package/cordova links to https://github.com/apache/cordova-cli