Skip to content

packages/drivers/driver-sql/README.md documents DriverSQL.configure() three times — the class is not exported and the static does not exist #9867

Description

@os-steve

Found while rewriting packages/mcp/README.md (#9579), by sweeping published READMEs for the shape that card is about: a method call on a receiver check:published-readme-exports cannot see.

The finding

packages/drivers/driver-sql/README.md tells the reader to build a stack driver like this, at three separate call sites:

LineClaim
448driver: DriverSQL.configure(getDatabaseConfig())
482driver: DriverSQL.configure({ client: 'pg', connection: { … }, debug: true })
516driver: DriverSQL.configure({ … })

Measured against the built packages/drivers/driver-sql/dist/index.d.ts:

  • DriverSQL is not exported. Zero occurrences of the identifier anywhere in the type entry. The real export is SqlDriver — which the same README imports correctly at line 43, so the page contradicts itself.
  • No configure static exists on SqlDriver or on anything else the package exports. Grepping configure in the type entry returns two hits, both prose inside doc comments.

This is the PluginAudit.configure() shape from #9517 / #9532, still live on a page npm renders (README.md is in files, private unset).

Why the gate did not catch it

Both halves of check:published-readme-exports key on a name the fence imported. The fences at 448/482/516 import nothing; DriverSQL appears out of nowhere as a free identifier, so the import half has no claim to make and the call-site half never adds it to localNames. #9544 recorded a different row in this same file (line 137, the IDriver subpath) and PR #9581 fixed that one — this one sat one section further down, outside what the gate reports.

Census behind that: across the 60 published markdown documents, 38 carry at least one method call on a receiver the gate cannot see, 235 call sites in total. This is the one instance in that population that measurably names nothing real.

Why this is not a mechanical substitution

Swapping in the real export does not produce working code: SqlDriver has no configure either, so the correct form is a decision about how a host actually supplies a driver to defineStack — the same class of question the mcp README needed a ruling for. Filing rather than folding it into #9579, whose ruling is scoped to packages/mcp.

Refs: #9579 · #9544 · #9532 · #9517 · PR #9581


Generated by Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions