The only gate that caught unused code in my monorepo was an auditor I wrote myself, and when it went wrong it failed quietly. I retired it for knip, then used the clean slate to move the whole toolchain forward.
The monorepo is the single repo holding the website and backend of Binderdex, a Pokémon card collection and price app. A gate is a check that fails the build. knip is an open-source tool that finds unused files, exports and dependencies, which is the job my auditor script did.
Choosing the louder failure
I wrote the tradeoff down before switching. A public tool fails repo-wide when it breaks, which is annoying. My homegrown one failed without telling anyone, and for the only gate of its kind that's worse. I chose the visible failure.
pnpm 11, Node 24 and AI SDK v7, one variable at a time
The jump took roughly ten commits across a Next.js 16 monorepo: pnpm 11, Node 24, and AI SDK v6 to v7, the library my code uses to call language models. The repo's minimum-release-age policy holds new package releases back for 1,440 minutes, one day, so a short exclusion list in the workspace file lets the youngest releases through while everything else ages in.
For the SDK I ran the official codemods and bumped the OpenRouter provider to the version that speaks v7. I left the production model IDs untouched. If behavior changed after the upgrade, I wanted exactly one suspect.
"Purchase Failed" meant "you already have Pro"
Analytics showed one Android user on Binderdex hit "Purchase Failed" when buying Pro, the app's paid tier, twice, make a second account, and hit it again. The error code said the store account already owned Pro. The fix is a pure function that reads the code before choosing the words.
export function purchaseErrorView(code: string) {
if (code === ALREADY_OWNED) {
return {
title: "You already have Pro",
primary: "Restore purchases",
secondary: "Not now",
};
}
return { title: "Purchase failed" };
}
The user was never broken. Half of mobile support is translation: the platform already knows what happened, and the app has to say it in words a person can act on.