@babel/plugin-transform-react-inline-elements
Advanced tools
Comparing version 7.0.0-beta.31 to 7.0.0-beta.32
@@ -8,11 +8,11 @@ "use strict"; | ||
var _core = require("@babel/core"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _default(_ref) { | ||
var t = _ref.types; | ||
function _default() { | ||
function hasRefOrSpread(attrs) { | ||
for (var i = 0; i < attrs.length; i++) { | ||
var attr = attrs[i]; | ||
if (t.isJSXSpreadAttribute(attr)) return true; | ||
if (_core.types.isJSXSpreadAttribute(attr)) return true; | ||
if (isJSXAttributeOfName(attr, "ref")) return true; | ||
@@ -25,3 +25,3 @@ } | ||
function isJSXAttributeOfName(attr, name) { | ||
return t.isJSXAttribute(attr) && t.isJSXIdentifier(attr.name, { | ||
return _core.types.isJSXAttribute(attr) && _core.types.isJSXIdentifier(attr.name, { | ||
name: name | ||
@@ -39,4 +39,4 @@ }); | ||
if (t.react.isCompatTag(tagName)) { | ||
args.push(t.stringLiteral(tagName)); | ||
if (_core.types.react.isCompatTag(tagName)) { | ||
args.push(_core.types.stringLiteral(tagName)); | ||
} else { | ||
@@ -51,5 +51,5 @@ args.push(state.tagExpr); | ||
if (t.isObjectExpression(props)) { | ||
if (_core.types.isObjectExpression(props)) { | ||
var keyIndex = props.properties.findIndex(function (prop) { | ||
return t.isIdentifier(prop.key, { | ||
return _core.types.isIdentifier(prop.key, { | ||
name: "key" | ||
@@ -64,8 +64,8 @@ }); | ||
} | ||
} else if (t.isNullLiteral(props)) { | ||
state.args.splice(1, 1, t.objectExpression([])); | ||
} else if (_core.types.isNullLiteral(props)) { | ||
state.args.splice(1, 1, _core.types.objectExpression([])); | ||
} | ||
if (!hasKey && state.args.length > 2) { | ||
state.args.splice(2, 0, t.unaryExpression("void", t.numericLiteral(0))); | ||
state.args.splice(2, 0, _core.types.unaryExpression("void", _core.types.numericLiteral(0))); | ||
} | ||
@@ -72,0 +72,0 @@ } |
{ | ||
"name": "@babel/plugin-transform-react-inline-elements", | ||
"version": "7.0.0-beta.31", | ||
"version": "7.0.0-beta.32", | ||
"description": "Turn JSX elements into exploded React objects", | ||
@@ -12,11 +12,11 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-inline-elements", | ||
"dependencies": { | ||
"@babel/helper-builder-react-jsx": "7.0.0-beta.31" | ||
"@babel/helper-builder-react-jsx": "7.0.0-beta.32" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "7.0.0-beta.31" | ||
"@babel/core": "7.0.0-beta.32" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.31", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.31" | ||
"@babel/core": "7.0.0-beta.32", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.32" | ||
} | ||
} |
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
4802
+ Added@babel/code-frame@7.0.0-beta.32(transitive)
+ Added@babel/core@7.0.0-beta.32(transitive)
+ Added@babel/generator@7.0.0-beta.32(transitive)
+ Added@babel/helper-builder-react-jsx@7.0.0-beta.32(transitive)
+ Added@babel/helper-function-name@7.0.0-beta.32(transitive)
+ Added@babel/helper-get-function-arity@7.0.0-beta.32(transitive)
+ Added@babel/helpers@7.0.0-beta.32(transitive)
+ Added@babel/template@7.0.0-beta.32(transitive)
+ Added@babel/traverse@7.0.0-beta.32(transitive)
+ Added@babel/types@7.0.0-beta.32(transitive)
+ Addedbabylon@7.0.0-beta.32(transitive)
- Removed@babel/code-frame@7.0.0-beta.31(transitive)
- Removed@babel/core@7.0.0-beta.31(transitive)
- Removed@babel/generator@7.0.0-beta.31(transitive)
- Removed@babel/helper-builder-react-jsx@7.0.0-beta.31(transitive)
- Removed@babel/helper-function-name@7.0.0-beta.31(transitive)
- Removed@babel/helper-get-function-arity@7.0.0-beta.31(transitive)
- Removed@babel/helpers@7.0.0-beta.31(transitive)
- Removed@babel/template@7.0.0-beta.31(transitive)
- Removed@babel/traverse@7.0.0-beta.31(transitive)
- Removed@babel/types@7.0.0-beta.31(transitive)
- Removedbabylon@7.0.0-beta.31(transitive)