Skip to content
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

6.0.0 #502

Closed
19 tasks done
danez opened this issue May 8, 2021 · 7 comments
Closed
19 tasks done

6.0.0 #502

danez opened this issue May 8, 2021 · 7 comments

Comments

@danez
Copy link
Collaborator

danez commented May 8, 2021

PR #494

  • Resolve imported proptypes and types (Add custom importers for importing types/values #464)
  • Add support for enabling import feature in cli
  • Migrate to TS 🎉
  • Migrate from ast-types to babel toolchain. We use estree AST for historic reasons and it is only used internally and in external resolvers/handlers. So switching to babel (non-estree) AST has several advantages:
    • We are not dependent on ast-types anymore, which seems barely maintained
    • We can use all new syntax features in babel out-of-the-box, before estree has decided how to represent the syntax in the AST spec
    • Potentially performance improvement, because the estree plugin in the babel parser is additional work, which gets eliminated.
    • Big Downside and Breaking Change is that probably all custom handlers/resolvers will need an update.
    • Related: fix: Remove usage of ast-type builders #569, More less builders #570
    • PR: feat!: Migrate to babel toolchain #638
  • Include fix: Correctly support ClassDeclarations without identifier #475 tests now that ast-types is gone.
  • Maybe new API for resolvers and handlers which allows checking for correct react-docgen version.
    • While working on the babel migration it became clear this has to be done
    • Thinking about a new API object being passed to resolvers and handlers with traverse(), parser(), and more
    • Also a new FileObject that holds source code and options so we do not need to attach them to the AST.
    • in PR: feat!: Migrate to babel toolchain #638
  • Maybe allow multiple resolvers aka ChainResolver. For example should allow to find one exported component (first resolver) OR any @nnotated component (second resolver).
  • Integrate new resolver to find @nnotated components (https://github.com/Jmeyering/react-docgen-annotation-resolver) Integrate into react-docgen Jmeyering/react-docgen-annotation-resolver#29
  • Implement changes from https://github.com/nerdlabs/react-docgen-displayname-handler
  • Migrate from Travis to GH Actions
  • Split into two packages react-docgen & react-docgen-cli, removes unnecessary dependencies if you do not need the cli
  • Migrate from commander to yargs or update commander
  • Rename master branch to main
  • Create MIGRATE.md (not necessary now that we have changeset)
  • Create tests for TODOs in code
  • add react-bootstrap to benchmark
  • try new version in react-styleguidist
  • try new version in storybook

Post-Release:

  • New website with playground and also documentation about APIs and configuration as well as examples. Not sure what system to use for this, but I guess there are some good website/docu frameworks, similar to what jest/reactjs/babel is using.

If you want to help feel free to comment. I'm nearly done with the first two tasks, which is the biggest chunk of work here so far.

If there are other ideas for major changes feel free to suggest. Now is the right time.

@axe312ger
Copy link

Thats great!

@IanVS
Copy link

IanVS commented Dec 29, 2021

Hi, it seems that maybe progress against 6.0 might have stalled out? Is there maybe a reduced set of features/changes which could constitute a 6.0 release, so that it can leave the alpha stage and start being used by some projects?

@danez
Copy link
Collaborator Author

danez commented Dec 30, 2021

Hi, it seems that maybe progress against 6.0 might have stalled out? Is there maybe a reduced set of features/changes which could constitute a 6.0 release, so that it can leave the alpha stage and start being used by some projects?

Yes the migration to pure babel is harder than expected, most stuff is done, but a lot of features need to be rebuild because babel works differently than ast-types. I will see what I can do.

@jquense
Copy link
Collaborator

jquense commented Dec 30, 2021

@danez if you wanted to make a set of issues or list of things to still be done on those conversions I may have time to jump in and work on some as well

@danez
Copy link
Collaborator Author

danez commented Mar 19, 2022

A quick update: I tried splitting up the first task but it somehow is all pretty intertwined.

  • Switching to babel from ast-types but not yet changing to a non-estree-AST does not work because babel can only handle non-estree-ASTs.
  • Switching to a non-estree-AST but not yet to babel does not work, because ast-types stops working and is not able to build a proper scope tree.

What I figured now is that I can slowly rebuild some features before continuing the migrating to babel. This way most blockers can probably be removed before I can continue the migration. #569 and #570 are the first two PRs that remove builders from ast-types for example.

@danez
Copy link
Collaborator Author

danez commented Dec 17, 2022

Version 6.0.0-alpha.4 is out! This was quite a journey. There will be probably one more alpha, before moving into a more non-breaking territory.
Meanwhile the new website is also coming alive here https://react-docgen.dev But almost all important content is still missing. :)

@IanVS
Copy link

IanVS commented Dec 17, 2022

We're having a hard time updating this package in Storybook now that it is ESM only. :( We've had to pin to alpha.3 for now.

@danez danez unpinned this issue Apr 28, 2023
@danez danez closed this as completed Jun 16, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants