-
-
Notifications
You must be signed in to change notification settings - Fork 208
Conversation
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.
Can we mark this as a breaking change rather than a feature? Since v11 is still in development, I would advocate for releasing this in v11.
Also, can we add some tests for these changes?
path.parent && | ||
path.parent.type === "ObjectPattern" | ||
) { | ||
node.type = "ExperimentalRestProperty"; |
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.
IsArray{Pattern|Expression}
already taken care of?
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.
Yes.
babel-eslint/test/specs/babel-eslint.js
Lines 485 to 495 in 2540427
it("RestOperator", () => { | |
parseAndAssertSame("var { a, ...b } = c"); | |
parseAndAssertSame("var [ a, ...b ] = c"); | |
parseAndAssertSame("var a = function (...b) {}"); | |
}); | |
it("SpreadOperator", () => { | |
parseAndAssertSame("var a = { b, ...c }"); | |
parseAndAssertSame("var a = [ a, ...b ]"); | |
parseAndAssertSame("var a = sum(...b)"); | |
}); |
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.
Great, thanks - makes sense!
Some node types has changes in accordance with changes in espree: - `ExperimentalSpreadProperty` became `SpreadElement`. - `ExperimentalRestProperty` became `RestElement`. - `Literal` became `JSXText` (for JSXText).
How about this commit message title?
The old tests has covered the changes. The function babel-eslint/test/specs/babel-eslint.js Lines 485 to 495 in 2540427
|
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.
LGTM!
path.parent && | ||
path.parent.type === "ObjectPattern" | ||
) { | ||
node.type = "ExperimentalRestProperty"; |
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.
Great, thanks - makes sense!
I'm not sure how we're managing the alpha release. Should this be merged into master, or into some interim branch? |
I'm not sure either - hopefully someone from the core Babel team can help us out here! |
v11 works are already present in master, so I suppose v11 development happens in master. And v10 development be done in branch 10.x. |
Friendly ping @nicolo-ribaudo (just because you gave a thumbs up above 😄). This seems like a good thing to land in v11 to me, but would love input from the core team! |
One more friendly ping here. Our last release ended up causing one of the core rules to crash with |
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.
Ok sounds good. Mostly removing the things we had before for compat and now aren't.
Friendly ping - is this something we can merge? |
Do we want to ship 11 and this as 12? Or just lump it in? |
I think it's fine to lump this in with 11 since it's still in beta. |
@kaicataldo let's do it |
This documents the breaking change that landed in babel#785
This documents the breaking change that landed in #785
This is a breaking change that change the baseline to espree 6.
Some node types has changes in accordance with changes in espree:
ExperimentalSpreadProperty
becameSpreadElement
.ExperimentalRestProperty
becameRestElement
.Literal
becameJSXText
(for JSXText).fixes #759