mdx-embed icon indicating copy to clipboard operation
mdx-embed copied to clipboard

@mdx-js/mdx v3 support, possible refactoring of the repository

Open kaechele opened this issue 7 months ago • 1 comments

The entire unified stack and community around it has received major updates to all ecosystem components. I was looking into maybe using mdx-embed for a project but that project requires mdx v3.

I am offering my help in updating the stack and I think it may be a good time to revisit some fundamental things before proceeding (details below).

Given the low levels of activity on the repository I thought I'd be respectful of everyone's time and reach out first to gauge whether there are currently enough cycles from the maintainers to review and merge changes or if there is already work ongoing in this regard.

Issues

mdx-embed is referenced in the official mdx documentation, but it currently doesn't function with either mdx v2 or v3. I did see the initial work on v2 support in the feat/mdx-2 branch.

mdx-embed is in need of a good cleanup. Some of the issues I found:

  1. Most of the tooling (cypress, lerna, yarn), scaffolding (storybook) and examples (gatsby, nextjs, storybook) are using outdated versions that create conflicts when attempting to use them with an updated mdx-embed. The nextjs stuff is pretty trivial, the gatsby stuff didn't work for me and storybook offers a guided migration which I haven't fully tested yet.
  2. Yarn v1 workspaces get in the way when trying to independently work with different aspects of the monorepo, updating them one at a time (e.g. hoisting @types dependencies, such as @types/react or @types/react-dom, which will lead TypeScript to complain about redefined types when building type definitions or building the module). By disabling hoisting for a good portion of dependencies this can be avoided. My experiments with pnpm showed that this would not be necessary there.
  3. Some babel plugins have been renamed after having graduated from proposal status.
  4. eslint configuration needs to be updated.

And those would be the immediate things I stumbled upon in my first pass. Other than that I'm guessing there would have to be a review of the tests to verify that all of the individual components actually still work.

kaechele avatar Nov 10 '23 16:11 kaechele