What
typeScriptSources in packages/cli/test/api-deprecated-paths.test.ts:51 excludes the generated schema transcript from the deprecated-path scan. The current filter only matches a top-level generated/:
.filter(
// `generated/` is the schema's own transcript: it necessarily names every
// path, deprecated ones included, and is not a call site.
(file) => !relative(directory, file).startsWith(`generated${sep}`)
);
The hand-rolled recursion this replaced (in #243) skipped a generated directory at any depth. The narrowing was incidental to the cleanup, not intended.
Why it is not urgent
There is exactly one such directory today — packages/cli/src/generated — so the filter is currently a no-op difference. And the failure direction is the safe one: if a nested src/**/generated/ is ever added, the test starts failing loudly with false offenders rather than quietly letting a real deprecated call site through.
Why it is still worth doing
It restores the pre-#243 semantics rather than inventing new ones, and the comment's own rationale — generated/ is a transcript, not a call site — is about what a generated directory is. That does not depend on how deep it sits.
Fix
(file) => !relative(directory, file).split(sep).includes("generated")
One line, says the intent directly.
Verifying it bites
Add a nested src/**/generated/*.ts containing a deprecated path (/cli/api/rule/…), confirm the test reports it as a false offender before the change and is silent after, then remove the fixture. Note the negative-lookahead detail nearby: /cli/api/rule must not match /cli/api/rule-hash-vectors, a live path sharing the stem.
Found by review on #243.
Refs #241
What
typeScriptSourcesinpackages/cli/test/api-deprecated-paths.test.ts:51excludes the generated schema transcript from the deprecated-path scan. The current filter only matches a top-levelgenerated/:The hand-rolled recursion this replaced (in #243) skipped a
generateddirectory at any depth. The narrowing was incidental to the cleanup, not intended.Why it is not urgent
There is exactly one such directory today —
packages/cli/src/generated— so the filter is currently a no-op difference. And the failure direction is the safe one: if a nestedsrc/**/generated/is ever added, the test starts failing loudly with false offenders rather than quietly letting a real deprecated call site through.Why it is still worth doing
It restores the pre-#243 semantics rather than inventing new ones, and the comment's own rationale —
generated/is a transcript, not a call site — is about what a generated directory is. That does not depend on how deep it sits.Fix
One line, says the intent directly.
Verifying it bites
Add a nested
src/**/generated/*.tscontaining a deprecated path (/cli/api/rule/…), confirm the test reports it as a false offender before the change and is silent after, then remove the fixture. Note the negative-lookahead detail nearby:/cli/api/rulemust not match/cli/api/rule-hash-vectors, a live path sharing the stem.Found by review on #243.
Refs #241