How to find the breaking changes between two versions of a package
Updated November 25, 2026
On this page
What's the quickest way to see what changed between two versions?
Read the changelog entries for every version between the two, then run a diff of the published package. That's the whole method. The rest of this page is how to do each step well, with commands I ran today and what they printed.
- List the versions in between, so you know how many changelog entries to read.
- Read the notes for each one. Breaking changes are usually under a heading or prefix you can search for.
- Diff what was published to the registry for the files you actually import. The repository alone can miss what shipped.
- Run the API checker your ecosystem has, if there is one.
- Upgrade in a branch and run your tests, because no tool above sees a change in behavior your code depends on.
I'll use dotenv 16.6.1 to 17.0.0 on npm as the running example. It's a small major release with one documented change and one that isn't in its changelog entry, which is exactly the case this method is for.
How do I list the versions between my version and the target?
Ask the registry with a version range. On npm, npm view accepts a range and prints each matching version (npm docs):
$ npm view dotenv@'>=16.6 <17.1' version
dotenv@16.6.0 '16.6.0'
dotenv@16.6.1 '16.6.1'
dotenv@17.0.0 '17.0.0'
dotenv@17.0.1 '17.0.1'On PyPI, the JSON API returns every release and each one's requires_python. Use it instead of pip index versions, which only shows versions your current Python can install. On the macOS system Python 3.9.6 today, pip reported python-multipart 0.0.20 as the newest version. PyPI's latest is 0.0.34, which needs Python 3.11:
$ curl -s https://pypi.org/pypi/python-multipart/json |
python3 -c 'import json,sys
i = json.load(sys.stdin)["info"]
print(i["version"], i["requires_python"])'
0.0.34 >=3.11
$ pip3 index versions python-multipart
python-multipart (0.0.20)That gap is a breaking change in itself: a minimum Python bump. If your CI runs an older Python than your laptop, the same upgrade can resolve to different versions in each place.
In Go, go list -m -u shows the newest version in brackets after the one you're on, and go list -m -versions lists them all (Go modules reference):
$ go list -m -u golang.org/x/oauth2
golang.org/x/oauth2 v0.30.0 [v0.38.0]Count what you're skipping. Under SemVer 2.0.0, an incompatible API change requires a new major version (item 8), but anything may change while the major version is zero (item 4). So v0.30.0 to v0.38.0 is eight minor releases where breaking changes are allowed, and dotenv 16 to 17 is one major. Treat each 0.x minor like a major.
Where do I find the changelog for each version?
Check three places, in this order: the package's GitHub releases, a CHANGELOG.md file, and the commit range between the two tags. Projects use different ones, and some use none of the first two.
GitHub releases
Projects that generate releases from Conventional Commits put breaking changes under a BREAKING CHANGES heading. The spec marks them with a BREAKING CHANGE: footer or a ! after the commit type, as in feat!: (Conventional Commits 1.0.0). That makes them greppable. Here's every breaking change in uuid from 11 to 14, pulled from its releases with gh release view (GitHub CLI manual):
for t in v12.0.0 v13.0.0 v14.0.0; do
echo "== $t"
gh release view "$t" -R uuidjs/uuid \
--json body --jq .body |
grep -A4 BREAKING | grep '^\*' |
sed 's/ (\[#.*//'
done== v12.0.0
* update to typescript@5.2
* remove CommonJS support
* drop node@16 support
== v13.0.0
* make browser exports the default
== v14.0.0
* expect `crypto` to be global everywhere
(requires node@20+)
* drop node@18 support(The last item printed on one line; I wrapped it here to fit.) Six breaking changes across three majors, and two of them are about the Node.js version, not the API. If you're still on Node.js 18, uuid 14 is off the table until you upgrade the runtime. Check where your Node.js version stands on the Node.js end-of-life page.
CHANGELOG.md
Many projects don't use GitHub releases at all. gh release list -R motdotla/dotenv printed nothing today, because dotenv keeps its history in CHANGELOG.md. Projects that follow Keep a Changelog group entries under Added, Changed, Deprecated, Removed, Fixed and Security. Breaking changes hide under Changed and Removed, so read both. dotenv's 17.0.0 entry has one line under Changed: quiet now defaults to false, so the library logs a line at runtime unless you turn it off.
The commits between the tags
When there are no notes at all, read the commits. GitHub's compare view takes two tags in the URL, github.com/OWNER/REPO/compare/OLD...NEW (GitHub docs), and the API returns the same thing. dotenv 16.6.1 to 17.0.0 is 7 commits; golang.org/x/oauth2 v0.30.0 to v0.38.0 is 11:
$ gh api \
repos/golang/oauth2/compare/v0.30.0...v0.38.0 \
--jq '.total_commits'
11Eleven commits is a short read. Hundreds is not, and that's when the next step matters most.
How do I diff two versions of an npm package?
Run npm diff with two --diff specs. It downloads both versions from the registry and prints a patch between them (npm docs). You don't need a project folder or an install. Start with the file list:
$ npm diff --diff=dotenv@16.6.1 \
--diff=dotenv@17.0.0 --diff-name-only
lib/main.js
package.json
CHANGELOG.md
README.mdThen diff the code you actually load, here lib/main.js. Pass a path after -- to limit the patch to it. Reading the full patch, the quiet default changed as the changelog says. One more change wasn't in the 17.0.0 entry: warnings moved from stdout to stderr.
$ npm diff --diff=dotenv@16.6.1 \
--diff=dotenv@17.0.0 -- lib/main.js |
grep WARN
- console.log(`[dotenv@${version}][WARN] ${message}`)
+ console.error(`[dotenv@${version}][WARN] ${message}`)Most apps won't notice. A test that captures stdout to assert on dotenv's warnings, or a log pipeline that treats stderr as errors, will. This is why I diff the published code for any dependency I import directly: the changelog is the maintainer's summary, and summaries leave things out.
Two things to watch. Diff the published package, not the repository, since what's on the registry can differ from the tagged source (build output, files left out by files or .npmignore). And read package.json in the diff for changes to engines, exports, type and peer dependencies. Those break installs and imports before any of your code runs.
On PyPI and in Go
For Python, download both wheels without their dependencies, unzip them and diff the folders. A wheel is a zip file, so no install is needed. Use a Python version both releases support, or pip won't find the newer one:
$ pip3 download --no-deps --only-binary :all: \
python-multipart==0.0.19 -q -d a
$ pip3 download --no-deps --only-binary :all: \
python-multipart==0.0.20 -q -d b
$ (cd a && unzip -q *.whl); (cd b && unzip -q *.whl)
$ diff -rq a b | awk '/differ/ {print $2}'
a/python_multipart/__init__.py
a/python_multipart/multipart.pyThen run diff -u on the files that differ. For Go, the compare view above covers the source, since a module version is its tagged source.
Is there a tool that detects breaking API changes automatically?
Yes, for some ecosystems. They compare the public API of two versions and report removals and signature changes, the kind of break that's easy to leave out of a changelog. None of them see a changed default or a changed log stream, like dotenv's.
| Ecosystem | Tool | What it compares |
|---|---|---|
| Go | apidiff (docs) | Exported API of two versions of a package or module |
| Rust | cargo-semver-checks (repo) | A crate's public API against the release it bumps from |
| HTTP APIs | oasdiff (repo) | Two OpenAPI specs; its breaking command lists changes that break clients |
For JavaScript and Python there's no single standard tool. TypeScript gets you part of the way: upgrade in a branch and run the type checker, and removed or renamed exports show up as errors at the lines that use them.
How do I know if a breaking change affects my code?
Search your code for each thing the change names, then run the tests that cover those lines. A breaking change only matters where you use it.
- Turn each breaking change into a search. For uuid 12, search for
require('uuid'), since CommonJS support was removed. For dotenv 17, search forconfig(calls without aquietoption, and for tests that read stdout. - Check the runtime lines too: your .nvmrc, the engines field, the CI matrix and the Dockerfile base image. A dropped Node.js or Python version breaks every file at once.
- Upgrade in a branch, install with your lockfile, and run the type checker and the test suite.
- For changed defaults, set the old value explicitly if you want the old behavior. For dotenv 17 that's passing quiet: true to config(). Then the upgrade is a no-op for that setting.
- Check your other dependencies. If one of them depends on the same package, it can bring its own copy at a different version, and a breaking change may reach you through it rather than through your manifest.
Passing tests prove the code paths you test still work. They say nothing about the ones you don't, so the reading in the earlier steps still counts.
Can I get the breaking changes for a version without reading every changelog?
Yes. Since.dev reads package releases and keeps what each version removed, renamed or changed, with its source. Each package has a public page, such as dotenv's breaking changes by version, where every version with a breaking change has its own section and the page says how many there are from the last release of the previous major to the newest.
For a specific move, the API takes the version you're on and the version you're moving to and returns only the releases in between and the changes in them. Each release says how fully it was read, and the answer says what was read, never that the move is safe. To see what a public repository is exposed to without signing up, run a free scan.
It's a shortcut for steps 1 and 2. It reads and reports, and nothing merges or deploys on its own. Keep diffing the published code for your direct dependencies, and keep Dependabot or a similar bot for the version bumps themselves (how they fit together).
Questions
How do I compare two versions of an npm package?
Run npm diff --diff=pkg@1.0.0 --diff=pkg@2.0.0. It fetches both versions from the registry and prints a patch, with no project or install needed. Add --diff-name-only for the list of changed files, or a path after -- to diff one file.
How do I compare two tags or releases on GitHub?
Open github.com/OWNER/REPO/compare/OLD...NEW with the two tag names. It shows every commit and file change between them. From a terminal, gh api repos/OWNER/REPO/compare/OLD...NEW returns the same data as JSON.
Can a minor version have breaking changes?
Under SemVer 2.0.0 it shouldn't once a package is at 1.0.0, but below 1.0.0 the spec allows anything to change at any time. Some maintainers also ship breaking changes in minors, by mistake or on purpose. Read the notes for minors you skip, not only majors.
What does BREAKING CHANGE mean in a commit message?
It's the Conventional Commits marker for a change that breaks the API. It appears as a BREAKING CHANGE: footer or as an exclamation mark after the type, like feat!:. Release tools that read these commits put such changes under a BREAKING CHANGES heading and bump the major version.
Why does pip not show the latest version of a package?
pip only offers versions whose Requires-Python matches the Python it runs on. On Python 3.9.6, pip index versions python-multipart showed 0.0.20 while PyPI's latest, 0.0.34, needs Python 3.11 (both checked November 25, 2026). Check PyPI's JSON API or the project page to see every release.
Related guides
Free tools
- Runtime end-of-life checker for Docker, CI and LambdaPaste a Dockerfile, workflow, go.mod, package.json or .csproj and see when each Node.js, Python, .NET or runner version reaches end of life. Free.
Comparisons
- Dependabot alternatives: what to use instead, and whenDependabot alternatives by job: other Git hosts, security scanners, malware blocking and breaking changes. Prices checked Nov 28, 2026, plus a real test.
How-to
- How to see who uses an npm package before you change itHow to see who uses an npm package: npm's Dependents tab, GitHub's dependents, code search for one function, and the commands, tested, with real counts.
- How to check your dependencies for breaking changes before you upgradeHow to check dependencies for breaking changes before upgrading: the commands, a real failing upgrade, CI that fails on deprecations, and where notices appear.
- dotenv 18 breaking changes: what to fix when you upgrade from 17dotenv 18 drops .env.vault, dotenv_config_ arguments and three exports, logs to stderr, and adds a dotenv binary that clashes with dotenv-cli. Tested.
Explainers
- Caret vs tilde in package.json: what ^ and ~ let inCaret (^) allows minor and patch updates, tilde (~) only patches. The 0.x exception, what your lockfile does, and how ^ and ~ differ in Cargo and Composer.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.