Update babel to v7.20.0#13733
Merged
fisker merged 8 commits intoprettier:nextfrom Oct 29, 2022
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
fisker
commented
Oct 26, 2022
| } | ||
| const decorators = node.declaration?.decorators ?? node.decorators; | ||
| if (isNonEmptyArray(decorators)) { | ||
| return Math.min(locStart(decorators[0]), start); |
Member
Author
There was a problem hiding this comment.
It seems the old one is not right, if decorators after export, it will still use range of decorators[0]
Contributor
There was a problem hiding this comment.
In which case is locStart(decorators[0]) less then start? The change in Babel that broke prettier was that now the start of the outer node should always be ≤ than the start of the inner nodes, so start ≤ locStart(decorators[0]).
Member
Author
There was a problem hiding this comment.
In which case is locStart(decorators[0]) less then start?
Other parsers, flow/typescript I think they followed old behavior of babel.
418df1b to
966f2c4
Compare
@babel/parser version
Member
Author
|
This PR only fixes
Will be done in separate prs. |
sosukesuzuki
approved these changes
Oct 29, 2022
sosukesuzuki
pushed a commit
to sosukesuzuki/prettier
that referenced
this pull request
Nov 2, 2022
2 tasks
fisker
added a commit
to fisker/prettier
that referenced
this pull request
Nov 3, 2022
# Conflicts: # package.json # tests/unit/__snapshots__/visitor-keys.js.snap # yarn.lock
medikoo
pushed a commit
to medikoo/prettier-elastic
that referenced
this pull request
Feb 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Babel going to make some change to the location info babel/babel#15032. I downloaded the artifact to see what will break.
Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨