diff --git a/CHANGELOG.md b/CHANGELOG.md index afdb35f..76b85c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ - Removed support for depecrated `extraAriaContext` (please use `ariaLabelBuilder` instead) +## >= 8.1.3 + +- Support React 18 (see: https://github.com/AdeleD/react-paginate/issues/423) + ## >= 8.1.2 - Excluded unnecessary files from package (see: https://github.com/AdeleD/react-paginate/pull/410) diff --git a/demo/js/demo.js b/demo/js/demo.js index cd28db2..3cd6513 100644 --- a/demo/js/demo.js +++ b/demo/js/demo.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; import PropTypes from 'prop-types'; import ReactPaginate from 'react-paginate'; import styled from 'styled-components'; @@ -172,7 +172,8 @@ export class App extends Component { } } -ReactDOM.render( - , - document.getElementById('react-paginate') +const container = document.getElementById('react-paginate'); +const root = createRoot(container); +root.render( + ); diff --git a/package-lock.json b/package-lock.json index 1dcc421..56d2552 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-paginate", - "version": "8.1.0", + "version": "8.1.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "react-paginate", - "version": "8.1.0", + "version": "8.1.3", "license": "MIT", "dependencies": { "prop-types": "^15.6.1" @@ -27,8 +27,8 @@ "jest-cli": "^27.3.1", "jquery": "^3.6.0", "prettier": "^2.4.1", - "react": "^17.0.2", - "react-dom": "^17.0.2", + "react": "^18", + "react-dom": "^18", "react-hot-loader": "^4.13.0", "serve-static": "^1.14.1", "styled-components": "^5.3.3", @@ -37,7 +37,7 @@ "webpack-dev-middleware": "^5.2.1" }, "peerDependencies": { - "react": "^16 || ^17" + "react": "^16 || ^17 || ^18" } }, "node_modules/@babel/code-frame": { @@ -3684,15 +3684,16 @@ } }, "node_modules/babel-plugin-styled-components": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.1.tgz", - "integrity": "sha512-U3wmORxerYBiqcRCo6thItIosEIga3F+ph0jJPkiOZJjyhpZyUZFQV9XvrZ2CbBIihJ3rDBC/itQ+Wx3VHMauw==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz", + "integrity": "sha512-i7YhvPgVqRKfoQ66toiZ06jPNA3p6ierpfUuEWxNF+fV27Uv5gxBkf8KZLHUCc1nFA9j6+80pYoIpqCeyW3/bA==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.16.0", "@babel/helper-module-imports": "^7.16.0", "babel-plugin-syntax-jsx": "^6.18.0", - "lodash": "^4.17.11" + "lodash": "^4.17.11", + "picomatch": "^2.3.0" }, "peerDependencies": { "styled-components": ">= 2" @@ -8954,30 +8955,28 @@ } }, "node_modules/react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.0.0.tgz", + "integrity": "sha512-x+VL6wbT4JRVPm7EGxXhZ8w8LTROaxPXOqhlGyVSrv0sB1jkyFGgXxJ8LVoPRLvPR6/CIZGFmfzqUa2NYeMr2A==", "dev": true, "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.0.0.tgz", + "integrity": "sha512-XqX7uzmFo0pUceWFCt7Gff6IyIMzFUn7QMZrbrQfGxtaxXZIcGQzoNpRLE3fQLnS4XzLLPMZX2T9TRcSrasicw==", "dev": true, "dependencies": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" + "scheduler": "^0.21.0" }, "peerDependencies": { - "react": "17.0.2" + "react": "^18.0.0" } }, "node_modules/react-hot-loader": { @@ -9256,13 +9255,12 @@ } }, "node_modules/scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.21.0.tgz", + "integrity": "sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==", "dev": true, "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "node_modules/schema-utils": { @@ -13316,15 +13314,16 @@ } }, "babel-plugin-styled-components": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.1.tgz", - "integrity": "sha512-U3wmORxerYBiqcRCo6thItIosEIga3F+ph0jJPkiOZJjyhpZyUZFQV9XvrZ2CbBIihJ3rDBC/itQ+Wx3VHMauw==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz", + "integrity": "sha512-i7YhvPgVqRKfoQ66toiZ06jPNA3p6ierpfUuEWxNF+fV27Uv5gxBkf8KZLHUCc1nFA9j6+80pYoIpqCeyW3/bA==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", "@babel/helper-module-imports": "^7.16.0", "babel-plugin-syntax-jsx": "^6.18.0", - "lodash": "^4.17.11" + "lodash": "^4.17.11", + "picomatch": "^2.3.0" } }, "babel-plugin-syntax-jsx": { @@ -17302,24 +17301,22 @@ } }, "react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.0.0.tgz", + "integrity": "sha512-x+VL6wbT4JRVPm7EGxXhZ8w8LTROaxPXOqhlGyVSrv0sB1jkyFGgXxJ8LVoPRLvPR6/CIZGFmfzqUa2NYeMr2A==", "dev": true, "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.0.0.tgz", + "integrity": "sha512-XqX7uzmFo0pUceWFCt7Gff6IyIMzFUn7QMZrbrQfGxtaxXZIcGQzoNpRLE3fQLnS4XzLLPMZX2T9TRcSrasicw==", "dev": true, "requires": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" + "scheduler": "^0.21.0" } }, "react-hot-loader": { @@ -17531,13 +17528,12 @@ } }, "scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.21.0.tgz", + "integrity": "sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==", "dev": true, "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "schema-utils": { diff --git a/package.json b/package.json index 9efcf83..5713532 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-paginate", - "version": "8.1.2", + "version": "8.1.3", "description": "A ReactJS component that creates a pagination.", "main": "./dist/react-paginate.js", "repository": { @@ -24,7 +24,7 @@ "prop-types": "^15.6.1" }, "peerDependencies": { - "react": "^16 || ^17" + "react": "^16 || ^17 || ^18" }, "devDependencies": { "@babel/core": "^7.15.8", @@ -42,8 +42,8 @@ "jest-cli": "^27.3.1", "jquery": "^3.6.0", "prettier": "^2.4.1", - "react": "^17.0.2", - "react-dom": "^17.0.2", + "react": "^18", + "react-dom": "^18", "react-hot-loader": "^4.13.0", "serve-static": "^1.14.1", "styled-components": "^5.3.3",