merge: reconcile upstream through d0bb9be5
fork/consolidated now contains upstream main through d0bb9be5 (three commits), so a React Router lazy route follows a barrel that re-exports an import (#2558), relinks a page that appears below its barrel on sync (#2560), and a component a file declares as a value is what its JSX renders (#2420).
Conflicts. Seven files conflicted, because upstream's fixes were written against the regex-based JavaScript resolver and the fork reads the kernel's binding rows instead (91902770). Nothing brings the regexes back.
| File | Resolution |
|---|---|
src/index.ts | Fork's version kept. Upstream's sync change (re-open failed references that wait for a module through a barrel) went into src/codegraph.ts, where the class now lives; createImportReader takes (root, queries) on the fork and changedFilePaths may be absent, so both are handled. |
src/resolution/alias-binding.ts | Fork's version kept; extractLocalExportAliases and defaultExportBinding stay deleted. |
src/resolution/module-importers.ts | Fork's reader kept. Upstream's EXPORTS_A_BINDING regex is replaced by exportedBindings, built from the file's top-level binding rows that carry exportedAs (the nodeless default row of export default withAuth(Page) is skipped). Upstream's reopenReferencesThroughBarrels and passesOn came in as written. |
src/resolution/frameworks/react.ts | Upstream's new code (declaredComponent, valueLoader, loaderOf, wrappedComponent), with exportedComponent and exportsBinding reading binding rows and declaredValue using getNodesByName (the fork has no getNodesInFileNamed). |
src/resolution/callback-synthesizer.ts | Fork's imports kept plus declaredComponent. Upstream's input-file list (collectInputs, lazyValueModules) is not taken: the fork re-runs synthesis in full on a sync that changes a file. |
__tests__/react-router.test.ts, docs/design/framework-coverage.md | Both sides kept; the doc row labels upstream's evidence "upstream:". |
Checks, on this head. Upstream's five new or changed test files: 123 of 123 pass. Full suite 723 files / 9,087 tests pass (39 skipped); tsc --noEmit and check:agent-docs clean; golden dumps unchanged. Precision gate (eval:precision): vite absent 6/6 and present 2/2 held, vitest absent 1/1 held.
README. The "About this fork" merge point now names d0bb9be5. Rows checked and left as they were: fork-vs-upstream benchmark, React Router, getHref, framework mode, Solid, inferred links kept current on sync.
One fixture edited. In __tests__/jsx-child-disambiguation.test.ts the text Sign in <LoginPage /> became Sign in: <LoginPage />; the assertion is unchanged. The fork's tag detector (opensTag) reads a word before < as a type or comparison, so it draws no render edge there where upstream does. That is older than this merge and is not changed here.
Not covered. Indexing time with the new declaredComponent lookup (one cached getNodesByName per PascalCase reference in .tsx/.jsx) was not measured. The merge commit keeps upstream's d0bb9be5 as a parent, so land it as a merge commit. Promoting the deployed build is a separate step.
Summary by cubic
Reconciles fork/consolidated with upstream main through d0bb9be5, adopting three fixes: lazy React Router routes follow a barrel that re-exports an import, sync relinks a route when its page appears below its barrel, and a component a file declares as a value is what its JSX renders. Upstream's five test files pass 123/123, the full suite is clean (723 files, 9,087 tests, 39 skipped), and golden dumps are unchanged.
Conflict resolutions. The seven conflicted files share one choice: upstream's regex-based JavaScript resolver is not brought back; its fixes were ported to read the kernel's binding rows instead.
src/codegraph.tskeeps the fork's version; the sync-pathreopenReferencesThroughBarrelscall moved here, handling the fork'screateImportReader(root, queries)signature and a possibly absentchangedFilePaths.module-importers.tsreplacesEXPORTS_A_BINDINGwithexportedBindings, built from top-level binding rows carryingexportedAs;extractLocalExportAliasesanddefaultExportBindingstay deleted.react.tsreads exports from binding rows and looks up declared values throughgetNodesByName(the fork has nogetNodesInFileNamed).callback-synthesizer.tsdrops upstream'scollectInputs/lazyValueModulesinput list: the fork re-runs synthesis in full on any sync that changes a file.__tests__/react-router.test.tsanddocs/design/framework-coverage.mdkeep both sides.
One fixture in jsx-child-disambiguation.test.ts was edited, Sign in: <LoginPage /> for Sign in <LoginPage />, because the fork's tag detector reads a word before < as a type or comparison and draws no render edge there; upstream's original text is kept as an it.fails case so the limit stays visible, and the assertion is unchanged. Trap 19 in framework-coverage.md scopes Pattern 1 to PascalCase references in .tsx/.jsx files and notes the type/value namespace limit. The README's merge point now names d0bb9be5. Indexing cost of the new declaredComponent lookup was not measured, and promoting the deployed build is a separate step.
Summary by CodeRabbit
- Bug Fixes
- React Router routes and layouts now resolve components correctly when re-exported through nested folders or loaded lazily.
- Route references update when a page is added or gains an export, including pages reached through re-exports.
- JSX links now prefer values declared in the same file—including wrapped, aliased, and lazy-loaded components—over unrelated components with the same name elsewhere.
- Documentation
- Updated the recorded upstream commit and expanded framework coverage notes.