-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[babel 8] Adjust buildUndefinedNode
and gatherSequenceExpressions
#15822
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/55698/ |
685f0b5
to
6aa0a98
Compare
eslint.config.js
Outdated
|
||
if (config.processor) { | ||
config.processor.meta = { | ||
version: "jest/recommended", | ||
name: "jest/recommended", | ||
}; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the previous eslint with cache was broken for the test file (exception in husky).
I'm not sure if this is correct, you might want to take a look! @JLHwung
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version
is supposed to be what it is in the package.json
of eslint-plugin-jest
, and the name
is likely jest/snapshot-processor
. Anyway this change should have been applied on the upstream repo. We can leave a todo note to remove that once eslint-plugin-jest
specifies such info.
6aa0a98
to
e5a6b0f
Compare
|
||
export function buildUndefinedNode() { | ||
return unaryExpression("void", numericLiteral(0), true); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you split this in a separate PR, that we can include in the changelog for the next Babel 7 minor, and only keep breaking changes in this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, do you want to prepare this for 7.23.0? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, I will do it right away!
@@ -783,7 +783,7 @@ export default class Scope { | |||
} | |||
|
|||
buildUndefinedNode() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we could get rid of this in Babel 8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that t.buildUndefinedNode
will be likely introduced in the next minor, if we remove scope.buildUndefinedNode
, it will break many plugins with very short transition period. I suggest we deprecate scope.buildUndefinedNode
from the next minor and remove it in Babel 9, if Babel 8 is to be released soon.
buildUndefinedNode
and gatherSequenceExpressions
buildUndefinedNode
and gatherSequenceExpressions
Could you rebase? :) |
path.scope.registerBinding(kind, declarPath.get("declarations")[len - 1]); | ||
path.scope.registerBinding( | ||
["using", "await using"].includes(kind) ? "const" : (kind as BindingKind), | ||
declarPath.get("declarations")[len - 1], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, could you add a test for this change? (and maybe split it to another PR if it fixes a bug :P)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! I should fix it another way.
44627e5
(#15822)
e5a6b0f
to
44627e5
Compare
Replaced by #16057 -- sorry for asking to rebase 😅 |
Fixes #1, Fixes #2
buildUndefinedNode
to@babel/types
.gatherSequenceExpressions
.