Agrippa 1.3 is out 🎉🎉🎉

nitzanhen

Nitzan Hen

Posted on December 4, 2021

Agrippa 1.3 is out 🎉🎉🎉

The third minor version of Agrippa, the React component CLI, is finally out!

Since v1.2.0 came out, Agrippa has seen tremendous growth - counting the difference in stars on the GitHub repo, for example, we've grown by 120% (154 stars) over the course of just over 40 days!
More issues are also being opened (and closed!) on GitHub, too.

This is a good opportunity to say that I'm truly grateful for everyone who have tried Agrippa out and joined the community; I'm delighted to see Agrippa growing and being used, and I'm super excited for it to grow and improve further in the future.

So, thanks everyone!
If you're not using Agrippa, join us! Get started here.

As for the new version, this one was in the works for longer than the previous two; integration tests, in particular, were a challenge to implement.
Version 1.3.0 brings the following changes:

  • The separate-index scheme: Agrippa's default component directories structure now separates the main component file, which contains the component's declaration and logic, from the index file, which is the component directory's entry point. Previously, Agrippa placed the component logic under the index file, which resulted in less files overall - but made it harder to distinguish between components in IDEs, which hurt the developer experience. Generated components should be easier to work with now! Many thanks to @wickedpuppy for suggesting this feature.
    For more info, check out separate-index on Agrippa's docs.

  • Support for React Native: Agrippa now supports React Native projects!
    Furthermore, it can auto-detect a react native project by having the react-native dependency in its package.json,so you don't really need to configure anything in a typical project! Of course, styling with React Native's StyleSheets is also supported (and, for React Native projects, also enforced).
    For more info, check out reactNative on Agrippa's docs.

  • Agrippa is now covered by integration tests, as well as more unit tests.
    Integration tests were a challenge - since Agrippa is all about reading and writing files automatically, testing it effectively requires setting up and running in a completely isolated environment! We ended up combining Docker, Jest and some custom code to create a pretty sophisticated solution, and it works quite well.
    More tests are on the way, but the tool already has pretty good coverage.

  • Tweaks & Bug fixes:

    • props=ts can no longer be used without the typescript flag; additionally, the typescript flag now implies that props=ts (of course, this is overridden by any value set by the user).
    • The allowOutsideBase check is now skipped if baseDir is not specified.
    • Fixed a bug where --children would generate <div>children</div> instead of <div>{children}</div> in the JSX template.

Your thoughts and feedback, as always, are most welcome.
If you've found a bug with this release, or want to suggest a new feature, please submit an issue.

Have a great week!

💖 💪 🙅 🚩
nitzanhen
Nitzan Hen

Posted on December 4, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related