Skip to content

Conversation

@danez
Copy link
Collaborator

@danez danez commented Jul 23, 2022

Finally, I finished the migration for version 6 of react-docgen.

There is still a bunch to do though, but the biggest part is done. 🎉

The cli is currently broken and not working, but I want to address this afterwards.

The most significant change besides the babel AST is that the NodePaths are now stateful, which means that the parser, importer, and options can now be directly accessed on every NodePath. This made it unnecessary to pass through the importer in nearly every single function.

And the best part, it looks like it is actually a lot faster, but I have to add more cases to the benchmark to be sure.

Screenshot 2022-07-31 at 22 19 12

Breaking changes:

  • New babel AST and no estree AST anymore
  • New API for resolvers
  • importer not passed as argument anymore to handlers and utilities
  • node 14 required
  • utilities did change
  • New API for main parse (importer added as param), although I want to change this even more.

Ref #502

@danez danez added this to the v6 milestone Jul 23, 2022
@danez danez marked this pull request as draft July 23, 2022 18:57
@danez danez mentioned this pull request Jul 23, 2022
19 tasks
@danez danez force-pushed the babel branch 2 times, most recently from 9eed5b7 to 9c84bf9 Compare July 26, 2022 21:21
@danez danez force-pushed the babel branch 2 times, most recently from 267c3cc to 7ce745f Compare August 5, 2022 20:14
@danez danez marked this pull request as ready for review August 7, 2022 19:33
@danez danez merged commit 0052653 into main Aug 7, 2022
@danez danez deleted the babel branch August 7, 2022 19:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant