mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
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:
1 parent
9da0e0c405
commit
bf12b9840c
2 files changed
+1
-29
No files matched your search
@@ -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[] },
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user