You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npm lockfile: a bump of a hoisted, undeclared import selects too few tests #244
collectDependencyChangeTests in src/repo/impact.ts maps a package-lock.json change to the direct dependencies whose locked tree changed, then selects the tests that import those packages. npm hoists transitive dependencies to node_modules/, so code can import a package it never declared. A bump of that package is attributed only to the declaring dependency, and tests that import it directly are skipped. The Yarn and pnpm paths already fall back when the repository imports undeclared packages; the npm path does not.
Repro:package.json depends on left. The lockfile has node_modules/left (depends on inner) and a hoisted node_modules/inner. src/uses-inner.js imports inner, and src/uses-inner.test.js imports it. Bump inner in package-lock.json.
Expected:src/uses-inner.test.js is selected, or the run falls back.
Actual:changedDependencies is [left]. Only the tests of left are selected, src/uses-inner.test.js is not, and there is no fallback.
Activity