NPM Diff

NPM Diff displays a readable diff between two versions of an npm package.

There are many ways that people publish npm packages, some include changelogs, others only release on GitHub, so it's sometimes useful to just view an easy diff between them. There are also times where the code a package publishes on GitHub may not necessarily be the code they publish on npm, and this tool can help spot that.

This tool is built on Astro, and runs on Cloudflare Pages.

Usage

You can generate a diff for an npm package by using the following URL structure:

  • GET /{package-name}/{version1}/{version2} - full package diff
  • GET /{package-name}/{version1}/{version2}/{filename} - individual file diff within package

Examples

Try it out