8000 Scripts: type-check them in CI, and run them with one runner · Issue #440 · jra3/mulm · GitHub
[go: up one dir, main page]

Skip to content
8000

Scripts: type-check them in CI, and run them with one runner #440

Open

Description

@jra3

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.
  • merge-members.ts: two strictness errors.
  • test-image-processor.ts, test-image-processor-simple.ts, example.ts.

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

  1. added
    testingTesting, test coverage, and quality assurance
    infrastructureInfrastructure, deployment, and DevOps
    on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructureInfrastructure, deployment, and DevOpstestingTesting, test coverage, and quality assurance

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0