Skip to content

fix(rsc): preserve fully filtered export groups - #1386

Closed
hi-ogawa wants to merge 10 commits into
mainfrom
wrap-export-filtered-declarations
Closed

fix(rsc): preserve fully filtered export groups#1386
hi-ogawa wants to merge 10 commits into
mainfrom
wrap-export-filtered-declarations

Conversation

@hi-ogawa

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

Copy link
Copy Markdown
Contributor

Follow-up to #1385.

transformWrapExport currently rewrites export syntax even when every export in a group is rejected by the filter. Depending on the export form, this can change const to let, move declarations, introduce synthetic default bindings, or replace re-exports with imports and generated exports despite there being nothing to wrap.

This evaluates each export filter once and leaves fully filtered declarations, variable declarations, specifier groups, re-exports, and default exports unchanged. Mixed groups still retain the existing rewrite behavior for selected exports. Filtered exports are not validated, generated, or reported.

Tests:

  • pnpm -C packages/plugin-rsc test --run
  • pnpm -C packages/plugin-rsc tsc

hi-ogawa and others added 8 commits August 4, 2026 15:23
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>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>

# Conflicts:
#	packages/plugin-rsc/src/transforms/wrap-export.ts
@hi-ogawa
hi-ogawa changed the base branch from main to wrap-export-value-node August 4, 2026 06:52
Base automatically changed from wrap-export-value-node to main August 4, 2026 06:53
hi-ogawa and others added 2 commits August 4, 2026 15:54
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
@hi-ogawa hi-ogawa changed the title fix(rsc): preserve filtered export declarations fix(rsc): preserve fully filtered export groups Aug 4, 2026
@hi-ogawa

hi-ogawa commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

superseded by #1387

@hi-ogawa hi-ogawa closed this Aug 4, 2026
@hi-ogawa
hi-ogawa deleted the wrap-export-filtered-declarations branch August 4, 2026 08:05
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