Skip to content

Commit 789e313

Browse files
committed
chore(scripts): drop the sql Date-binding unit tests and the exports that served them
1 parent 78cea08 commit 789e313

3 files changed

Lines changed: 3 additions & 297 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"check:realtime-prune": "bun run scripts/check-realtime-prune-graph.ts",
3434
"check:tool-request-boundary": "bun test scripts/check-tool-request-boundary.test.ts && bun run scripts/check-tool-request-boundary.ts",
3535
"check:tool-registry-boundary": "bun run scripts/check-tool-registry-boundary.ts",
36-
"check:sql-date-binding": "bun test scripts/check-sql-date-binding.test.ts && bun run scripts/check-sql-date-binding.ts",
36+
"check:sql-date-binding": "bun run scripts/check-sql-date-binding.ts",
3737
"check:zustand-v5": "bun run scripts/check-zustand-v5-selectors.ts",
3838
"check:react-query": "bun run scripts/check-react-query-patterns.ts --check",
3939
"check:client-boundary": "bun run scripts/check-client-boundary-imports.ts --check",

scripts/check-sql-date-binding.test.ts

Lines changed: 0 additions & 290 deletions
This file was deleted.

scripts/check-sql-date-binding.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { parse } from '@babel/parser'
2020

2121
const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url))
2222
const ROOT = resolve(SCRIPT_DIR, '..')
23-
export const SCAN_DIRS = [join(ROOT, 'apps'), join(ROOT, 'packages'), join(ROOT, 'scripts')]
23+
const SCAN_DIRS = [join(ROOT, 'apps'), join(ROOT, 'packages'), join(ROOT, 'scripts')]
2424
const SKIP_DIRS = new Set(['node_modules', '.next', '.turbo', 'coverage', 'dist', 'build', 'out'])
2525
const SOURCE_EXTENSIONS = new Set(['.ts', '.tsx', '.mts', '.cts'])
2626
const ALLOW_ANNOTATION = '// sql-date-bound:'
@@ -372,11 +372,7 @@ const TEMPLATE_REASON =
372372
'a Date interpolated into a raw sql template has no encoder; bind it with sql.param(date, table.column)'
373373
const PARAM_REASON = 'sql.param(date) has no encoder; pass the column as the second argument'
374374

375-
export function findSqlDateBindingViolations(source: string, file = 'source.ts'): Violation[] {
376-
return analyzeSource(source, file).violations
377-
}
378-
379-
export function analyzeSource(source: string, file = 'source.ts'): FileAnalysis {
375+
function analyzeSource(source: string, file = 'source.ts'): FileAnalysis {
380376
let program: SyntaxNode
381377
try {
382378
const syntaxTree = parse(source, {

0 commit comments

Comments
 (0)