Skip to content

[Barrel #59 Phase 3] Migrate 32 src/lib/ files from localDb barrel to direct db/ imports - #11790

Closed
jonlwheat2-gif wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
jonlwheat2-gif:fix/issue-59-barrel-phase3-src-lib
Closed

[Barrel #59 Phase 3] Migrate 32 src/lib/ files from localDb barrel to direct db/ imports#11790
jonlwheat2-gif wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
jonlwheat2-gif:fix/issue-59-barrel-phase3-src-lib

Conversation

@jonlwheat2-gif

Copy link
Copy Markdown
Contributor

Part of #11782 (tracks #59 on the fork)

Summary

Phase 3 of Issue #59: replace all barrel imports from @/lib/localDb with direct imports to the specific db/ modules in src/lib/.

32 files changed, 80 insertions, 91 deletions. Zero barrel imports remain in src/lib/ (excluding the barrel file itself).

What this does

Same mechanical rewrite as Phase 2, applied to the service/handler layer:

- import { getProviderConnections, getCachedSettings } from "@/lib/localDb";
+ import { getProviderConnections } from "@/lib/db/providers";
+ import { getCachedSettings } from "@/lib/db/readCache";

Why

  • AGENTS.md says: "Never barrel-import from localDb.ts — import specific db/ modules instead"
  • Vercel best practice bundle-barrel-imports: "Import directly, avoid barrel files"
  • This phase covers the 32 src/lib/ consumers

Testing

  • Mechanical import path rewrites — no logic changes
  • Verified: rg -c "from.*@/lib/localDb" src/lib/ --type ts returns 0 (excluding the barrel file)

Dependencies

Should be merged after Phase 2 and before Phase 5 (barrel deletion).

…db/ imports

Phase 3 of Issue #59: replace all barrel imports from @/lib/localDb
with direct imports to the specific db/ modules in src/lib/.

32 files changed, 80 insertions, 91 deletions.
Zero barrel imports remain in src/lib/ (excluding the barrel file itself).
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