Skip to content

fix(rsc): avoid rewriting filtered exports in transformWrapExport - #1387

Merged
hi-ogawa merged 10 commits into
mainfrom
wrap-export-align
Aug 4, 2026
Merged

fix(rsc): avoid rewriting filtered exports in transformWrapExport#1387
hi-ogawa merged 10 commits into
mainfrom
wrap-export-align

Conversation

@hi-ogawa

@hi-ogawa hi-ogawa commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

I realized transformModuleExportWrap (introduced in #1381) and existing transformWrapExport share almost same logic with minor twist as explained in the pr description #1381.

The apparent divergence turns out to be something transformWrapExport can address on its own, so this PR basically aligns the structure from transformModuleExportWrap, which has a cleaner code path as it's built from scratch.

The concrete behavioral aspect of the alignment is to skip transform entirely when all exports are filtered out.

hi-ogawa and others added 9 commits August 4, 2026 16:19
Select exports before mutating their declarations, preserve skipped specifiers, and validate selected uninitialized bindings.

Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
@hi-ogawa hi-ogawa changed the title fix(rsc): avoid rewriting filtered exports fix(rsc): avoid rewriting filtered exports in transformWrapExport Aug 4, 2026
@hi-ogawa
hi-ogawa marked this pull request as ready for review August 4, 2026 08:09
Co-authored-by: OpenCode <noreply@opencode.ai>
@hi-ogawa
hi-ogawa merged commit fba021f into main Aug 4, 2026
24 checks passed
@hi-ogawa
hi-ogawa deleted the wrap-export-align branch August 4, 2026 08:29
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