Notifio has a website and a desktop app in one repository. The website is a Next.js server of 113 tracked files, and one of them is a 668 KB file that nobody wrote:
668466 server/tsconfig.tsbuildinfo It is a TypeScript incremental build cache. tsconfig.json has "incremental": true and "noEmit": true, and when you run tsc --noEmit with both of those on, TypeScript still writes its bookkeeping file next to the config. Nothing reads that file except the next run of tsc on the same machine. We committed it on the first day, and I found it again yesterday, because it was in the dependency-update diff as a single line: 1 insertion, 1 deletion. The file has no newline, so any change to it is "the whole file".
This post is what is inside that line.
What 668 KB holds
The file is JSON with eight top-level keys. Their sizes, measured by re-serialising each one (so they add up to a little more than the file):
fileNames 344,687 51.6% fileInfos 256,634 38.4% referencedMap 29,819 4.5% fileIdsList 66,102 9.9% root 154 options 153 affectedFilesPendingEmit 504 version 7 Half of it is the list of file names. There are 2,452 of them, and here is how they split:
inside node_modules (all via .pnpm/) 2,362 96.3% ours 90 3.7% of which in ./src 79 of which in __tests__ 5 of which .next type stubs 3 of which root config files 3 So the cache for a 79-file website describes 2,362 files we did not write, and every one of them is spelled as a path into pnpm's virtual store, with the package version baked into the directory name:
./node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts ./node_modules/.pnpm/drizzle-orm@0.45.4_@opentelemetry+api@1.10.0_@prisma+client@5.22.0_prisma@5.22.0__@upst_bb8b7aff8700992c4f51f899961fc0f1/node_modules/drizzle-orm/entity.d.ts That second path is also where I noticed that the lockfile still resolves Prisma for a Drizzle-only server: the string @prisma+client@5.22.0 is now written into a second file as well.
What one update does to it
The dependency update moved the file's version-bearing paths around. Comparing the fileNames arrays at the commit before and the commit after:
before after file names 2,466 2,452 added 1,944 removed 1,958 kept 508 Of 2,466 file names, 508 survived, so 79 per cent of the entries were replaced and 1,944 new ones written. Almost all of that is a version number changing inside a directory name: the same .d.ts file with a different @x.y.z in front of it counts as one removal and one addition. Even a patch bump of a package with many declaration files rewrites that many entries of this cache. That makes the cache the opposite of what a cache is for. It is invalidated by exactly the event it is committed alongside.
It is tracked, and there is no rule against it
git check-ignore -v server/tsconfig.tsbuildinfo prints nothing. The root .gitignore covers .next/, node_modules/, dist-ts/ and .env*, and server/.gitignore is two lines, .vercel and .env*. Nobody decided to track the cache. Nobody decided not to.
History says it went in with the first commit (20 July) and was rewritten in 12 of our 57 commits. Stored as git objects, those 12 versions are 7,050,296 bytes raw and 900,486 on disk, out of a repository whose .git is 101 MB. That is under one per cent, so it is not a size problem. It is a noise problem: one in five commits carries a file nobody can review.
Next to it sits next-env.d.ts, a 288 byte file that Next regenerates. It is tracked too and has changed in 9 commits. The latest change was a single added line, import "./.next/types/root-params.d.ts";, which arrived because Next 16.4 writes it. That one is easier to defend, since tsc needs it to exist before it can resolve next types on a fresh clone, and a file Next rewrites on every dev start is at least self-healing.
The part that surprised me
I wanted to know how fragile the cache is, so on a clean working tree I ran the project's own check:
git status --short # empty pnpm typecheck # tsc --noEmit, 1.7 seconds git status --short M tsconfig.tsbuildinfo One run, no source change, and a tracked file was modified. It grew from 668,466 to 668,570 bytes, and five of the eight keys differed (fileNames, fileIdsList, fileInfos, referencedMap, affectedFilesPendingEmit); options and version were identical. I put it back with git checkout -- tsconfig.tsbuildinfo before doing anything else. I did not dig into why those five keys moved, so I will not guess. What matters is the behaviour: the project's one typecheck command dirties the working tree, on a machine where nothing has changed.
That is a small cost with a specific shape. Anyone who runs pnpm typecheck and then git commit -a commits a rewritten cache. And the next person to run it gets a conflict-free but meaningless diff.
What I would change
One line in server/.gitignore and one git rm --cached:
*.tsbuildinfo and the same for next-env.d.ts only after confirming that a fresh clone builds without it, which means cloning into an empty directory and running next build, not reading docs. I have not done that check yet, so next-env.d.ts stays tracked for now. The cache will still exist on my machine and on CI. It just will not be a file I am asked to review.
If you want to check your own repo, it is two commands:
git ls-files | grep -E 'tsbuildinfo|next-env' git log --oneline -- '*.tsbuildinfo' | wc -l The website those 79 source files produce is at notifio.app, with the guides and the comparison pages built from the same TypeScript. The commit this cache came into view in is the one I wrote about in what 36 dependency bumps did to the lockfile.

