Skip to content

Commit

Permalink
Merge 4d5419e into 407f3d6
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] committed Apr 11, 2022
2 parents 407f3d6 + 4d5419e commit f24afcd
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 89 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
158 changes: 100 additions & 58 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@babel/preset-env": "^7.16.11",
"@babel/preset-react": "^7.16.7",
"@react-spring/web": "^9.4.4",
"@rollup/plugin-alias": "^3.1.9",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^21.0.3",
"@rollup/plugin-node-resolve": "^13.1.3",
Expand Down Expand Up @@ -74,7 +75,7 @@
"mocha": "^9.2.2",
"prop-types": "^15.8.1",
"puppeteer": "^13.5.2",
"react": "^17.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rollup": "^2.70.1",
"rollup-plugin-terser": "^7.0.2",
Expand Down

0 comments on commit f24afcd

Please sign in to comment.