You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codemod skips native SVG ownership when a component is referenced in a type query #2403
In the renderer-ownership change in #2402, give @octanejs/codemod a path-only mark.svg and run the following module with --svg-paths.
importtype{ComponentProps}from'react';importMarkfrom'./mark.svg';functionButton({ children }){return<button>{children}</button>;}exportfunctionPane(){return<Button><Mark/></Button>;}exporttypeProps=ComponentProps<typeofPane>;
Observed behavior
The SVG stays on its original import. The generated module matches the default run byte for byte. Removing the last line lets the same command generate the native SVG component. A type query on Button also prevents migration. We reproduced these results on both 38d1933d0 and the integrated head ee03e3fb7. The package manifest on those revisions is @octanejs/[email protected].
Expected behavior
An erased type query on the owner or receiving component should preserve eligibility for this migration. The resulting public type expression should still resolve. An executable use of the component such as capture(Pane) can hand it to another renderer and should continue to defer migration.
The ownership walk receives references from localUses, including value symbols used in TypeScript type queries. This is a missed migration present before the conflict resolution in #2402. Its fix needs regression coverage for both type references and runtime escapes. Original review finding.
Activity