chore: drop an unused guard helper and a type re-export nothing imports

sourcesContaining in the guard helpers and the DeferredRows type re-export from full-backup-payload had no importer, which the dead-code gate reports. isDeferredRows stays re-exported; the backup job's test mocks it there.
This commit is contained in:
Marc-André Bombeck committed 2026-10-22 21:15:38 +02:00
1 parent 9da0e0c405
commit bf12b9840c
2 files changed
+1 -29

No files matched your search

-28
View File
@@ -123,34 +123,6 @@ export function readSourceText(path: string): string {
return text;
}
/**
* The files under `root` (as `walkSourceFiles` lists them) whose text holds
* at least one of `markers`, with that text. The substring test runs before
* any regular expression or parse the caller applies, which is where most of
* a sweep's time used to go. The floor applies to the files walked, as in
* `walkSourceFiles`; a caller that expects matches states its own floor over
* the result.
*/
export function sourcesContaining(
root: string,
markers: string | readonly string[],
options: {
floor: number;
extensions?: readonly string[];
include?: (rel: string) => boolean;
},
): Array<[rel: string, text: string]> {
const wanted = typeof markers === "string" ? [markers] : markers;
const out: Array<[string, string]> = [];
for (const rel of walkSourceFiles(root, options).filter(
options.include ?? (() => true),
)) {
const text = readSourceText(join(root, rel));
if (wanted.some((marker) => text.includes(marker))) out.push([rel, text]);
}
return out;
}
export function walkSourceFiles(
root: string,
options: { floor: number; extensions?: readonly string[] },
+1 -1
View File
@@ -49,7 +49,7 @@ import type { VaccinationsBackupCounts } from "@/lib/export/vaccinations-backup"
import type { VisitsBackupCounts } from "@/lib/export/visits-backup";
import { BACKUP_SCHEMA_VERSION } from "@/lib/validations/backup-summary";
export { isDeferredRows, type DeferredRows } from "@/lib/export/deferred-rows";
export { isDeferredRows } from "@/lib/export/deferred-rows";
export interface FullBackupCounts
extends