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

@babel/plugin-transform-react-inline-elements

Package Overview
Dependencies
Maintainers
4
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-react-inline-elements - npm Package Compare versions

Comparing version 7.0.0-beta.31 to 7.0.0-beta.32

24

lib/index.js

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