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

Support react 18 #167

Merged
merged 5 commits into from Apr 1, 2022
Merged

Support react 18 #167

merged 5 commits into from Apr 1, 2022

Conversation

Arcath
Copy link
Collaborator

@Arcath Arcath commented Mar 31, 2022

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.

  • Documentation N/A
  • Tests
  • Ready to be merged

@codecov
Copy link

codecov bot commented Apr 1, 2022

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
Copy link
Collaborator Author

Arcath commented Apr 1, 2022

This overlaps with #162 and should close #164

@Arcath Arcath requested a review from kentcdodds April 1, 2022 15:41
@Arcath
Copy link
Collaborator Author

Arcath commented Apr 1, 2022

Here's a question.

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

@@ -16,7 +16,7 @@ jobs:
if: ${{ !contains(github.head_ref, 'all-contributors') }}
strategy:
matrix:
node: [12, 14]
node: [12, 14, 16]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tests now pass on Node 16 🎉

@@ -195,7 +195,7 @@ import Demo from './demo.blah'

assert.match(
error.message,
`error: [plugin: inMemory] Invalid loader: "blah" (valid: js, jsx, ts, tsx, css, json, text, base64, dataurl, file, binary)`,
`ERROR: [plugin: inMemory] Invalid loader value: "blah"`,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I figuered since esbuild might add other loaders by default so we don't want this test to fail when that happens.

@Arcath Arcath mentioned this pull request Apr 1, 2022
3 tasks
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.

Looks great to me! 👏👏

@kentcdodds kentcdodds merged commit 61c1a34 into main Apr 1, 2022
@kentcdodds kentcdodds deleted the pr/react-18 branch April 1, 2022 17:23
@kentcdodds
Copy link
Owner

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
Copy link
Owner

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

@github-actions
Copy link

github-actions bot commented Apr 1, 2022

🎉 This PR is included in version 8.1.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.

None yet

2 participants