Skip to content

Commit

Permalink
feat: support react 18 (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcath committed Apr 1, 2022
1 parent a25d7f1 commit 61c1a34
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: ${{ !contains(github.head_ref, 'all-contributors') }}
strategy:
matrix:
node: [12, 14]
node: [12, 14, 16]
runs-on: ubuntu-latest
steps:
- name: 馃洃 Cancel Previous Runs
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,22 @@
"esbuild": "0.11.x || 0.12.x || 0.13.x || 0.14.x"
},
"devDependencies": {
"@testing-library/react": "^12.1.2",
"@types/jsdom": "^16.2.13",
"@testing-library/react": "^13.0.0",
"@types/jsdom": "^16.2.14",
"@types/mdx": "^2.0.1",
"@types/react": "^17.0.34",
"@types/react-dom": "^17.0.11",
"@types/uuid": "^8.3.1",
"@types/uuid": "^8.3.4",
"babel-eslint": "^10.1.0",
"c8": "^7.10.0",
"cross-env": "^7.0.3",
"esbuild": "^0.13.13",
"jsdom": "^18.1.0",
"esbuild": "^0.14.29",
"jsdom": "^19.0.0",
"kcd-scripts": "^11.2.2",
"left-pad": "^1.3.0",
"mdx-test-data": "^1.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"remark-mdx-images": "^1.0.3",
"typescript": "^4.4.3",
"uvu": "^0.5.2"
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ import Demo from './demo'
}).catch(e => e)
)

assert.match(error.message, `error: Could not resolve "./demo"`)
assert.match(error.message, `ERROR: Could not resolve "./demo"`)
})

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

Expand All @@ -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"`,
)
})

Expand Down
2 changes: 1 addition & 1 deletion src/client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import * as _jsx_runtime from 'react/jsx-runtime.js'
import * as _jsx_runtime from 'react/jsx-runtime'
import * as ReactDOM from 'react-dom'

/**
Expand Down

0 comments on commit 61c1a34

Please sign in to comment.