Skip to content

Commit

Permalink
Add React 19.x to supported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Dec 9, 2024
1 parent 46ca09d commit d42ec4e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
react-version: [17.x, 18.x]
react-version: [17.x, 18.x, 19.x]
include:
- node-version: 12.x
react-version: 16.0.0
Expand All @@ -53,10 +53,11 @@ jobs:
- name: Install dependencies
run: npm install
- name: Install React ${{matrix.react-version}}
if: matrix.react-version != '18.x'
if: matrix.react-version != '19.x'
run: |
npm install --save-dev \
react@${{matrix.react-version}} \
react-dom@${{matrix.react-version}}
react-dom@${{matrix.react-version}}\
@types/react@${{matrix.react-version}}
- name: Run tests
run: npm run tests-only
6 changes: 3 additions & 3 deletions example/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env browser */
import React from 'react';
import ReactDOM from 'react-dom';
import ReactDOM from 'react-dom/client';
import YouTube from '@u-wave/react-youtube'; // eslint-disable-line import/no-unresolved

const {
Expand Down Expand Up @@ -128,5 +128,5 @@ function App() {
);
}

// eslint-disable-next-line react/no-deprecated
ReactDOM.render(<App />, document.getElementById('example'));
const root = ReactDOM.createRoot(document.getElementById('example'));
root.render(<App />);
4 changes: 2 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@u-wave/react-youtube": "file:..",
"esbuild": "^0.14.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"serve": "^13.0.0"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/u-wave/react-youtube/issues"
},
"dependencies": {
"@types/react": "^17.0.0",
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"@types/youtube": "0.0.50",
"load-script2": "^1.0.1",
"prop-types": "^15.7.2"
Expand All @@ -33,8 +33,8 @@
"mocha": "^10.0.0",
"prop-types-table": "^1.0.0",
"proxyquire": "^2.1.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"rollup": "^2.0.2",
"tsd": "^0.31.0"
},
Expand All @@ -51,7 +51,7 @@
"module": "dist/react-youtube.es.js",
"types": "index.d.ts",
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"
"react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit d42ec4e

Please sign in to comment.