Skip to content

feat(rsc): allow transformWrapExport filter by node ast - #1385

Merged
hi-ogawa merged 6 commits into
mainfrom
wrap-export-value-node
Aug 4, 2026
Merged

feat(rsc): allow transformWrapExport filter by node ast#1385
hi-ogawa merged 6 commits into
mainfrom
wrap-export-value-node

Conversation

@hi-ogawa

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

Copy link
Copy Markdown
Contributor

This PR adds ModuleExportMeta.valueNode, so transformWrapExport filter can decide which node to wrap based on node ast.

This allows handling the exotic case of Next.js use cache where it allows array/object export to not be rejected. See use-cache-callable example for reference.

The additional source-map fixtures characterize the current transformWrapExport and transformModuleExportEffect behavior across classes, comments, aliases, recursive references, and local binding preservation.

hi-ogawa and others added 4 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>
@hi-ogawa hi-ogawa changed the title refactor(rsc): expose export value nodes refactor(rsc): expose export value nodes for transformWrapExport filter Aug 4, 2026
@hi-ogawa hi-ogawa changed the title refactor(rsc): expose export value nodes for transformWrapExport filter feat(rsc): expose export value nodes for transformWrapExport filter Aug 4, 2026
@hi-ogawa
hi-ogawa marked this pull request as ready for review August 4, 2026 06:37
@hi-ogawa hi-ogawa changed the title feat(rsc): expose export value nodes for transformWrapExport filter feat(rsc): allow transformWrapExport filter by node ast Aug 4, 2026
} from './module-export-scan'
import { validateNonAsyncFunction } from './utils'

type ExportMeta = {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also now consolidated with ModuleExportMeta.

@hi-ogawa
hi-ogawa merged commit 64ae63c into main Aug 4, 2026
24 checks passed
@hi-ogawa
hi-ogawa deleted the wrap-export-value-node branch August 4, 2026 06:53
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