Skip to content

Commit 61c1a34

Browse files
authored
feat: support react 18 (#167)
1 parent a25d7f1 commit 61c1a34

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

.github/workflows/validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
if: ${{ !contains(github.head_ref, 'all-contributors') }}
1717
strategy:
1818
matrix:
19-
node: [12, 14]
19+
node: [12, 14, 16]
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: 🛑 Cancel Previous Runs

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,22 @@
5353
"esbuild": "0.11.x || 0.12.x || 0.13.x || 0.14.x"
5454
},
5555
"devDependencies": {
56-
"@testing-library/react": "^12.1.2",
57-
"@types/jsdom": "^16.2.13",
56+
"@testing-library/react": "^13.0.0",
57+
"@types/jsdom": "^16.2.14",
5858
"@types/mdx": "^2.0.1",
5959
"@types/react": "^17.0.34",
6060
"@types/react-dom": "^17.0.11",
61-
"@types/uuid": "^8.3.1",
61+
"@types/uuid": "^8.3.4",
62+
"babel-eslint": "^10.1.0",
6263
"c8": "^7.10.0",
6364
"cross-env": "^7.0.3",
64-
"esbuild": "^0.13.13",
65-
"jsdom": "^18.1.0",
65+
"esbuild": "^0.14.29",
66+
"jsdom": "^19.0.0",
6667
"kcd-scripts": "^11.2.2",
6768
"left-pad": "^1.3.0",
6869
"mdx-test-data": "^1.0.1",
69-
"react": "^17.0.2",
70-
"react-dom": "^17.0.2",
70+
"react": "^18.0.0",
71+
"react-dom": "^18.0.0",
7172
"remark-mdx-images": "^1.0.3",
7273
"typescript": "^4.4.3",
7374
"uvu": "^0.5.2"

src/__tests__/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ import Demo from './demo'
151151
}).catch(e => e)
152152
)
153153

154-
assert.match(error.message, `error: Could not resolve "./demo"`)
154+
assert.match(error.message, `ERROR: Could not resolve "./demo"`)
155155
})
156156

157157
test('gives a handy error when importing a module that cannot be found', async () => {
@@ -173,7 +173,7 @@ import Demo from './demo'
173173
assert.equal(
174174
error.message,
175175
`Build failed with 1 error:
176-
demo.tsx:1:7: error: Could not resolve "./blah-blah"`,
176+
demo.tsx:1:7: ERROR: Could not resolve "./blah-blah"`,
177177
)
178178
})
179179

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

196196
assert.match(
197197
error.message,
198-
`error: [plugin: inMemory] Invalid loader: "blah" (valid: js, jsx, ts, tsx, css, json, text, base64, dataurl, file, binary)`,
198+
`ERROR: [plugin: inMemory] Invalid loader value: "blah"`,
199199
)
200200
})
201201

src/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import * as _jsx_runtime from 'react/jsx-runtime.js'
2+
import * as _jsx_runtime from 'react/jsx-runtime'
33
import * as ReactDOM from 'react-dom'
44

55
/**

0 commit comments

Comments
 (0)