-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analyze any package.json, not just npm packages #24
Comments
I like this suggestion! I made it work for the basic case, e.g. for this repository: http://npm.anvaka.com/#/view/2d/https%253A%252F%252Fraw.githubusercontent.com%252Fanvaka%252Fnpmgraph.an%252Fmaster%252Fpackage.json For some reason it doesn't work for https://raw.githubusercontent.com/hackmdio/hackmd/master/package.json . I can look into this later, but the package that builds dependencies graph is here - https://github.com/anvaka/npmgraphbuilder if someone wants to dig deeper - please feel free to! |
After a bit of fiddling with the graphbuilder, I believe the If I toss the exact version string into the demo, it works: diff --git a/demo/index.js b/demo/index.js
index 91cabbf..20b519a 100644
--- a/demo/index.js
+++ b/demo/index.js
@@ -4,7 +4,7 @@ var graphBuilder = require('../')(httpClient);
var pkgName = process.argv[2] || 'browserify';
console.log('building dependencies graph for', pkgName);
-graphBuilder.createNpmDependenciesGraph(pkgName, graph).
+graphBuilder.createNpmDependenciesGraph(pkgName, graph, '1.1.1-ce').
then(function (graph) {
console.log('Done.');
console.log('Nodes count: ', graph.getNodesCount()); the -ce is supposed to mean "community edition", but it's not a good idea to put it in that place as it is taken as "prerelease" by semver. |
It works now, I believe the reason is that the project dropped the I'll close this. if this comes up again anywhere, someone can reopen this as a bug. |
I'm helping out with a node.js project which is not itself a npm package. I would love to just toss this URL into the seach field and get its dependencies (or, of course, any other packe.json):
https://raw.githubusercontent.com/hackmdio/hackmd/master/package.json
The text was updated successfully, but these errors were encountered: