Skip to content

Commit 8bafe25

Browse files
authored
feat: support React 19
- Drops support for React 15 and 16 BREAKING CHANGE
1 parent 3b2e0ea commit 8bafe25

File tree

7 files changed

+2336
-4667
lines changed

7 files changed

+2336
-4667
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
react:
36-
- 16
3736
- 17
3837
- 18
38+
- 19
3939
- latest
40-
- rc
4140
steps:
4241
- run: corepack enable
4342
- uses: actions/checkout@v4
@@ -49,10 +48,9 @@ jobs:
4948
- name: Install dependencies
5049
run: pnpm install
5150
- name: Install legacy testing-library
52-
if: ${{ startsWith(matrix.react, '16') || startsWith(matrix.react, '17') }}
51+
if: ${{ startsWith(matrix.react, '17') }}
5352
run: pnpm add -D @testing-library/react@12.1.4
54-
- name: Install legacy React types
55-
if: ${{ startsWith(matrix.react, '16') || startsWith(matrix.react, '17') || startsWith(matrix.react, '18') }}
53+
- name: Install React types
5654
run: pnpm add -D @types/react@${{ matrix.react }} @types/react-dom@${{ matrix.react }}
5755
- name: Install ${{ matrix.react }}
5856
run: pnpm add -D react@${{ matrix.react }} react-dom@${{ matrix.react }}

package.json

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -107,45 +107,39 @@
107107
}
108108
],
109109
"peerDependencies": {
110-
"react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
111-
"react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
110+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
111+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
112112
},
113113
"devDependencies": {
114-
"@arethetypeswrong/cli": "^0.15.3",
114+
"@arethetypeswrong/cli": "^0.17.1",
115115
"@biomejs/biome": "^1.9.4",
116-
"@size-limit/preset-small-lib": "^11.1.4",
117-
"@testing-library/jest-dom": "^6.4.6",
118-
"@testing-library/react": "^16.0.0",
119-
"@types/react": "^18.3.3",
120-
"@types/react-dom": "^18.3.1",
121-
"@vitejs/plugin-react": "^4.3.1",
122-
"@vitest/browser": "^2.1.4",
123-
"@vitest/coverage-istanbul": "^2.1.4",
124-
"lint-staged": "^15.2.7",
116+
"@size-limit/preset-small-lib": "^11.1.6",
117+
"@testing-library/jest-dom": "^6.6.3",
118+
"@testing-library/react": "^16.1.0",
119+
"@types/react": "^19.0.1",
120+
"@types/react-dom": "^19.0.2",
121+
"@vitejs/plugin-react": "^4.3.4",
122+
"@vitest/browser": "^2.1.8",
123+
"@vitest/coverage-istanbul": "^2.1.8",
124+
"lint-staged": "^15.2.11",
125125
"microbundle": "^0.15.1",
126126
"npm-run-all": "^4.1.5",
127-
"playwright": "^1.45.1",
128-
"publint": "^0.2.8",
129-
"react": "^18.3.1",
130-
"react-dom": "^18.3.1",
127+
"playwright": "^1.49.1",
128+
"publint": "^0.2.12",
129+
"react": "^19.0.0",
130+
"react-dom": "^19.0.0",
131131
"simple-git-hooks": "^2.11.1",
132-
"size-limit": "^11.1.4",
133-
"tsup": "^8.1.0",
134-
"typescript": "^5.5.3",
135-
"vitest": "^2.1.4"
132+
"size-limit": "^11.1.6",
133+
"tsup": "^8.3.5",
134+
"typescript": "^5.7.2",
135+
"vitest": "^2.1.8"
136136
},
137137
"peerDependenciesMeta": {
138138
"react-dom": {
139139
"optional": true
140140
}
141141
},
142142
"pnpm": {
143-
"peerDependencyRules": {
144-
"allowedVersions": {
145-
"react": "18",
146-
"vite": "5"
147-
}
148-
},
149143
"allowedDeprecatedVersions": {
150144
"rollup-plugin-terser": "*",
151145
"sourcemap-codec": "*",

0 commit comments

Comments
 (0)