Get and expose npm + GitHub data for dependency packages #2827
Labels
area: dependency visualization
Shows what dependencies are used in Telescope
area: redis
Redis Database related
type: enhancement
New feature or request
Milestone
In #2797 we are adding a dependency service, and it currently only includes package names. Let's add a way to expose both npm and GitHub data for a package.
For npm, we can query the npmjs registry programmatically. For example, you can get the package info for React using https://registry.npmjs.org/react. This will return everything we need in JSON format.
Here are some docs:
The npm data for a package will also give us GitHub URLs that we can use to query the GitHub API via Octokit.
I don't know if there is any point in doing this for every package, or only on-demand when requested. Maybe at first, we can expose this data via a REST endpoint in the dependency service:
GET /projects/:name
.We should cache this data in Redis (available via Satellite), and then we can re-use it for future requests for the same data.
Down the road, once this working, we can decide how to use this data (e.g., find issues to work on).
The text was updated successfully, but these errors were encountered: