npm / npm-remote-ls

Examine a package's dependency graph before you install it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add metadata to the returned tree

piranna opened this issue · comments

Instead of return just a tree with the dependencies, return instead a tree of objects with a dependencies entry and some basic metadata like name, version, repo url... or better than this, the full object from packageJson.versions[version], replacing version strings from the dependencies object values with the content of the child ones. I know this will break compatibility so it will be needed to release a major version, but I think the extra information data will compensate it. I can do a pull-request for this myself.

One alternative to don't break compatibility is to add a new method lsVerbose instead of replace the behaviour of current ls, maybe filtering and adapting the data provided by the new one to reuse its code. What do you think?