Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify synthetic default generation code for dual-mode module resolution #46156

Merged

Conversation

weswigham
Copy link
Member

module: node12 was relying on our existing esModuleInterop logic for determining if modules should have a synthetic default member equivalent to the module shape - this is correct for a cjs format import of another cjs file, however should be wholly disabled for esm/esm imports, and is overcomplicated for esm/cjs imports (which simply always have a synthetic default, no heuristics needed). In this PR, I add the missing logic to our synthetic default selection code to handle these new modal imports.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 1, 2021
@weswigham weswigham merged commit ccc1909 into microsoft:main Oct 1, 2021
@DanielRosenwasser
Copy link
Member

I'm going to skip the sync.

@typescript-bot cherry-pick this to release-4.5 and LKG

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 1, 2021

Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into release-4.5 on this PR at 7e3a80a. You can monitor the build here.

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Oct 1, 2021

Ah I just saw #46159. Maybe we'll do a full sync. 😭

@typescript-bot
Copy link
Collaborator

Hey @DanielRosenwasser, I've opened #46162 for you.

typescript-bot pushed a commit to typescript-bot/TypeScript that referenced this pull request Oct 1, 2021
Component commits:
7e3a80a Modify synthetic default generation code for dual-mode module resolution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants