Skip to content

Commit 428a952

Browse files
SimenBbcoe
authored andcommitted
fix: include object-spread-syntax plugin (#141)
1 parent 18fe954 commit 428a952

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"lib"
1010
],
1111
"dependencies": {
12+
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
1213
"find-up": "^2.1.0",
13-
"istanbul-lib-instrument": "^1.7.5",
14+
"istanbul-lib-instrument": "^1.8.0",
1415
"test-exclude": "^4.1.1"
1516
},
1617
"devDependencies": {

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {realpathSync} from 'fs'
22
import {dirname} from 'path'
33
import {programVisitor} from 'istanbul-lib-instrument'
4+
import babelSyntaxObjectRestSpread from 'babel-plugin-syntax-object-rest-spread'
45

56
const testExclude = require('test-exclude')
67
const findUp = require('find-up')
@@ -23,7 +24,7 @@ function makeShouldSkip () {
2324
let config = {}
2425
if (Object.keys(opts).length > 0) {
2526
// explicitly configuring options in babel
26-
// takes precendence.
27+
// takes precedence.
2728
config = opts
2829
} else if (nycConfig.include || nycConfig.exclude) {
2930
// nyc was configured in a parent process (keep these settings).
@@ -52,6 +53,7 @@ function makeShouldSkip () {
5253
function makeVisitor ({types: t}) {
5354
const shouldSkip = makeShouldSkip()
5455
return {
56+
inherits: babelSyntaxObjectRestSpread,
5557
visitor: {
5658
Program: {
5759
enter (path) {

0 commit comments

Comments
 (0)