Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit 98bddb7

Browse files
committed
Update Infra #969 - Replace isparta with istanbul
1 parent c88b0f1 commit 98bddb7

File tree

4 files changed

+287
-81
lines changed

4 files changed

+287
-81
lines changed

.babelrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
"react"
99
],
1010
"env": {
11-
"commonjs": {
11+
"test": {
1212
"presets": [
1313
"env",
1414
"stage-1",
1515
"react"
1616
],
1717
"plugins": [
18-
"transform-decorators-legacy"
18+
"transform-decorators-legacy",
19+
"istanbul"
1920
]
2021
}
2122
}

karma.conf.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
const path = require('path');
22

3-
// Note: If we switch to ESM version of babelified files, we'll likely need to
4-
// update from the ancient isparta-loader. Likely we'll switch to:
5-
// https://github.com/istanbuljs/babel-plugin-istanbul with a `test` BABEL_ENV
6-
//
7-
// https://github.com/FormidableLabs/radium/issues/969
8-
process.env.BABEL_ENV = 'commonjs';
3+
process.env.BABEL_ENV = 'test';
94

105
module.exports = function(config) {
116
config.set({
@@ -34,13 +29,6 @@ module.exports = function(config) {
3429
include: path.resolve('src/__tests__/'),
3530
loader: 'babel-loader'
3631
},
37-
{
38-
test: /\.js$/,
39-
include: path.resolve('src/'),
40-
enforce: 'pre',
41-
exclude: /(__tests__|__mocks__)/,
42-
loader: 'isparta-loader?babel-loader'
43-
},
4432
{
4533
test: /\.js$/,
4634
exclude: [/node_modules/],

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"version-dry-run": "publishr dry-run -V",
2525
"build": "npm run clean && builder concurrent --buffer build-lib build-dist build-es",
2626
"build-babel": "babel src --ignore \"/__tests__/,/__mocks__/\"",
27-
"build-lib": "builder run --env \"{\\\"BABEL_ENV\\\":\\\"commonjs\\\"}\" build-babel -- -d lib",
27+
"build-lib": "builder run --env \"{\\\"BABEL_ENV\\\":\\\"test\\\"}\" build-babel -- -d lib",
2828
"build-dist-dev": "webpack",
2929
"build-dist-prod": "webpack --config=webpack.config.minified.js",
3030
"build-dist": "builder concurrent --buffer build-dist-dev build-dist-prod",
@@ -37,7 +37,7 @@
3737
"eslint": "eslint .",
3838
"fixlint": "npm run eslint -- --fix",
3939
"lint": "builder concurrent --buffer eslint flow",
40-
"start": "builder run --env \"{\\\"BABEL_ENV\\\":\\\"commonjs\\\"}\" examples-server",
40+
"start": "builder run --env \"{\\\"BABEL_ENV\\\":\\\"test\\\"}\" examples-server",
4141
"test-node": "mocha \"test/**/*-test.js\"",
4242
"test-node-dev": "mocha --watch \"test/**/*-test.js\"",
4343
"test-frontend": "karma start",
@@ -74,6 +74,7 @@
7474
},
7575
"devDependencies": {
7676
"babel-eslint": "^7.1.1",
77+
"babel-plugin-istanbul": "^5.1.0",
7778
"caniuse-api": "^2.0.0",
7879
"chai": "^3.5.0",
7980
"color": "^1.0.3",
@@ -89,7 +90,6 @@
8990
"express-http-proxy": "^0.11.0",
9091
"flow-bin": "^0.53.1",
9192
"inject-loader": "^3.0.1",
92-
"isparta-loader": "^2.0.0",
9393
"jsdom": "^12.0.0",
9494
"jsdom-global": "^3.0.2",
9595
"karma": "^3.0.0",

0 commit comments

Comments
 (0)