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

parser: Fix Hack/smart-pipe error positions #13426

Conversation

js-choi
Copy link
Contributor

@js-choi js-choi commented Jun 5, 2021

Q                       A
Fixed Issues? None
Patch: Bug Fix? Yes
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? Yes
Documentation PR Link babel/website#2541
Any Dependency Changes? No
License MIT

This pull request is for the Hack-pipes proposal (and the deprecated smart-mix pipes proposal). It is a continuation of #13191. It fixes errors raised for invalid topic references, such that the errors point to the topic tokens themselves, rather than immediately after them.

(This therefore also reverts a breaking change to smart-mix pipe error positions made in #13191 that I had not noticed before, in which the positions of such errors were inadvertently incremented by one.)

I made this pull request separately from #13416 because it is a relatively minor change that nevertheless changes several test fixtures that are unrelated to #13416. It should probably be merged before #13416.

Fix errors for invalid topic references so that the errors point to the topic tokens themselves, rather than immediately after them.

Reverts a breaking change to smart-mix pipe error positions made in babel#13191.
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 5, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e0182f9:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

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

Thanks!

@fedeci fedeci added pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Pipeline Operator labels Jun 6, 2021
@existentialism existentialism merged commit 623df5c into babel:feat-7.15.0/hack-pipes Jun 7, 2021
@js-choi js-choi deleted the hack-pipes-error-position branch June 7, 2021 15:30
js-choi added a commit to js-choi/babel that referenced this pull request Jun 7, 2021
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 7, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Pipeline Operator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants