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
perf(lint-cli): spawn the typed pass immediately after a config edit (#671)
* perf(lint-cli): skip the builder when a hash bust cleared the caches
A config-drift or package-resolution bust deletes the variant caches before
the mtime sweep runs, so the sweep can no longer see them and they never
entered `clearedCaches`. Sizing therefore missed its short circuit and ran
the TypeScript builder to invalidate a cache that was already gone.
Report the deleted paths from `applyHashBust` and union every deletion into
`clearedCaches`, so an `eslint.config.*` edit spawns the typed pass at once.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(lint-cli): keep seeding builder state when the cache was cleared
The skip added for a cleared cache also swallowed the one thing only a
builder pass does: establish the incremental state a *later* run invalidates
against. With none on disk (a lint right after an install, which discards
`node_modules`), the next run reports `firstRun` and throws its affected set
away — so a file edited in between re-lints on its own mtime while its
importers keep stale type-aware entries no later run revisits.
Skip the builder only when prior state for the pass's mode and variant
exists, which is every case the drift bust actually meets.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* refactor(lint-cli): tighten the cleared-cache plumbing
Build `clearedCaches` in one guarded step instead of a mutable set fed by a
helper, fold `canSkipBuilder` back into the one condition that used it, and
derive the buildinfo scan prefix from `statePath` so the state-file naming
rule is stated once. Tests share one buildinfo prefix constant and read
absolute paths from `builderStateFiles`.
No behaviour change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(lint-cli): ignore stray temp files in the builder-state scan
Both writers in the state directory stage through a sibling `<name>.<pid>.tmp`
that shares the prefix `hasBuilderState` matches, so a run killed mid-write
left one behind for good — and it read as real state, re-enabling the builder
skip with nothing on disk for the next run to invalidate against.
Also names the `tsgate` base name alongside `tsbuildinfo`, marks
`BustOutcome.cleared` readonly to match its consumer, and disambiguates the
two same-named `clearedPaths` test helpers.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments