turbo
f67657ff - fix: Select tests when an install-time file changes in turbo trace

Commit
1 day ago
fix: Select tests when an install-time file changes in turbo trace A JS package manager reads more than the manifests and the lockfile when it writes `node_modules`. A change to one of these files changes what is installed without a lockfile change, and it selected no test in `turbo trace affected`, also with `--strict`. A patch of an installed package (`patches/*.patch` of patch-package, pnpm and bun, `.yarn/patches/*.patch`) now selects what a new version of that package selects: the package and every package of the lockfile next to the patches that holds it in its dependency closure count as changed for the packages below that directory. The package is read from the file name in each tool's spelling. A patch whose name does not say which package it is for, or names one the lockfile does not hold, counts for every installed package. The package manager's configuration (`.npmrc`, `.yarnrc.yml`, `.yarnrc`, `bunfig.toml`) and pnpm's hook file (`.pnpmfile.cjs`, `.pnpmfile.mjs`) count for every installed package of the packages below the file's directory. They decide the registry, what is hoisted (and so what an import of a name that a package does not declare resolves to), whether install scripts run, and, for the hook file, the manifest of any installed package. So a change selects every test below that directory that loads an installed package, which includes every test of a runner that is installed there. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Author
Parents
Loading