Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/generated-at-any-depth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@taskless/cli": patch
---

The deprecated-path guard now skips `generated/` at any depth.

`typeScriptSources` excluded only a top-level `src/generated`, so a nested
generated directory would have had every deprecated path in its transcript
reported as a call site. The exclusion exists because a generated directory is
the schema's own transcript rather than a call site, and that reasoning does not
depend on how deep it sits.
8 changes: 6 additions & 2 deletions packages/cli/test/api-deprecated-paths.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ async function typeScriptSources(directory: string): Promise<string[]> {
.map((entry) => join(entry.parentPath, entry.name))
.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}`)
// path, deprecated ones included, and is not a call site. Matched at any
// depth, because that reasoning is about what a generated directory IS
// and does not depend on where it sits. `startsWith` reached only a
// top-level `src/generated`, which is a no-op today and would have
// reported a nested one as a wall of false offenders.
(file) => !relative(directory, file).split(sep).includes("generated")
);
}

Expand Down
Loading