npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dependency-updater

v1.2.1

Published

A tool that checks npm dependencies and sends a github pull request should updates be available

Downloads

25

Readme

dependency-updater

Build Status Dependency Status devDependency Status

A simple shell script that checks out a list of github repositories, checks their package.json and sends a PR for every minor or major version update available. Your build server will check whether everything is alright and all you have to do is merge green PRs. For added ease of use just set it up as a cron job or as a daily task on your build server.

Node 4.0.0 or more recent only, sorry.

$ npm install dependency-updater -g
$ dependency-updater --username my-github-user --password my-github-password myname/myrepository anothername/another-repository

Usage

dependency-updater [options] repository1 [repository2 [repository3 [...]]]

Repositories are of the format "username/repository" or "organisation/repository".

Options:
--username      Github username. Can also be provided via GITHUB_USERNAME
--password      Github password. Can also be provided via GITHUB_PASSWORD
--token         Github oauth token. Can also be provided via GITHUB_TOKEN
--client-id     Github client id. Can also be provided via GITHUB_CLIENT_ID
--secret        Github secret. Can also be provided via GITHUB_SECRET
--logbook       A file to keep track of already opened pull requests. Defaults to ~/.dependency-updater-logbook.json

At least one of those credentials needs to be provided:

  • username and password
  • oauth token
  • client id and secret

The easiest way to create an oauth token for yourself is via https://github.com/settings/tokens/new. You only need "repo" and "public_repo" permissions

Multiple package.json per repository

In case you have a package with more than one package.json (or just one, but in a different location) you can add a file called .dependency-updater.json to the root of your repository:

{
    "paths": ["folder/one/package.json", "folder/two/package.json"]
}

Notes

If you want to clean up all "dependency-updater" branches you can use this command:

$ git branch -a | grep "dependency-updater" | cut -d / -f 3 | xargs -I BRANCH /bin/bash -c "git push origin --delete BRANCH"