Skip to content

Commit 8dd83cb

Browse files
committed
Drop support for React < 18.0.0-rc.1
1 parent f441fd6 commit 8dd83cb

File tree

9 files changed

+70
-453
lines changed

9 files changed

+70
-453
lines changed

.github/workflows/validate.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ on:
1212
pull_request: {}
1313
jobs:
1414
main:
15-
continue-on-error: ${{ matrix.react != 'latest' }}
15+
continue-on-error: ${{ matrix.react != 'current' }}
1616
# ignore all-contributors PRs
1717
if: ${{ !contains(github.head_ref, 'all-contributors') }}
1818
strategy:
1919
fail-fast: false
2020
matrix:
2121
# TODO: relax `'16.9.1'` to `16` once GitHub has 16.9.1 cached. 16.9.0 is broken due to https://github.com/nodejs/node/issues/40030
2222
node: [12, 14, '16.9.1']
23-
react: [latest, next, experimental]
23+
react: [current, next, experimental]
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: 🛑 Cancel Previous Runs
@@ -47,6 +47,7 @@ jobs:
4747
# https://reactjs.org/blog/2019/10/22/react-release-channels.html#using-the-next-channel-for-integration-testing
4848
- name: ⚛️ Setup react
4949
run: npm install react@${{ matrix.react }} react-dom@${{ matrix.react }}
50+
if: ${{ matrix.react != 'current' }}
5051

5152
- name: ▶️ Run validate script
5253
run: npm run validate

jest.config.js

-15
This file was deleted.

package.json

+4-12
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@
5353
"dotenv-cli": "^4.0.0",
5454
"kcd-scripts": "^11.1.0",
5555
"npm-run-all": "^4.1.5",
56-
"react": "^17.0.1",
57-
"react-dom": "^17.0.1",
56+
"react": "18.0.0-rc.1",
57+
"react-dom": "18.0.0-rc.1",
5858
"rimraf": "^3.0.2",
5959
"typescript": "^4.1.2"
6060
},
6161
"peerDependencies": {
62-
"react": "*",
63-
"react-dom": "*"
62+
"react": "18.0.0-rc.1",
63+
"react-dom": "18.0.0-rc.1"
6464
},
6565
"eslintConfig": {
6666
"extends": "./node_modules/kcd-scripts/eslint.js",
@@ -69,14 +69,6 @@
6969
"react/no-adjacent-inline-elements": "off",
7070
"import/no-unassigned-import": "off",
7171
"import/named": "off",
72-
"import/no-unresolved": [
73-
"error",
74-
{
75-
"ignore": [
76-
"react-dom/client"
77-
]
78-
}
79-
],
8072
"testing-library/no-container": "off",
8173
"testing-library/no-dom-import": "off",
8274
"testing-library/no-unnecessary-act": "off",

src/__tests__/new-act.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jest.mock('react-dom/test-utils', () => ({
88

99
beforeEach(() => {
1010
jest.resetModules()
11-
asyncAct = require('../act-compat').asyncAct
11+
asyncAct = require('../act-compat').default
1212
jest.spyOn(console, 'error').mockImplementation(() => {})
1313
})
1414

src/__tests__/no-act.js

-100
This file was deleted.

src/__tests__/old-act.js

-142
This file was deleted.

0 commit comments

Comments
 (0)