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

Requeue parent path after processing optionals #12389

Closed
wants to merge 1 commit into from
Closed

Conversation

existentialism
Copy link
Member

@existentialism existentialism commented Nov 23, 2020

Q                       A
Fixed Issues? Fixes #12386
Patch: Bug Fix? Y
License MIT

@existentialism existentialism added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Nov 23, 2020
}

if (needsRequeue) {
parentPath.requeue();
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker, but we should figure out why the test passes without requeuing parent path on @babel/traverse 7.12.3.

Copy link
Member Author

Choose a reason for hiding this comment

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

For sure, in the middle of digging actually

Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like: #12302, still digging

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 23, 2020

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 26c522e:

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

}

if (needsRequeue) {
parentPath.requeue();
Copy link
Member

Choose a reason for hiding this comment

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

I think we should requeue replacementPath and not parentPath, since they are not always the same thing.

Copy link
Member Author

Choose a reason for hiding this comment

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

That was my first thought too, but there's some non obvious thing going on, still digging further.

Copy link
Member

Choose a reason for hiding this comment

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

Oh ok. Do you think that it's better to merge this PR since "it works", and then revisit for another release? Or should we wait?

@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/33121/

@nicolo-ribaudo
Copy link
Member

Please wait for merging this PR, I might have a fix that handles this at the NodePath level.

@existentialism existentialism deleted the issue12386 branch November 23, 2020 22:25
@luispedro18
Copy link

Please wait for merging this PR, I might have a fix that handles this at the NodePath level.

Hey @nicolo-ribaudo and @existentialism ... the fix at NodePath level might fix the issues that were raised but doesn't still fully fix another issue I'm having which this PR fixes ...

const findAttribute = (selectedProduct, identifier, valueId) =>
    selectedProduct?.allLevelsProductAttributes?.find(attribute => {
        return attribute?.identifier === identifier && attribute.values?.[0]?.identifier === valueId;
    });

If you put this piece of code on REPL of this build it's fine but if you put the exact same code on latest version REPL it still has some optional chaining that was not correctly transpiled.. Thoughts?

@luispedro18
Copy link

Ahhh, misunderstood the nodePath fix then.. I saw in the latest changelog that a bug related with nodePath was fixed and thought that was the one... Sorry, my bad! 😅
And yes, #12391 seems to fix my issue.. Thanks for the quick reply 🙌

@nicolo-ribaudo
Copy link
Member

Fixed in 7.12.9

@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 Feb 24, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Optional Chaining
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript non-null assertion operator not stripped off with deep optional chaining
5 participants