mirror of
https://github.com/morluto/rea
synced 2026-10-26 14:25:49 -04:00
bae87b4ded
* fix(browser): derive source-map imports from syntax nodes Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com> * fix(browser): recover source-map dependencies from decorated and aliased sources Discarding a source's edges whenever it had parse errors cost more than it protected. parseJavaScriptSource only enabled jsx and typescript, so a decorated TypeScript source did not parse at all and contributed no edges at all, even for the imports Babel could otherwise have read. That is the common shape for the bundles this boundary inspects. "decorators-legacy" is enabled instead of "decorators" because the standard form still rejects parameter decorators such as constructor(@Inject() private s: S), which is the Angular and Nest dependency-injection shape. import x = require("m") parses cleanly but is a TSImportEqualsDeclaration rather than a call expression, so it contributed no edge. It is now read as a require dependency. It is only legal at module top level and always refers to the host loader, so it needs no unbound-require check; the local-alias form imports an entity name and still declares nothing. A source whose syntax could not be recovered now yields status "partial" with a limitation naming the affected sources, instead of an included item whose empty edge list was indistinguishable from a source that genuinely imports nothing. Edges that did parse are retained and the caller is told the list is a subset, which matches how the static and semantic analysers already report recovered syntax. The source-map item status union gains "partial" and the coverage rollup now counts it as retained, so a collection of only-partial items reports partial rather than unavailable. * Merge main into fix(browser): derive source-map imports from syntax nodes Resolve the generated-file conflicts by taking main's generated output and regenerating from the merged source contracts, rather than merging generated text by hand. --------- Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>