Skip to content

Commit 5e2cef7

Browse files
committed
fix(scripts): list the chokepoint seam directory inside SCAN_FILES
A SEAM_DIR constant read to bare-root-worklist as a new invisible bare-root population; the gate already declares every file it reads, one by one, in DECLARED_WATCH_HINTS, so the directory is spelled inline as the three driver files are. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
1 parent 1cc66c9 commit 5e2cef7

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎scripts/check-tenant-chokepoint.mjs‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,8 @@ import { isEntrypoint } from './invoked-as.mjs';
175175

176176
const ROOT = join(fileURLToPath(new URL('.', import.meta.url)), '..');
177177

178-
/** The directory whose `sql-driver-*.ts` seam modules carry `SqlDriver`'s moved bodies. */
179-
const SEAM_DIR = join('packages', 'drivers', 'driver-sql', 'src');
180-
181178
/**
182-
* Which basenames of {@link SEAM_DIR} are seam modules this gate reads:
179+
* Which basenames of `driver-sql/src` are seam modules this gate reads:
183180
* `sql-driver-<anything>.ts`, never a test or spec file. A pure function of
184181
* the listing, so the self-test can drive it without the repo.
185182
*/
@@ -189,6 +186,11 @@ export function seamModulesOf(basenames) {
189186
.sort();
190187
}
191188

189+
/** A directory's basenames, or none when it is absent (main() then refuses on the driver file). */
190+
function listing(rel) {
191+
return existsSync(join(ROOT, rel)) ? readdirSync(join(ROOT, rel)) : [];
192+
}
193+
192194
/**
193195
* The `SqlDriver` family — every class that inherits this chokepoint — and
194196
* every `sql-driver-*.ts` module its methods' bodies have moved into (#29520,
@@ -203,7 +205,8 @@ const SCAN_FILES = [
203205
join('packages', 'drivers', 'driver-sql', 'src', 'sql-driver.ts'),
204206
join('packages', 'drivers', 'driver-sqlite-wasm', 'src', 'sqlite-wasm-driver.ts'),
205207
join('packages', 'drivers', 'driver-turso', 'src', 'turso-driver.ts'),
206-
...seamModulesOf(existsSync(join(ROOT, SEAM_DIR)) ? readdirSync(join(ROOT, SEAM_DIR)) : []).map((n) => join(SEAM_DIR, n)),
208+
...seamModulesOf(listing(join('packages', 'drivers', 'driver-sql', 'src')))
209+
.map((n) => join('packages', 'drivers', 'driver-sql', 'src', n)),
207210
];
208211

209212
/**

0 commit comments

Comments
 (0)