(opt-in) Improve @babel/types with env.BABEL_TYPES_8_BREAKING#10917
Merged
nicolo-ribaudo merged 1 commit intobabel:masterfrom Jan 11, 2020
Merged
Conversation
Co-authored-by: Justin Ridgewell <justin+github@ridgewell.name>
60d964c to
9c15a55
Compare
JLHwung
reviewed
Dec 24, 2019
| export function assertClassExpression(node: Object, opts?: Object = {}): void { | ||
| assert("ClassExpression", node, opts); | ||
| } | ||
| export function assertClassDeclaration(node: Object, opts?: Object = {}): void { |
Contributor
There was a problem hiding this comment.
I think they are sorted alphabetically?
Member
Author
There was a problem hiding this comment.
This file is automatically generated. I had to swap then in the definitions/es2015 file, so they got swapped here.
nicolo-ribaudo
commented
Dec 24, 2019
| fields: { | ||
| // todo | ||
| }, | ||
| fields: !process.env.BABEL_TYPES_8_BREAKING |
Member
Author
There was a problem hiding this comment.
I used ! everywhere so that, when deleting it for Babel 8, I only have to make one selection (from ! to :) rather than two (from ! to ? and then from : to the end).
Dev-optimization? 😄
JLHwung
approved these changes
Jan 8, 2020
This was referenced Mar 7, 2020
This was referenced Mar 14, 2020
This was referenced Mar 21, 2020
This was referenced Mar 28, 2020
This was referenced Apr 2, 2020
This was referenced Apr 9, 2020
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
As discussed during the Dec 04 meeting, I'm introducing the stricter AST validation of #5971 behind a flag.
We decided to introduce those breaking changes when the
process.env.BABEL_TYPES_8_BREAKINGenv variable is enabled, to give time to some popular projects (likereact-native) to update their code before the Babel 8 release, to provide a smoother update experience to our users.I didn't include the changes related to the default value of
decorators(since they are still highly experimental, I don't think we should pollute the AST unless the parser plugin is enabled). Also, I didn't include thevalidateDeeplogic, but we can introduce it later in our test runner.Our tests are already passing when
BABEL_TYPES_8_BREAKING=true.