Skip to content

fix(rsc): use module export effect transform for use server file directive - #1355

Merged
hi-ogawa merged 42 commits into
mainfrom
fix/issue-1350
Aug 3, 2026
Merged

fix(rsc): use module export effect transform for use server file directive#1355
hi-ogawa merged 42 commits into
mainfrom
fix/issue-1350

Conversation

@hi-ogawa

@hi-ogawa hi-ogawa commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

This PR adds transformModuleExportEffect for "use server" file directive transform. This simplifies the logic compared to previous transformWrapExport approach and allows aligning with Next.js better.

The substantial logic is duplicated from transformWrapExport and the parity is verified through tests. The unification of some logic is deferred to:

Co-authored-by: OpenCode <noreply@opencode.ai>
Comment thread packages/plugin-rsc/src/transforms/module-export.test.ts Outdated
Comment thread packages/plugin-rsc/src/transforms/module-export.test.ts Outdated
Co-authored-by: OpenCode <noreply@opencode.ai>
Comment thread packages/plugin-rsc/src/transforms/module-export.ts Outdated
Comment thread packages/plugin-rsc/src/transforms/module-export.ts Outdated
Comment thread packages/plugin-rsc/src/transforms/module-export.ts Outdated
@hi-ogawa hi-ogawa changed the title feat(rsc): add module export transform feat(rsc): add new module export transform to retire transformWrapExport Jul 30, 2026
Comment thread packages/plugin-rsc/src/transforms/module-export.ts Outdated
Comment thread packages/plugin-rsc/src/plugin.ts Outdated
hi-ogawa and others added 5 commits July 30, 2026 16:38
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>
Comment thread packages/plugin-rsc/src/transforms/module-export.ts Outdated
Comment thread packages/plugin-rsc/src/transforms/module-export.test.ts Outdated
hi-ogawa and others added 2 commits July 31, 2026 13:03
Comment thread packages/plugin-rsc/src/transforms/module-export.ts Outdated
Comment thread packages/plugin-rsc/src/transforms/module-export.ts Outdated
hi-ogawa and others added 2 commits July 31, 2026 13:55
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
hi-ogawa and others added 5 commits July 31, 2026 14:25
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/server-action.ts
#	packages/plugin-rsc/src/transforms/source-map.test.ts
#	packages/plugin-rsc/src/transforms/test-utils.ts
Comment thread packages/plugin-rsc/src/transforms/module-export-effect.ts Outdated
Comment thread packages/plugin-rsc/src/transforms/module-export-effect.ts
Comment thread packages/plugin-rsc/src/transforms/module-export-effect.ts Outdated
Comment thread packages/plugin-rsc/src/transforms/module-export-effect.test.ts Outdated
Comment thread packages/plugin-rsc/src/transforms/module-export-effect.test.ts
Comment thread packages/plugin-rsc/src/transforms/module-export-effect.ts
Comment thread packages/plugin-rsc/src/transforms/module-export-effect.ts Outdated
Comment thread packages/plugin-rsc/src/transforms/module-export-effect.ts Outdated
Comment thread packages/plugin-rsc/src/transforms/module-export-effect.ts
hi-ogawa and others added 10 commits August 3, 2026 11:30
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>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
hi-ogawa and others added 2 commits August 3, 2026 12:39
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
@hi-ogawa
hi-ogawa marked this pull request as ready for review August 3, 2026 04:13
hi-ogawa and others added 3 commits August 3, 2026 13:13
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 merged commit 640d7d7 into main Aug 3, 2026
22 checks passed
@hi-ogawa
hi-ogawa deleted the fix/issue-1350 branch August 3, 2026 04:43
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