Add support for Deno libraries on framework.dev using GitHub API
Description
-
Deno is not supported out of the box and a research spike was conducted to determine the best way to add support for Deno libraries on framework.dev. This ticket involves and adding support for comparing different Deno libraries based on certain properties. At the end of this text, you can see some suggested properties for comparison which we can use.
-
Adding badges for Deno libraries is an additional need for this ticket. We are able to make use of the same properties in implementing badge functionality as well. Please refer to the original spike ticket for more context: https://github.com/thisdot/framework.dev/issues/577
Deno
Deno distinguishes itself from other languages/frameworks because it doesn't have a centralized package repository. In a Deno app, you can import packages using an URL from anywhere.
Deno native packages are usually listed on deno.land/x. This service provides some basic information about packages, such as repository URL and popularity, but that is about it. It also doesn't provide any API. Probably, all of the information is extracted from the respective GitHub repositories. Popularity, for example, could be calculated by the number of watchers, forks, and stars. We could do something similar for framework.dev.
As noted in the description, GitHub is the only source of information about Deno libraries at the moment. deno.land/x does not offer an API. Therefore we can use the following statistics for library comparison, as well as badges (whichever are supported by shields.io):
- Number of watchers
- Number of forks
- Number of stars