You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scripts: type-check them in CI, and run them with one runner #440
From #433. npm run script runs tsx, which doesn't type-check, and nothing else covers scripts/: the root tsconfig.json excludes it, and scripts/tsconfig.json has a rootDir problem. A script can rot without anything noticing, which is how #424 happened.
Type-check gate
Add tsc --noEmit -p scripts to CI. Ignoring the rootDir errors, it reports real errors in 8 scripts today, so a gate needs those fixed or deleted first:
export-all-species.ts reads config.databaseFile (the field is config.database.file, the bug Scripts: delete the one-off imports; port the IUCN two (#424) #433 fixed in the CARES import). With that fixed, it still queries the species_name table, which the catalogue rewrite dropped, so it needs porting to @/species.
populateSampleData.ts imports ./db/submissions.js, ./db/members.js and date-fns, none of which exist.
sync-fishbase-all-species.ts imports ./fishbase/duckdb-utils, which doesn't exist.
sync-species-to-prod-mcp.ts calls .map on { reference_url } and { image_url } objects.
Some of these are one-off or dead; delete rather than fix where nothing runs them.
One runner
npm run script uses tsx; ts-node is still a devDependency and is still used by nodemon.json, .github/workflows/ci.yml (npx ts-node scripts/setup-e2e-db.ts), e2e/README.md, and the shebangs of parse-nanfa-usa-species.ts, setup-e2e-db.ts and test-image-processor*.ts. Move them to tsx and drop ts-node.
Related: #432 (scripts migrate the DB on import, before argument parsing).
Activity