Skip to content

Commit

Permalink
Bump react and react-dom (#274)
Browse files Browse the repository at this point in the history
* Bump react and react-dom

Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) and [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom). These dependencies needed to be updated together.

Updates `react` from 17.0.2 to 18.0.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.0.0/packages/react)

Updates `react-dom` from 17.0.2 to 18.0.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.0.0/packages/react-dom)

---
updated-dependencies:
- dependency-name: react
  dependency-type: direct:development
  update-type: version-update:semver-major
- dependency-name: react-dom
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add react 18 to test matrix

* Update the tests to use react 18

* Test react 18

* Fix

* Ooops

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julian Grinblat <julian@dotcore.co.il>
  • Loading branch information
dependabot[bot] and perrin4869 committed Apr 11, 2022
1 parent 407f3d6 commit ad06f16
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 122 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"browser": true
},
"parserOptions": {
"ecmaVersion": 2020
"ecmaVersion": 2022
},
"globals": {
"globalThis": false
},
"rules": {
"no-multi-assign": 0,
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
react-version:
- ^16.8.0
- ^17.0.0
- ^18.0.0

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion karma.conf.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

process.env.NODE_ENV = 'test';
if (!process.env.CHROME_BIN) process.env.CHROME_BIN = require('puppeteer').executablePath();
const IS_REACT_18 = parseInt(require('react').version.split('.')[0], 10) >= 18;

module.exports = (config) => {
const configuration = {
Expand Down Expand Up @@ -61,12 +62,13 @@ module.exports = (config) => {
plugins: [
require('@rollup/plugin-replace')({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) }), // this is for react
require('@rollup/plugin-babel').default({ exclude: 'node_modules/**', babelHelpers: 'bundled' }),
!IS_REACT_18 && require('@rollup/plugin-alias')({ entries: { 'react-dom/client': './test/react-dom-client-polyfill.js' } }),
require('@rollup/plugin-node-resolve').default({
mainFields: ['module', 'browser', 'main'],
extensions: ['.js', '.jsx'],
}),
require('@rollup/plugin-commonjs')({ include: 'node_modules/**' }),
],
].filter(Boolean),
output: {
format: 'iife',
sourcemap: 'inline',
Expand Down
216 changes: 126 additions & 90 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ad06f16

Please sign in to comment.