Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

istanbul-lib-instrument

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

istanbul-lib-instrument - npm Package Compare versions

Comparing version 1.10.1 to 2.0.0

21

CHANGELOG.md

@@ -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)

22

dist/instrumenter.js

@@ -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 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc