Skip to content

Conversation

andrewbranch
Copy link
Member

Found a PR porting error

@Copilot Copilot AI review requested due to automatic review settings September 23, 2025 21:35
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a porting error in the TypeScript compiler's module interop behavior. The PR corrects the default value of esModuleInterop when using --module node18, ensuring it properly defaults to true like other Node.js module kinds.

  • Fixed missing ModuleKindNode18 case in GetESModuleInterop() function
  • Updated baseline test files to reflect the corrected behavior with proper import helpers
  • Removed diff baselines that are no longer needed due to the fix

Reviewed Changes

Copilot reviewed 101 out of 101 changed files in this pull request and generated 1 comment.

File Description
internal/core/compileroptions.go Added ModuleKindNode18 to the switch case that enables esModuleInterop by default
testdata/baselines/reference/submoduleAccepted/... Updated baseline files reflecting the corrected behavior
testdata/baselines/reference/submodule/... Updated baseline files showing proper import helper generation

@andrewbranch andrewbranch added this pull request to the merge queue Sep 23, 2025
Merged via the queue into microsoft:main with commit c0ef09c Sep 23, 2025
22 checks passed
@andrewbranch andrewbranch deleted the node18-esModuleInterop branch September 23, 2025 22:32
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.

2 participants