anvaka / npmgraph.an

2d visualization of npm
https://npm.anvaka.com
MIT License
1.23k stars 83 forks source link

Add support for version & tag #6

Closed ndelangen closed 8 years ago

ndelangen commented 8 years ago

Currently it's possible to visualize only the latest version published to npm.

It'd be an amazing improvement if we'd be able to also visualize an upcoming version.

I suggest changing the version to a dropdown:

screen shot 2016-06-13 at 12 41 30

And adding the version to the URL: http://npm.anvaka.com/#/view/{TYPE}/{PACKAGE}/{VERSION}

anvaka commented 8 years ago

I like this suggestion. Will see how to do this (hopefully this weekend).

Out of curiosity, how do you use this tool?

ndelangen commented 8 years ago

I'm interested in using this tool for keeping track of how complex and heavy npm install is, after updating dependencies on repositories I contribute to.

anvaka commented 8 years ago

I think I found a way to do this, but it would require some amount of rewrite in the npmgraphbuilder.

The idea is to switch from the byField view that I'm currently using to actual package document.

E.g. https://registry.npmjs.org/ngraph.graph will return information about all versions for the package, while individual packages can be then fetched with additional spec path:

https://registry.npmjs.org/ngraph.graph/latest - gives latest version https://registry.npmjs.org/ngraph.graph/~0.0.1 - gives a version that matches semver.

Will see if I can do the update soon.

anvaka commented 8 years ago

I didn't update the UI yet, but routes should work:

http://npm.anvaka.com/#/view/2d/grunt-casperjs http://npm.anvaka.com/#/view/2d/grunt-casperjs/1.0.0

anvaka commented 8 years ago

Made a video to demo: https://www.youtube.com/watch?v=V1OzyBBWe-U

Thank you for suggesting this feature!