Skip to content

Commit 6f23340

Browse files
committed
ci: update babel crap and switch to c8
1 parent 35371f4 commit 6f23340

File tree

3 files changed

+2582
-1757
lines changed

3 files changed

+2582
-1757
lines changed

.babelrc

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
{
2-
"presets": [["es2015", { "modules": false }], "stage-0", "react"],
3-
"plugins": ["transform-class-properties"],
2+
"presets": ["@babel/preset-env", "@babel/preset-react"],
3+
"plugins": [["@babel/plugin-proposal-class-properties"]],
44
"env": {
55
"test": {
6-
"presets": ["es2015", "stage-0", "react"],
7-
"plugins": [
8-
"istanbul",
9-
[
10-
"transform-runtime",
11-
{
12-
"polyfill": false,
13-
"regenerator": true
14-
}
15-
]
16-
]
6+
"presets": ["@babel/preset-env", "@babel/preset-react"],
7+
"plugins": ["istanbul", ["@babel/plugin-transform-runtime"]]
178
}
189
}
1910
}

package.json

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
"build": "rimraf dist/**/* && cross-env NODE_ENV=production webpack --config webpack.config.js --bail --mode=production",
2828
"build:docs": "yarn build && cross-env NODE_ENV=production webpack --config docs/webpack.config.js --bail --mode=production",
2929
"commit": "git-cz",
30-
"coveralls": "nyc yarn test && nyc report --reporter=text-lcov | coveralls",
30+
"coveralls": "yarn test && c8 report --reporter=text-lcov | coveralls",
3131
"demo": "rimraf ./docs/bundle.js && webpack-serve --content ./docs --port 3000 --open --config docs/webpack.config.js",
3232
"prepublishOnly": "yarn build",
3333
"lint": "eslint --fix src docs webpack.config.js && stylelint --fix \"src/**/*.css\"",
3434
"lint:nofix": "eslint src webpack.config.js && stylelint \"src/**/*.css\"",
3535
"format": "prettier-eslint --write \"src/**/*.js\" \"docs/**/*.js\" webpack.config.js",
36-
"test": "cross-env NODE_ENV=test ava",
37-
"test:cov": "rimraf .nyc_output && nyc yarn test && nyc report --reporter=lcov ",
36+
"test": "cross-env NODE_ENV=test c8 ava",
37+
"test:cov": "yarn test && c8 --reporter=lcov report",
3838
"test:watch": "cross-env NODE_ENV=test ava --watch",
3939
"semantic-release": "semantic-release",
4040
"contributors": "all-contributors add && all-contributors generate"
@@ -47,23 +47,23 @@
4747
"react-infinite-scroll-component": "^4.0.2"
4848
},
4949
"devDependencies": {
50+
"@babel/core": "^7.17.10",
51+
"@babel/plugin-proposal-class-properties": "^7.16.7",
5052
"@babel/plugin-syntax-jsx": "7.0.0-beta.46",
51-
"@babel/preset-stage-3": "7.0.0-beta.46",
53+
"@babel/plugin-transform-runtime": "^7.17.10",
54+
"@babel/preset-env": "^7.17.10",
55+
"@babel/preset-react": "^7.16.7",
56+
"@babel/register": "^7.17.7",
5257
"@commitlint/cli": "^7.0.0",
5358
"@commitlint/config-conventional": "^7.0.0",
5459
"all-contributors-cli": "^5.4.1",
55-
"ava": "1.4.1",
60+
"ava": "3",
5661
"axe-core": "^3.2.2",
57-
"babel-core": "6.24.1",
5862
"babel-eslint": "10.0.1",
5963
"babel-loader": "7.1.2",
6064
"babel-plugin-istanbul": "4.1.3",
61-
"babel-plugin-transform-class-properties": "6.24.1",
6265
"babel-plugin-transform-react-remove-prop-types": "0.4.13",
63-
"babel-plugin-transform-runtime": "^6.23.0",
64-
"babel-preset-es2015": "6.24.1",
65-
"babel-preset-react": "6.24.1",
66-
"babel-preset-stage-0": "6.24.1",
66+
"c8": "^7.11.2",
6767
"commitizen": "^2.9.6",
6868
"conventional-changelog-cli": "^2.0.5",
6969
"copy-webpack-plugin": "^5.0.1",
@@ -90,7 +90,6 @@
9090
"lint-staged": "8.1.5",
9191
"marked": "^0.3.17",
9292
"mini-css-extract-plugin": "^0.4.0",
93-
"nyc": "^12.0.1",
9493
"postcss": "^6.0.16",
9594
"postcss-cssnext": "^3.1.0",
9695
"postcss-import": "^11.0.0",
@@ -124,44 +123,13 @@
124123
"src/**/*.test.js"
125124
],
126125
"require": [
127-
"babel-register",
126+
"@babel/register",
128127
"ignore-styles",
129128
"jsdom-global/register",
130129
"./setupEnzyme"
131130
],
132-
"babel": {
133-
"testOptions": {
134-
"babelrc": false,
135-
"plugins": [
136-
"@babel/plugin-syntax-jsx"
137-
],
138-
"presets": [
139-
"@babel/preset-stage-3"
140-
]
141-
}
142-
},
143131
"snapshotDir": "__snapshots__"
144132
},
145-
"nyc": {
146-
"sourceMap": false,
147-
"instrument": false,
148-
"cache": true,
149-
"reporter": [
150-
"html",
151-
"text-summary"
152-
],
153-
"all": true,
154-
"include": [
155-
"src/**/*.js"
156-
],
157-
"exclude": [
158-
"**/*.test.js",
159-
"**/node_modules/**",
160-
"dist",
161-
"demo",
162-
"src/**/tests/**"
163-
]
164-
},
165133
"stylelint": {
166134
"extends": "stylelint-config-standard"
167135
},

0 commit comments

Comments
 (0)