Skip to content

Commit b658291

Browse files
committed
Update CI workflow to install specific versions of React type definitions using semantic versioning, ensuring compatibility with legacy peer dependencies across different React versions.
1 parent dac0b0a commit b658291

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jobs:
3232
- name: Install specific React version
3333
run: |
3434
if [ "${{ matrix.react-version }}" = "16.8.0" ]; then
35-
npm install [email protected] [email protected] @types/[email protected].56 @types/[email protected].9 --legacy-peer-deps
35+
npm install [email protected] [email protected] @types/react@~16.9.0 @types/react-dom@~16.9.0 --legacy-peer-deps
3636
elif [ "${{ matrix.react-version }}" = "17.0.2" ]; then
37-
npm install [email protected] [email protected] @types/[email protected].2 @types/[email protected].2 --legacy-peer-deps
37+
npm install [email protected] [email protected] @types/react@~17.0.0 @types/react-dom@~17.0.0 --legacy-peer-deps
3838
elif [ "${{ matrix.react-version }}" = "18.2.0" ]; then
39-
npm install [email protected] [email protected] @types/react@18.2.0 @types/react-dom@18.2.0 --legacy-peer-deps
39+
npm install [email protected] [email protected] @types/react@~18.0.0 @types/react-dom@~18.0.0 --legacy-peer-deps
4040
fi
4141
if: matrix.react-version != '19.1.0'
4242

0 commit comments

Comments
 (0)