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
test: match generated/ at any depth in api-deprecated-paths #245
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-levelgenerated/:
.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.
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.
Activity