Skip to content

Commit

Permalink
fix: should import @babel/template
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Coe committed May 31, 2018
1 parent 50c8104 commit 85a0d1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/istanbul-lib-instrument/src/visitor.js
@@ -1,7 +1,7 @@
import {SourceCoverage} from './source-coverage';
import { SHA, MAGIC_KEY, MAGIC_VALUE } from './constants';
import {createHash} from 'crypto';
import template from 'babel-template';
import template from '@babel/template';

// istanbul ignore comment pattern
const COMMENT_RE = /^\s*istanbul\s+ignore\s+(if|else|next)(?=\W|$)/;
Expand Down Expand Up @@ -73,7 +73,7 @@ class VisitState {
extractURL(node.leadingComments);
extractURL(node.trailingComments);
}


// for these expressions the statement counter needs to be hoisted, so
// function name inference can be preserved
Expand Down Expand Up @@ -507,7 +507,7 @@ function shouldIgnoreFile(programNode) {
const defaultProgramVisitorOpts = {
coverageVariable: '__coverage__',
ignoreClassMethods: [],
inputSourceMap: undefined
inputSourceMap: undefined
};
/**
* programVisitor is a `babel` adaptor for instrumentation.
Expand Down

0 comments on commit 85a0d1a

Please sign in to comment.