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

@xmatters/upgreat

v1.1.3

Published

CLI for a painless way to upgrade package dependencies

Downloads

13

Readme

upgreat

Maintainability Test Coverage Build Status

upgreat is a CLI for a painless way to upgrade your package dependencies!

upgreat helps you upgrade the dependencies of your project. Have it plan and execute upgrades for you, making sure they don't cause any issues. It will run tests (or builds), attempt an upgrade for a package, then run the tests/build again to verify.

upgreat is smart:

  • it will roll back failed upgrades: upgrading everything it can without breaking tests and builds
  • it knows about devDependencies: it will run builds instead of tests
  • it understands peerDependencies: it will attempt the least intrusive upgrades first, and warn you of missing ones
  • it supports yarn and npm

It can plan based on:

  • package type: dependencies|devDependencies
  • include regex
  • exclude regex

It can upgrade with:

  • yarn or npm
  • using test and build scripts defined in your package.json

usage

You can use this package directly via npx, or install it globally (npm install @xmatters/upgreat -g).

> upgreat help
USAGE
  $ upgreat [COMMAND]

COMMANDS
  help  display help for upgreat
  plan  create the upgrade plan for the package
  up    execute the upgrade plan

First, create an upgrade plan via the plan command. This will create a file .upgreat/plan.json with the details and order of upgrade for each package.

> upgreat plan help
create the upgrade plan for the package

USAGE
  $ upgreat plan

OPTIONS
  -i, --include=include                           include packages by regex
  -p, --packageType=dependencies|devDependencies  choose specific package types
  -x, --exclude=exclude                           exclude packages by regex

Then, execute the upgrade plan via the up command. This will read .upgreat/plan.json and start upgrading packages and testing/building.

> upgreat up help
execute the upgrade plan

USAGE
  $ upgreat up

OPTIONS
  -b, --buildScript=buildScript  [default: build] build script to use from
                                 package.json

  -t, --testScript=testScript    [default: test] test script to use from package.json

  --npm                          use npm

You can pass -b or --buildScript to define which script in your package.json gets run after upgrading a devDependency. By default this is build so upgreat will use yarn build or npm run build.

Similarly, -t or --testScript defines the test script in package.json to run after upgrading a dependency. By default this is test so upgreat will use yarn test or npm run test.

You can customize both for your purposes: npx @xmatters/upgreat up --npm -b build:prod -t test:ci will use npm and use build:prod script for devDependencies and test:ci script for dependencies.

Sit back and watch it do it's thing. Any upgrades that cause failures will be rolled back. .upgreat/ directory will contain any dependencies that failed with stderr info in separate files.

usage example

Move to the folder of your package and create an upgrade plan

cd my-project
upgreat plan

# or

npx @xmatters/upgreat plan

then,

upgreat up

# or

npx @xmatters/upgreat up

if you were using npm, and your test script was called testTheProjectPls you would invoke it as

upgreat up --npm -t testTheProjectPls

roadmap / todo

  • html upgrade report with changelogs

related

Greenkeeper, Dependabot and Renovate address similar problems, but either need tight GitHub integration or are not free. Do you need to make sure all your dependencies are up to date, or merge PRs all day for @babel/plugin-proposal-logical-assignment-operators 7.0.0 -> 7.0.2 from bots? If the former, give upgreat a try!