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

Support babel data-type="module" #8394

Merged
merged 2 commits into from May 25, 2020
Merged

Conversation

fisker
Copy link
Member

@fisker fisker commented May 25, 2020

Ref: babel/babel#11466

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

? {
parser,
__babelSourceType:
node.attrMap && node.attrMap.type === "module"
Copy link
Member Author

@fisker fisker May 25, 2020

Choose a reason for hiding this comment

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

This is mistake from #8173, should be node.parent.attrMap

@fisker
Copy link
Member Author

fisker commented May 25, 2020

@thorn0 About this, I tried to remove opts && in const sourceType = opts && opts.__babelSourceType === "script" ? "script" : "module"; again, and found it's called from here.

@thorn0
Copy link
Member

thorn0 commented May 25, 2020

A changelog entry is needed. Maybe just modify the one for #8173.

@fisker
Copy link
Member Author

fisker commented May 25, 2020

The changelog_unreleased/html dir contains pr-8137.md pr-8173.md pr-8371.md... What a coincidence!

@thorn0
Copy link
Member

thorn0 commented May 25, 2020

Yep, I noticed that too. :)

@fisker
Copy link
Member Author

fisker commented May 25, 2020

Done.

@fisker
Copy link
Member Author

fisker commented May 25, 2020

Another coincidence, when I saw this babel PR yesterday, we both have 627 open issues. 😄

@alexander-akait alexander-akait merged commit 3606c2e into prettier:master May 25, 2020
@fisker fisker deleted the babel-script branch May 25, 2020 09:52
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants