You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a follow on from #307 I've started looking into the best way to get a modules dependents. So far the only way I've found how to do it is to scrape the npm site on this endpoint https://www.npmjs.com/browse/depended/express
Does anyone know of any alternative way or if there is an endpoint on http://registry.npmjs.org/ that would return the dependents?
For scraping, you might like npm-dependants. There's no official API. The only other option is to replicate the registry (can take a few hours), e.g.:
constregistry=require('package-stream')({// Update sequence (seq) to start from.since: 0})registry.on('package',(pkg,seq)=>{}).on('up-to-date',()=>{})
I've been thinking it'd be nice to have a service that continuously replicates, puts the packages in a graph database, and exposes an HTTP API (vweevers/about-native-addons#4).
I was going to raise an issue with a similar request. As I have actually started to look at modules that need to be maintained within the expressJS system I see a need for a tool like this.
I do not believe there is a tool that does this currently. Is this something that @darcyclarke or @ruyadorno could help us with? Even add hoc requests that get solved off line would be valuable.
At the moment, it just lists dependents - is it planned to test them too, or is that a separate package? If it's just for listing them, then probably just dependents?
As discussed in the last meeting the next steps is to create the basic CLI testing tool that takes in a list of dependents from pkgjs/dependents, detects which branch you are on and opens a PR to change the version field of the package the dependent is depending upon for the current branch.
I think we also need a new repo in pkgjs for this tool, so I will open an issue for the new repo.
Activity
vweevers commentedon Mar 16, 2020
For scraping, you might like
npm-dependants. There's no official API. The only other option is to replicate the registry (can take a few hours), e.g.:I've been thinking it'd be nice to have a service that continuously replicates, puts the packages in a graph database, and exposes an HTTP API (vweevers/about-native-addons#4).
ghinks commentedon Mar 21, 2020
I was going to raise an issue with a similar request. As I have actually started to look at modules that need to be maintained within the expressJS system I see a need for a tool like this.
I do not believe there is a tool that does this currently. Is this something that @darcyclarke or @ruyadorno could help us with? Even add hoc requests that get solved off line would be valuable.
andrewhughes101 commentedon Mar 24, 2020
For the first draft of the tool I've created this repo https://github.com/andrewhughes101/dependents-testing
dominykas commentedon Mar 27, 2020
@andrewhughes101 did you want a repo under
pkgjsfor this? Do we have a name?andrewhughes101 commentedon Mar 27, 2020
yes please, Do you think the name dependents-testing is ok?
ljharb commentedon Mar 27, 2020
At the moment, it just lists dependents - is it planned to test them too, or is that a separate package? If it's just for listing them, then probably just
dependents?andrewhughes101 commentedon Apr 1, 2020
dependentsis good with me, maybe it would be better to split the testing inot a seperate packagedominykas commentedon Apr 1, 2020
https://github.com/pkgjs/dependents
andrewhughes101 commentedon Apr 27, 2020
As discussed in the last meeting the next steps is to create the basic CLI testing tool that takes in a list of dependents from pkgjs/dependents, detects which branch you are on and opens a PR to change the version field of the package the dependent is depending upon for the current branch.
I think we also need a new repo in pkgjs for this tool, so I will open an issue for the new repo.