Skip to content

Spec 013 T023: query-search and species-search, in TypeScript - #651

Merged
adamjohnwright merged 1 commit into
mainfrom
spec013/t023-content-5
Oct 24, 2026
Merged

adamjohnwright merged 1 commit into
mainfrom
spec013/t023-content-5

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 013, T023, batch 6 of the .mjs specs. Batch 5 was #650.

What changed. tools/content-node's query-search and species-search are converted. They held 151 errors with checkJs on. Each is now a typed .ts spec, held at zero on both counts.

How:

  • Their stand-in Solr and report services are each typed once: the Solr form as [name, value] pairs, and the reports as what reached the service.
  • Requests and reports are read through helpers that throw when there is none, and the targets report is found or the test fails.
  • species-search's stand-in graph shares its read count and outage flag through a typed view of globalThis, as citation.spec already does.
  • A facet query with its lists left out is cast with the reason: the endpoint fills them, and an absent list reads as empty.

Also, from batch 5's review: spec 010's tasks name parity.spec.ts.

Checked:

  • The old .mjs versions and the new .ts ones each run the same 31 tests, all passing.
  • Types pass, and lint (1,329 warnings) and dead code (131) are unchanged.

🤖 Generated with Claude Code

Batch 6 of the .mjs specs: tools/content-node's query-search and
species-search, 151 errors with checkJs on. Each is now a .ts spec, typed
and held at zero on both counts.

- Their stand-in Solr and report services typed once each: the Solr form
  as [name, value] pairs, the reports as what reached the service.
- Requests and reports are read through helpers that throw when there is
  none; the targets report is found or the test fails.
- species-search's stand-in graph shares its read count and outage flag
  through a typed view of globalThis, as citation.spec already does.
- A facet query with its lists left out is cast with the reason (the
  endpoint fills them; an absent list reads as empty).

Also from batch 5's review: spec 010's tasks name parity.spec.ts.

Same 31 tests as the .mjs versions, all passing; types, lint (1,329) and
dead code (131) unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 3d4b056 into main Oct 24, 2026
7 checks passed
@adamjohnwright
adamjohnwright deleted the spec013/t023-content-5 branch October 24, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant