Skip to content

chore: remove vestigial exports, types, and constants (#233)#250

Merged
williamzujkowski merged 1 commit into
mainfrom
chore/vestigial-sweep-233
Jun 30, 2026
Merged

chore: remove vestigial exports, types, and constants (#233)#250
williamzujkowski merged 1 commit into
mainfrom
chore/vestigial-sweep-233

Conversation

@williamzujkowski

Copy link
Copy Markdown
Collaborator

Closes #233.

Dead-code sweep. A read-only reconnaissance pass grepped every exported symbol across packages/*/src, scripts/, apps/web, tests, and .github/ workflows (excluding dist/). Each symbol removed below had zero references beyond its own definition (and barrel re-export).

Removed

Package Symbol Why dead
transformer USLM_NAMESPACE, LEGAL_LIST_MARKERS, OUTPUT_PATH_PATTERN constants with no consumers; the path pattern duplicated buildSectionPath's own template
transformer PreserveOrderTextNode / PreserveOrderElementNode / PreserveOrderNode types not in the barrel, no importers; mixed-content.test.ts defines its own local PreserveOrderNode
transformer extractText (+ its tests) a "for backward compatibility" shim with no remaining callers — production uses extractTextFromNodes
fetcher allTitlesXmlUrl the all-titles archive is never fetched; only per-title titleXmlUrl downloads are used
scripts HashedFile interface buildManifest uses an inline { path, content } literal instead

Barrels (transformer/src/index.ts, fetcher/src/index.ts) updated to drop the removed re-exports.

Deliberately left alone

  • The getAttributes / getAttrsFromNode transformer duplication (intentional, out of scope per the issue).
  • Public-ish @civic-source/types exports (PrecedentImpact, ReleasePointSchema) — low-confidence, kept.

Verification

Local pnpm build && pnpm typecheck && pnpm lint && pnpm test — all green (build 6/6, typecheck 8/8, lint 6/6, test 8/8). Removing the symbols breaks nothing because nothing referenced them.

🤖 Generated with Claude Code

Dead-code sweep. Each symbol below was verified to have zero references
across packages, scripts, apps/web, tests, and workflows (excluding dist/):

- transformer: USLM_NAMESPACE, LEGAL_LIST_MARKERS, OUTPUT_PATH_PATTERN
  constants; PreserveOrderTextNode/ElementNode/Node types (parser/transformer
  do their namespace and node walking without them).
- transformer: extractText — a "for backward compatibility" shim with no
  remaining callers; production code uses extractTextFromNodes. Its tests are
  removed with it.
- fetcher: allTitlesXmlUrl — the all-titles archive is never fetched; only
  per-title downloads (titleXmlUrl) are used.
- scripts: HashedFile interface — buildManifest uses an inline literal.

Barrels updated to drop the removed re-exports. The getAttributes /
getAttrsFromNode transformer duplication is intentionally left untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@williamzujkowski williamzujkowski requested a review from a team as a code owner June 30, 2026 02:41
@williamzujkowski williamzujkowski merged commit cb4244c into main Jun 30, 2026
3 checks passed
@williamzujkowski williamzujkowski deleted the chore/vestigial-sweep-233 branch June 30, 2026 03:07
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.

chore: vestigial-code cleanup sweep (dead exports/constants, duplication, one-off script, uncaught hash-write)

1 participant