kentcdodds / mdx-bundler

🦤 Give me MDX/TSX strings and I'll give you back a component you can render. Supports imports!
MIT License
1.78k stars 75 forks source link

Support react 18 #167

Closed Arcath closed 2 years ago

Arcath commented 2 years ago

After updating to React 18 the path to the jsx-runtime has changed which means we needto update the import in mdx-bundler.

Its as simple as dropping the .js from the import.

I've also updated the tests to be compatible with the new errors from esbuild.

This might technically be a breaking change as it will probabbly break react 17.

codecov[bot] commented 2 years ago

Codecov Report

Merging #167 (5d7be3f) into main (a25d7f1) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #167   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          280       280           
  Branches         1         1           
=========================================
  Hits           280       280           
Impacted Files Coverage Δ
src/client.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 a25d7f1...5d7be3f. Read the comment docs.

Arcath commented 2 years ago

This overlaps with #162 and should close #164

Arcath commented 2 years ago

Here's a question.

With GH actions can we setup a matrix to run against multiple React versions?

kentcdodds commented 2 years ago

With GH actions can we setup a matrix to run against multiple React versions?

Yes, it's possible. No, it's not worth it 😅

kentcdodds commented 2 years ago

Oh, and I would be quite surprised if this broke React 17 🤔

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 8.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: