2021 updates!
Published on October 28, 2021 by Titus Wormer

Hi friends. Sorry it’s been so long. A lot has happened in unified. I thought I’d summarize some of that here:

ESM

All of unified and the underlying projects are now ESM. ECMAScript modules, essentially `import` and `export`, are a JavaScript feature from ±2016. It’s been a long time coming in the JavaScript world, but it also doesn’t work perfectly everywhere (such as Electron and Jest). Regardless, unified is ready for the future.  (Please read this for info on migrating)

TypeScript

Alongside the push for ESM, all our project are were typed with TypeScript. We’ve added TypeScript through JSDoc. That means that our code is still plain JavaScript, but that types are added through comments. We hope is this results in a balance between folks who aren’t fans of or experts in TypeScript to still contribute to and use unified, while also providing types for the folks that do.

MDX 2

A new RC (release candidate) for MDX version 2 is out, alongside a whole new website. See https://v2.mdxjs.com/blog/v2/ for more information. Note that RCs *could* become the actual release of v2, but that it’s also possible that breaking changes still occur. Please try it out!

Docs

Right now we’re working on improving the docs. unified is quite hard to get into. In some part due to the topics being quite hard to get into (ASTs, parsing, compiling), in some part due to it being so big (hundreds of projects), and in some part that the docs can be better.
It’s probably never going to get easy to write a plugin to transform an AST, but we want to make it better to get started with such things.
We’re starting with remark, adding new sections to each project such as this: https://github.com/remarkjs/remark-github/pull/33.
If you’re wiling and able to help, please ping me (@wooorm everywhere) and I’ll ping you for a review on such PRs!

Sponsors

Of course, as always, maintaining unified takes a *ton* of time. If you can help financially, that would be appreciated. Please sponsor us on OpenCollective (or GitHub Sponsors). Thanks!

Titus