Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Avoid removing class fields using flow in plugin-transform-flow-strip-types plugin#10120

Merged
nicolo-ribaudo merged 3 commits intobabel:next-8-devfrom
pajaydev:fix-flow
Feb 9, 2020
Merged

Avoid removing class fields using flow in plugin-transform-flow-strip-types plugin#10120
nicolo-ribaudo merged 3 commits intobabel:next-8-devfrom
pajaydev:fix-flow

Conversation

@pajaydev
Copy link
Contributor

Q                       A
Fixed Issues? Fixes #10039
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

Currently when using flow plugin transform-flow-strip-types removes the uninitialize class fields, after this change we won't remove the uninitialize class fields. However they can remove using ignoreUninitialized option mentioned here #9141

@nicolo-ribaudo nicolo-ribaudo added this to the Babel 8.x milestone Jun 25, 2019
@nicolo-ribaudo nicolo-ribaudo added area: flow PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release PR: Spec Compliance 👓 A type of pull request used for our changelog categories labels Jun 25, 2019
@nicolo-ribaudo
Copy link
Member

Can you add the transform-class-properties plugin to the failing test? Also, probably you'll need to update the output file: you can delete it and it will be re-generated.

@pajaydev
Copy link
Contributor Author

@nicolo-ribaudo okay cool. Let me try

@babel-bot
Copy link
Collaborator

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

1 similar comment
@babel-bot
Copy link
Collaborator

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

@pajaydev
Copy link
Contributor Author

pajaydev commented Jul 2, 2019

@nicolo-ribaudo Thanks. I fixed it.

@pajaydev
Copy link
Contributor Author

@nicolo-ribaudo Kindly review these changes.

@nicolo-ribaudo
Copy link
Member

This PR looks good, but we will have to wait until v8

"plugins": [
"transform-flow-strip-types",
"transform-classes",
"@babel/plugin-proposal-class-properties",
Copy link
Member

Choose a reason for hiding this comment

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

This should just be proposal-class-properties, to use the package from the monorepo and not from node_modules

@nicolo-ribaudo nicolo-ribaudo mentioned this pull request Nov 21, 2019
34 tasks
@nicolo-ribaudo nicolo-ribaudo changed the base branch from master to next-8-dev February 4, 2020 23:52
@nicolo-ribaudo
Copy link
Member

According to our e2e tests, this breaking change affects Babel itself 🙃

I'll fix it in master before merging this PR.

@nicolo-ribaudo nicolo-ribaudo merged commit e76918f into babel:next-8-dev Feb 9, 2020
nicolo-ribaudo added a commit that referenced this pull request Feb 9, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Feb 9, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Feb 13, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Feb 20, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Feb 23, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
JLHwung pushed a commit to JLHwung/babel that referenced this pull request Feb 27, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Feb 27, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Mar 3, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Mar 10, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Mar 11, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Mar 13, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Mar 22, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Apr 11, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Apr 20, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
arku pushed a commit to arku/babel that referenced this pull request Apr 20, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Apr 21, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Apr 21, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request Apr 22, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request May 8, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
nicolo-ribaudo added a commit that referenced this pull request May 9, 2020
* flow avoid removing class fields

* fix test case

* Update test

Co-authored-by: Nicolò Ribaudo <[email protected]>
@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 May 11, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2020
@JLHwung JLHwung removed this from the v8.0.0 milestone Aug 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: flow outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release PR: Spec Compliance 👓 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants