Skip to content

refactor(src/lib): 1b - remove barrel export - #133

Draft
sukhada wants to merge 1 commit into
claude/lib-cleanup-1afrom
claude/lib-cleanup-1b
Draft

refactor(src/lib): 1b - remove barrel export#133
sukhada wants to merge 1 commit into
claude/lib-cleanup-1afrom
claude/lib-cleanup-1b

Conversation

@sukhada

@sukhada sukhada commented Mar 21, 2026

Copy link
Copy Markdown

Summary

Phase 1B of the src/lib/ modernization. Removes the barrel export pattern from src/lib/.

Barrel exports obscure what is actually used and make dead code detection harder. Only 4 production files imported from the barrel — all now use direct imports.

Changes:

  • Moved gzip/gunzip to new src/lib/gzip.ts (were defined inline in the barrel)
  • Updated 4 barrel consumers to direct imports:
    • src/server/index.ts: sleep from ../lib/utils
    • src/server/worker.ts: sleep from ../lib/utils
    • src/server/api/lib/campaign.ts: gzip from ../lib/gzip, makeTree from ../lib/interaction-step-helpers
    • src/workers/jobs/index.js: gunzip from ../lib/gzip
  • Updated __test__/lib/zip-format.test.js to import from zip-format directly
  • Deleted src/lib/index.ts

Stacked on: #132

Test plan

  • All 25 src/lib/ tests pass
  • Lint clean
  • CI passes

Generated with Claude Code

Barrel exports obscure what is actually used and make dead code
detection harder. Only 4 production files imported from the barrel;
all now use direct imports to specific modules.

- Moved gzip/gunzip to new src/lib/gzip.ts (were defined inline
  in the barrel file)
- Updated 4 barrel consumers to direct imports
- Deleted src/lib/index.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sukhada sukhada changed the title refactor: remove src/lib/index.ts barrel export refactor(1b): remove src/lib/index.ts barrel export Mar 21, 2026
@sukhada sukhada changed the title refactor(1b): remove src/lib/index.ts barrel export refactor(src/lib): 1b - remove barrel export Mar 21, 2026
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