Skip to content

Commit

Permalink
fix: include object-spread-syntax plugin (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored and bcoe committed Mar 9, 2018
1 parent 18fe954 commit 428a952
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"lib"
],
"dependencies": {
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
"find-up": "^2.1.0",
"istanbul-lib-instrument": "^1.7.5",
"istanbul-lib-instrument": "^1.8.0",
"test-exclude": "^4.1.1"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {realpathSync} from 'fs'
import {dirname} from 'path'
import {programVisitor} from 'istanbul-lib-instrument'
import babelSyntaxObjectRestSpread from 'babel-plugin-syntax-object-rest-spread'

const testExclude = require('test-exclude')
const findUp = require('find-up')
Expand All @@ -23,7 +24,7 @@ function makeShouldSkip () {
let config = {}
if (Object.keys(opts).length > 0) {
// explicitly configuring options in babel
// takes precendence.
// takes precedence.
config = opts
} else if (nycConfig.include || nycConfig.exclude) {
// nyc was configured in a parent process (keep these settings).
Expand Down Expand Up @@ -52,6 +53,7 @@ function makeShouldSkip () {
function makeVisitor ({types: t}) {
const shouldSkip = makeShouldSkip()
return {
inherits: babelSyntaxObjectRestSpread,
visitor: {
Program: {
enter (path) {
Expand Down

0 comments on commit 428a952

Please sign in to comment.