diff --git a/bun.lockb b/bun.lockb index f67915b..a2ddc9a 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 478e2fa..71ee12a 100644 --- a/package.json +++ b/package.json @@ -16,63 +16,58 @@ "repository": "TroyAlford/react-jsx-parser", "version": "1.29.0", "dependencies": { - "@types/jsdom": "^16.2.6", - "acorn": "^8.0.5", - "acorn-jsx": "^5.3.1", - "browserslist": "^4.14.5", - "core-js": "^3.8.3" + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "browserslist": "^4.23.1", + "core-js": "^3.37.1" }, "devDependencies": { - "@babel/core": "^7.12.13", - "@babel/plugin-proposal-class-properties": "^7.12.13", - "@babel/plugin-transform-typescript": "^7.12.13", - "@babel/preset-env": "^7.12.13", - "@babel/preset-react": "^7.12.13", - "@babel/preset-typescript": "^7.12.13", - "@babel/runtime-corejs3": "^7.12.13", + "@babel/core": "^7.24.7", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-transform-typescript": "^7.24.7", + "@babel/preset-env": "^7.24.7", + "@babel/preset-react": "^7.24.7", + "@babel/preset-typescript": "^7.24.7", + "@babel/runtime-corejs3": "^7.24.7", + "@cfaester/enzyme-adapter-react-18": "^0", "@happy-dom/global-registrator": "^14.12.3", - "@types/acorn": "^4.0.5", - "@types/enzyme": "^3.10.8", - "@types/jest": "^26.0.20", - "@typescript-eslint/eslint-plugin": "^4.14.2", - "@typescript-eslint/parser": "^4.14.2", + "@types/acorn": "^4.0.6", + "@types/enzyme": "^3.10.18", + "@typescript-eslint/eslint-plugin": "^4.33.0", + "@typescript-eslint/parser": "^4.33.0", "babel-core": "^7.0.0-bridge.0", - "babel-jest": "^26.6.3", - "babel-loader": "^8.2.2", + "babel-loader": "^8.3.0", "concurrently": "^5.3.0", "cross-env": "^7.0.3", "enzyme": "^3.11.0", - "enzyme-adapter-react-16": "^1.15.6", - "eslint": "^7.19.0", + "eslint": "^7.32.0", "eslint-config-airbnb": "^18.2.1", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-react": "^7.22.0", - "eslint-plugin-react-hooks": "^4.2.0", - "jest": "^26.6.3", - "jest-cli": "^26.6.3", + "eslint-plugin-import": "^2.29.1", + "eslint-plugin-jsx-a11y": "^6.9.0", + "eslint-plugin-react": "^7.34.3", + "eslint-plugin-react-hooks": "^4.6.2", "mkdirp": "^1.0.4", "postinstall-postinstall": "^2.1.0", - "react": "^16", - "react-dom": "^16", - "source-map-explorer": "^2.5.2", - "terser-webpack-plugin": "^5.1.1", - "typescript": "^4.1.3", - "webpack": "^5.21.2", - "webpack-cli": "^4.5.0", - "webpack-dev-server": "^3.11.2" + "react": "^18", + "react-dom": "^18", + "source-map-explorer": "^2.5.3", + "terser-webpack-plugin": "^5.3.10", + "typescript": "^4.9.5", + "webpack": "^5.92.1", + "webpack-cli": "^4.10.0", + "webpack-dev-server": "^3.11.3" }, "optionalDependencies": { - "@types/react": "^17.0.1", - "@types/react-dom": "^17.0.0" + "@types/react": "^18", + "@types/react-dom": "^18" }, "peerDependencies": { - "react": ">=17", - "react-dom": ">=17" + "react": ">=18", + "react-dom": ">=18" }, "resolutions": { - "@types/react": "^17.0.1", - "@types/react-dom": "^17.0.0", + "@types/react": "^18", + "@types/react-dom": "^18", "browserslist": "^4.14.5", "extend": "^3.0.2", "merge": "^1.2.1" @@ -84,7 +79,7 @@ "postinstall": "npx patch-package", "prebuild": "mkdirp ./dist && rm -rf ./dist/*", "sourcemap": "yarn build && source-map-explorer ./dist/es5/react-jsx-parser.min.js", - "test": "yarn lint && jest", + "test": "lint && test", "types": "tsc -p ./tsconfig.json -d --emitDeclarationOnly" }, "contributors": [ diff --git a/source/demo.tsx b/source/demo.tsx index fded1fe..c0462de 100644 --- a/source/demo.tsx +++ b/source/demo.tsx @@ -1,18 +1,19 @@ /* eslint-disable no-console */ import React from 'react' -import ReactDOM from 'react-dom' +import { createRoot } from 'react-dom/client' // @ts-expect-error - untyped output file import JsxParser from '../dist/umd/react-jsx-parser.min' -ReactDOM.render( +const root = createRoot(document.querySelector('#root')!) + +root.render( +
bar
`} onError={console.error} showWarnings />, - document.querySelector('#root'), ) diff --git a/source/index.html b/source/index.html index 4eee9b1..277278c 100644 --- a/source/index.html +++ b/source/index.html @@ -4,8 +4,8 @@ react-jsx-parser demo - - + + diff --git a/test/enzyme.ts b/test/enzyme.ts index 25af39e..68e1083 100644 --- a/test/enzyme.ts +++ b/test/enzyme.ts @@ -1,6 +1,6 @@ /* eslint-disable import/no-extraneous-dependencies */ import Enzyme from 'enzyme' -import Adapter from 'enzyme-adapter-react-16' +import Adapter from '@cfaester/enzyme-adapter-react-18' /* eslint-enable import/no-extraneous-dependencies */ Enzyme.configure({ adapter: new Adapter() })