refactor: kill J namespace barrel (Phase 1, #234) - #235
Merged
Conversation
Phase 1 of #234. Replace `import * as J from <root>` + `J.<Sub>.<Sym>` with named imports from each submodule barrel. Root src/index.ts emptied to break the import cycle. Behavior-identical: J.<Sub>.X already resolved through src/<sub>/index.ts. Refs #234. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7 tasks
Owner
Author
Brooks-Lint PR Review: ApprovedHealth Score: 95/100 Phase 1 of #234 is successfully implemented. By replacing the global \J\ namespace barrel with granular named imports, this PR breaks the primary circular dependency cycle that previously coupled the entire system. Key Findings:
Recommendation: Merge immediately to unblock Phase 2 (DI Container) and minimize rebase conflicts. |
This was referenced Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of #234 — package-by-feature restructure.
Removes the
Jnamespace barrel that created the root import cycle (src/index.ts → submodule → src/index.ts).Changes
import * as J from '<root>'+J.<Sub>.<Sym>with named imports from each submodule barrel across 47 files.import { Util } from '..'invscode/conf.ts.src/index.ts(export {}) to break the cycle.Why behavior-identical
J.<Sub>.Xalready resolved throughsrc/<sub>/index.ts. Rewriting to named imports from the same barrel changes resolution path only by dropping the root re-export — no symbol resolves differently.Verification
npm run compile-tests(tsc) ✔npm run compile(esbuild) ✔npm run lint✔Notes
import * as Jremains; root barrel reduced toexport {}.Refs #234.
🤖 Generated with Claude Code