Skip to content

Commit

Permalink
Merge 60e7b47 into 3fd421e
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] committed Apr 11, 2022
2 parents 3fd421e + 60e7b47 commit 421b9e3
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 70 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
"env": {
"browser": true
},
"parserOptions": {
"ecmaVersion": 2022
},
"globals": {
"globalThis": false
},
"rules": {
"max-len": ["error", { "code": 100, "ignoreComments": true }],
"react/function-component-definition": [2, {"namedComponents":"arrow-function"}],
"import/no-extraneous-dependencies": ["error", {
"devDependencies": [
"test/**",
"karma.conf.js",
"karma.conf.cjs",
"rollup.config.js",
"examples/rollup.config.js"
]
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
6 changes: 5 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 @@ -66,11 +67,14 @@ module.exports = (config) => {
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'],
}),
require('@rollup/plugin-commonjs')({ include: 'node_modules/**' }),
],
].filter(Boolean),
output: {
format: 'iife',
sourcemap: 'inline',
Expand Down
126 changes: 81 additions & 45 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@babel/core": "^7.17.9",
"@babel/preset-env": "^7.16.11",
"@babel/preset-react": "^7.16.7",
"@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 All @@ -75,8 +76,8 @@
"karma-spec-reporter": "0.0.33",
"mocha": "^9.2.2",
"puppeteer": "^13.5.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"rollup": "^2.70.1",
"rollup-plugin-terser": "^7.0.2",
"sinon": "^13.0.1",
Expand Down
Loading

0 comments on commit 421b9e3

Please sign in to comment.