babel-plugin-transform-es2015-shorthand-properties
Advanced tools
Comparing version 6.8.0 to 6.18.0
@@ -1,2 +0,2 @@ | ||
/*istanbul ignore next*/"use strict"; | ||
"use strict"; | ||
@@ -7,12 +7,15 @@ exports.__esModule = true; | ||
return { | ||
visitor: { /*istanbul ignore next*/ | ||
visitor: { | ||
ObjectMethod: function ObjectMethod(path) { | ||
/*istanbul ignore next*/var node = path.node; | ||
var node = path.node; | ||
if (node.kind === "method") { | ||
path.replaceWith(t.objectProperty(node.key, t.functionExpression(null, node.params, node.body, node.generator, node.async), node.computed)); | ||
var func = t.functionExpression(null, node.params, node.body, node.generator, node.async); | ||
func.returnType = node.returnType; | ||
path.replaceWith(t.objectProperty(node.key, func, node.computed)); | ||
} | ||
}, | ||
/*istanbul ignore next*/ObjectProperty: function ObjectProperty(_ref) { | ||
/*istanbul ignore next*/var node = _ref.node; | ||
ObjectProperty: function ObjectProperty(_ref) { | ||
var node = _ref.node; | ||
@@ -27,10 +30,8 @@ if (node.shorthand) { | ||
var /*istanbul ignore next*/_babelTypes = require("babel-types"); | ||
var _babelTypes = require("babel-types"); | ||
/*istanbul ignore next*/ | ||
var t = _interopRequireWildcard(_babelTypes); | ||
/*istanbul ignore next*/ | ||
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; } } | ||
module.exports = exports["default"]; |
{ | ||
"name": "babel-plugin-transform-es2015-shorthand-properties", | ||
"version": "6.8.0", | ||
"version": "6.18.0", | ||
"description": "Compile ES2015 shorthand properties to ES5", | ||
@@ -12,8 +12,8 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-shorthand-properties", | ||
"dependencies": { | ||
"babel-types": "^6.8.0", | ||
"babel-types": "^6.18.0", | ||
"babel-runtime": "^6.0.0" | ||
}, | ||
"devDependencies": { | ||
"babel-helper-plugin-test-runner": "^6.8.0" | ||
"babel-helper-plugin-test-runner": "^6.18.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
2139
Updatedbabel-types@^6.18.0