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 🙏

© 2026 – Pkg Stats / Ryan Hefner

upgrade-diff

v0.2.0

Published

Interactive diff viewer for outdated npm dependencies

Readme

upgrade-diff

Interactive diff viewer for outdated npm dependencies.

ci

What it does

Lists the outdated dependencies of a project the way yarn upgrade-interactive does, but instead of upgrading anything it shows the code diff between two published versions of the selected package, straight from the registry. It never writes to package.json, the lockfile, or node_modules.

$ npx upgrade-diff
info Color legend :
 "<red>"    : Major Update backward-incompatible updates
 "<yellow>" : Minor Update backward-compatible features
 "<green>"  : Patch Update backward-compatible bug fixes
? Choose a package to diff (↑/↓ or j/k move, enter select, q quit)

 dependencies
   name         range     from     wanted   latest   url
 ❯ commander    ^11.0.0   11.0.0   11.1.0   14.0.3   https://github.com/tj/commander.js#readme

 devDependencies
   name         range     from     wanted   latest   url
   typescript   ^5.3.0    5.3.3    5.9.3    5.9.3    https://www.typescriptlang.org/

Selecting a package offers up to three diffs, depending on which versions differ:

? commander 11.0.0: choose a diff
❯ 11.0.0 → 11.1.0   wanted            (minor)
  11.0.0 → 14.0.3   latest            (major)
  11.1.0 → 14.0.3   wanted → latest   (major)
  ← back

The diff opens in less. Quit the pager and the list is back with the cursor where it was; press q to leave.

To see only part of a diff, select with f instead of enter, in the package list or the diff menu. The changed files are then offered in groups, so transpiled output such as dist/ can be skipped, and *.d.ts narrows the diff to type declarations, a readable summary of API changes even when the rest is build output:

? commander 11.0.0 → 14.0.3: choose files
❯ all               12 files
  lib/               6 files
  typings/           1 file
  *.d.ts             1 file
  top-level files    5 files
  ← back

Usage

npx upgrade-diff [options] [dir]

Works in any project with a package.json and an installed node_modules, whichever package manager installed it. The outdated list comes from npm outdated and the diffs from npm diff, so the npm configuration of the project (registry, auth, scoped registries) applies as is.

The exit status is 0 whenever the tool ran, including when packages are outdated; it is an information tool, not a check. When stdout or stdin is not a terminal, the list is printed as with --list.

Options

| Option | Description | | ------------------- | ---------------------------------------------- | | [dir] | Project directory (default: current directory) | | -l, --list | Print the list and exit without prompting | | -u, --unified <n> | Number of context lines in the diff | | --name-only | Show only the names of changed files |

Keys

| Key | Action | | -------------------- | ----------------------------------- | | ↑, k | Previous package | | ↓, j | Next package | | enter | Select | | f | Select and choose files to diff | | q, esc, ctrl-c | Back, or quit from the package list |

Requirements

  • Node.js 20 or newer and npm on PATH.
  • less for paging. Without it, the diff is written to stdout.
  • diff-so-fancy is used automatically when found on PATH.

Limitations

  • Workspaces are not handled; run it in the package directory.
  • Dependencies that are not installed, not from a registry (git, file, link), or aliased ("foo": "npm:bar@1") are skipped and counted in a note below the list.

License

MIT