istanbul-lib-instrument
Advanced tools
Comparing version 1.10.1 to 2.0.0
@@ -6,2 +6,23 @@ # Change Log | ||
<a name="2.0.0"></a> | ||
# [2.0.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@1.10.1...istanbul-lib-instrument@2.0.0) (2018-05-31) | ||
### Bug Fixes | ||
* parenthesize superClass on non-idetifier case ([#158](https://github.com/istanbuljs/istanbuljs/issues/158)) ([6202c88](https://github.com/istanbuljs/istanbuljs/commit/6202c88)) | ||
### Chores | ||
* upgrade babel in instrumenter ([#174](https://github.com/istanbuljs/istanbuljs/issues/174)) ([ce23e91](https://github.com/istanbuljs/istanbuljs/commit/ce23e91)) | ||
### BREAKING CHANGES | ||
* babel@7 drops Node@4 support | ||
<a name="1.10.1"></a> | ||
@@ -8,0 +29,0 @@ ## [1.10.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@1.10.0...istanbul-lib-instrument@1.10.1) (2018-03-09) |
@@ -13,17 +13,17 @@ 'use strict'; | ||
var _babylon = require('babylon'); | ||
var _parser = require('@babel/parser'); | ||
var babylon = _interopRequireWildcard(_babylon); | ||
var parser = _interopRequireWildcard(_parser); | ||
var _babelTypes = require('babel-types'); | ||
var _types = require('@babel/types'); | ||
var t = _interopRequireWildcard(_babelTypes); | ||
var t = _interopRequireWildcard(_types); | ||
var _babelTraverse = require('babel-traverse'); | ||
var _traverse = require('@babel/traverse'); | ||
var _babelTraverse2 = _interopRequireDefault(_babelTraverse); | ||
var _traverse2 = _interopRequireDefault(_traverse); | ||
var _babelGenerator = require('babel-generator'); | ||
var _generator = require('@babel/generator'); | ||
var _babelGenerator2 = _interopRequireDefault(_babelGenerator); | ||
var _generator2 = _interopRequireDefault(_generator); | ||
@@ -124,3 +124,3 @@ var _visitor = require('./visitor'); | ||
var opts = this.opts; | ||
var ast = babylon.parse(code, { | ||
var ast = parser.parse(code, { | ||
allowReturnOutsideFunction: opts.autoWrap, | ||
@@ -144,3 +144,3 @@ sourceType: opts.esModules ? "module" : "script", | ||
}; | ||
(0, _babelTraverse2.default)(ast, visitor); | ||
(0, _traverse2.default)(ast, visitor); | ||
@@ -153,3 +153,3 @@ var generateOptions = { | ||
}; | ||
var codeMap = (0, _babelGenerator2.default)(ast, generateOptions, code); | ||
var codeMap = (0, _generator2.default)(ast, generateOptions, code); | ||
this.fileCoverage = output.fileCoverage; | ||
@@ -156,0 +156,0 @@ this.sourceMap = codeMap.map; |
@@ -10,11 +10,11 @@ 'use strict'; | ||
var _babylon = require('babylon'); | ||
var _parser = require('@babel/parser'); | ||
var _babelTraverse = require('babel-traverse'); | ||
var _traverse = require('@babel/traverse'); | ||
var _babelTraverse2 = _interopRequireDefault(_babelTraverse); | ||
var _traverse2 = _interopRequireDefault(_traverse); | ||
var _babelTypes = require('babel-types'); | ||
var _types = require('@babel/types'); | ||
var t = _interopRequireWildcard(_babelTypes); | ||
var t = _interopRequireWildcard(_types); | ||
@@ -31,3 +31,3 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | ||
// Parse as leniently as possible | ||
var ast = (0, _babylon.parse)(code, { | ||
var ast = (0, _parser.parse)(code, { | ||
allowImportExportEverywhere: true, | ||
@@ -37,7 +37,7 @@ allowReturnOutsideFunction: true, | ||
sourceType: "script", // I think ? | ||
plugins: ["*"] | ||
plugins: ['asyncGenerators', 'dynamicImport', 'objectRestSpread', 'flow', 'jsx'] | ||
}); | ||
var covScope = void 0; | ||
(0, _babelTraverse2.default)(ast, { | ||
(0, _traverse2.default)(ast, { | ||
ObjectProperty: function ObjectProperty(path) { | ||
@@ -44,0 +44,0 @@ var node = path.node; |
@@ -398,5 +398,5 @@ 'use strict'; | ||
function makeParenthesizedExpression(path) { | ||
function makeParenthesizedExpressionForNonIdentifier(path) { | ||
var T = this.types; | ||
if (path.node) { | ||
if (path.node && !path.isIdentifier()) { | ||
path.replaceWith(T.parenthesizedExpression(path.node)); | ||
@@ -408,3 +408,3 @@ } | ||
return function (path) { | ||
makeParenthesizedExpression.call(this, path.get(prop)); | ||
makeParenthesizedExpressionForNonIdentifier.call(this, path.get(prop)); | ||
}; | ||
@@ -411,0 +411,0 @@ } |
{ | ||
"name": "istanbul-lib-instrument", | ||
"version": "1.10.1", | ||
"version": "2.0.0", | ||
"description": "Core istanbul API for JS code coverage", | ||
@@ -17,7 +17,7 @@ "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>", | ||
"dependencies": { | ||
"babel-generator": "^6.18.0", | ||
"babel-template": "^6.16.0", | ||
"babel-traverse": "^6.18.0", | ||
"babel-types": "^6.18.0", | ||
"babylon": "^6.18.0", | ||
"@babel/generator": "7.0.0-beta.49", | ||
"@babel/parser": "7.0.0-beta.48", | ||
"@babel/template": "7.0.0-beta.49", | ||
"@babel/traverse": "7.0.0-beta.49", | ||
"@babel/types": "7.0.0-beta.49", | ||
"istanbul-lib-coverage": "^1.2.0", | ||
@@ -33,8 +33,9 @@ "semver": "^5.3.0" | ||
"clone": "^2.0.0", | ||
"coveralls": "^2.11.4", | ||
"coveralls": "^3.0.1", | ||
"cross-env": "^2.0.1", | ||
"debug": "^3.1.0", | ||
"documentation": "^4.0.0-beta9", | ||
"js-yaml": "^3.3.1", | ||
"jshint": "^2.8.0", | ||
"mocha": "^3.1.2", | ||
"jshint": "^2.9.5", | ||
"mocha": "^5.2.0", | ||
"nopt": "^3.0.6" | ||
@@ -41,0 +42,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57806
14
+ Added@babel/parser@7.0.0-beta.48
+ Added@babel/types@7.0.0-beta.49
+ Added@babel/code-frame@7.0.0-beta.49(transitive)
+ Added@babel/generator@7.0.0-beta.49(transitive)
+ Added@babel/helper-function-name@7.0.0-beta.49(transitive)
+ Added@babel/helper-get-function-arity@7.0.0-beta.49(transitive)
+ Added@babel/helper-split-export-declaration@7.0.0-beta.49(transitive)
+ Added@babel/highlight@7.0.0-beta.49(transitive)
+ Added@babel/parser@7.0.0-beta.48(transitive)
+ Added@babel/template@7.0.0-beta.49(transitive)
+ Added@babel/traverse@7.0.0-beta.49(transitive)
+ Added@babel/types@7.0.0-beta.49(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addeddebug@3.2.7(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedjsesc@2.5.2(transitive)
+ Addedms@2.1.3(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedto-fast-properties@2.0.0(transitive)
- Removedbabel-generator@^6.18.0
- Removedbabel-template@^6.16.0
- Removedbabel-traverse@^6.18.0
- Removedbabel-types@^6.18.0
- Removedbabylon@^6.18.0
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedbabel-code-frame@6.26.0(transitive)
- Removedbabel-generator@6.26.1(transitive)
- Removedbabel-messages@6.23.0(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedbabel-template@6.26.0(transitive)
- Removedbabel-traverse@6.26.0(transitive)
- Removedbabel-types@6.26.0(transitive)
- Removedbabylon@6.18.0(transitive)
- Removedchalk@1.1.3(transitive)
- Removedcore-js@2.6.12(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddetect-indent@4.0.0(transitive)
- Removedglobals@9.18.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedis-finite@1.1.0(transitive)
- Removedjsesc@1.3.0(transitive)
- Removedms@2.0.0(transitive)
- Removedregenerator-runtime@0.11.1(transitive)
- Removedrepeating@2.0.1(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedto-fast-properties@1.0.3(transitive)