Skip to content
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

Dependents tooling #327

Open
andrewhughes101 opened this issue Mar 16, 2020 · 9 comments
Open

Dependents tooling #327

andrewhughes101 opened this issue Mar 16, 2020 · 9 comments

Comments

@andrewhughes101
Copy link
Contributor

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?

@vweevers
Copy link

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.:

const registry = 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).

@ghinks
Copy link
Contributor

ghinks commented 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
Copy link
Contributor Author

For the first draft of the tool I've created this repo https://github.com/andrewhughes101/dependents-testing

@dominykas
Copy link
Member

@andrewhughes101 did you want a repo under pkgjs for this? Do we have a name?

@andrewhughes101
Copy link
Contributor Author

@andrewhughes101 did you want a repo under pkgjs for this? Do we have a name?

yes please, Do you think the name dependents-testing is ok?

@ljharb
Copy link
Member

ljharb commented 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
Copy link
Contributor Author

dependents is good with me, maybe it would be better to split the testing inot a seperate package

@dominykas
Copy link
Member

https://github.com/pkgjs/dependents

@andrewhughes101
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants