clearlydefined / clearlydefined/service
originNPM is not returning the expected results
- Dominant language
- TypeScript
- Stars
- 51
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
When searching in the "harvest" input, I am not able to get the expected results. For example, trying to search for @ag-grid-community/styles returns no results.
I looked into [originNpm.js](https://github.com/clearlydefined/service/blob/master/routes/originNpm.js) and I can see two problems:
1. When providing only a namespace or namespace + package name, npms is used. Unfortunately, npms has a bug logged a year ago https://github.com/npms-io/npms-api/issues/104 that might be contributing to missing results
2. If you want to bypass npms and hit the registry directly, you can add "revisions" to the end, like "@ag-grid-community/styles/revisions". This calls https://registry.npmjs.com/@ag-grid-community/styles which **does** have the package information. However, it is returning `["29.1.0","29.0.0","28.2.1","28.2.0","28.1.1","28.1.0","28.0.0","27.3.0-beta.0"]` which is not what the client is expecting. (something similar to `[{ id: answer._id }]`?). But even if I use fiddler or a browser extension to force that response, the client still won't work because `react-boostrap-typeahead` is expecting the value of `id` to match what was entered in the search field.
in short: there is no way for me to enter a specific package and package version for harvesting.
Contributor guide
Assessment
This issue has not been assessed yet.