I’ve been searching online but haven’t found a satisfying answer to my question yet.
My main objective is to generate a dependency tree for a particular npmjs
library of a specific version, like retrieving the dependency tree for the angular
library version 1.5.3
.
Instead of relying on server-side execution with npm
or using JavaScript libraries, I prefer utilizing HTTP requests as much as possible.
Here's what I have discovered so far:
- You can fetch all metadata for a specific package and view available versions by querying http://registry.npmjs.org/package-name, such as http://registry.npmjs.org/angular
- To obtain metadata for a specific package version, you can access http://registry.npmjs.org/package-name/package-version. For example, http://registry.npmjs.org/angular/1.5.3
However, I’m having trouble figuring out how to retrieve the package.json
for a specific library at a certain version since http://registry.npmjs.org/angular/1.5.3/package.json doesn’t seem to provide any useful information.
Any help or insights would be greatly appreciated!