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

Replace xdm with MDX v2 #152

Merged
merged 2 commits into from
Apr 1, 2022
Merged

Replace xdm with MDX v2 #152

merged 2 commits into from
Apr 1, 2022

Conversation

silvenon
Copy link
Contributor

@silvenon silvenon commented Feb 5, 2022

What: xdm is being replaced with MDX v2. The breaking change is that xdmOptions has been renamed to mdxOptions.

Why: xdm was created before MDX v2 as a project that contains everything that Titus, the core maintainer of MDX, wanted to have in MDX. With the release of MDX v2 the projects are now "99.99% the same", and Titus will retire xdm.

How: it was enough to replace xdm with @mdx-js/esbuild, it even exports the ProcessorOptions needed in types.d.ts, so there was no need to install @mdx-js/mdx as well. The documentation was updated in the way that made sense to me. The only uncomfortable change is renaming xdmOptions to mdxOptions, but I believe it's necessary.

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

Resolves #137, #159.

BREAKING CHANGE: as part of replacing xdm with MDX v2 `xdmOptions` has
been renamed to `mdxOptions`.
@marcofranssen
Copy link

Resolves #159

When can we expect a release of this Fix/Version bump?

@silvenon
Copy link
Contributor Author

(…) but I would be willing to look at a PR for it

#137 (comment)

I think Kent instantly regretted saying this 🤣 😜

@Arcath
Copy link
Collaborator

Arcath commented Apr 1, 2022

Running this branch locally and the tests are hanging on coverage, do you get the same thing?

I'm happy to rename xdmOptions to mdxOptions as we are changing package. It will prompt users to come to the releases page and see that the underlying parser/render has changed.

@Arcath
Copy link
Collaborator

Arcath commented Apr 1, 2022

I'd also suggest that we implement the relatively minor #167 in this PR as well so its a single breaking change release.

@silvenon I have an uncomitted version of this PR with those changes made if that works for you? Same question to @kentcdodds

@silvenon
Copy link
Contributor Author

silvenon commented Apr 1, 2022

Running this branch locally and the tests are hanging on coverage, do you get the same thing?

I did not run the tests, I wanted to defer to the CI 😅 It's indeed hanging on the coverage part for me too, but I'm experiencing the same problem on main 🤔

I have an uncomitted version of this PR with those changes made if that works for you?

Absolutely!

@codecov
Copy link

codecov bot commented Apr 1, 2022

Codecov Report

Merging #152 (94844e3) into main (61c1a34) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #152   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          280       280           
  Branches         1         1           
=========================================
  Hits           280       280           
Impacted Files Coverage Δ
src/index.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61c1a34...94844e3. Read the comment docs.

@kentcdodds
Copy link
Owner

Looks like we're good to roll here! Will merge this as a breaking change. Thanks so much!

Copy link
Owner

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👏👏

@kentcdodds kentcdodds merged commit 8a4e6a6 into kentcdodds:main Apr 1, 2022
@silvenon
Copy link
Contributor Author

silvenon commented Apr 1, 2022

Awesome! Many thanks for reviewing this ❤️

@silvenon silvenon deleted the mdx-v2 branch April 1, 2022 17:30
@github-actions
Copy link

github-actions bot commented Apr 1, 2022

🎉 This PR is included in version 9.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to MDX v2
4 participants