@babel/plugin-transform-react-jsx
Advanced tools
Comparing version 7.14.9 to 7.16.0
@@ -69,13 +69,2 @@ "use strict"; | ||
JSXOpeningElement(path, state) { | ||
for (const attr of path.get("attributes")) { | ||
if (!attr.isJSXElement()) continue; | ||
const { | ||
name | ||
} = attr.node.name; | ||
if (name === "__source" || name === "__self") { | ||
throw path.buildCodeFrameError(`__source and __self should not be defined in props and are reserved for internal usage.`); | ||
} | ||
} | ||
const attributes = []; | ||
@@ -402,3 +391,3 @@ | ||
if (attribsArray.length || children.length) { | ||
attribs = buildJSXOpeningElementAttributes(attribsArray, file, children); | ||
attribs = buildJSXOpeningElementAttributes(attribsArray, children); | ||
} else { | ||
@@ -421,3 +410,3 @@ attribs = _core.types.objectExpression([]); | ||
function buildJSXOpeningElementAttributes(attribs, file, children) { | ||
function buildJSXOpeningElementAttributes(attribs, children) { | ||
const props = attribs.reduce(accumulateAttribute, []); | ||
@@ -424,0 +413,0 @@ |
{ | ||
"name": "@babel/plugin-transform-react-jsx", | ||
"version": "7.14.9", | ||
"version": "7.16.0", | ||
"description": "Turn JSX into React function calls", | ||
@@ -20,7 +20,7 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-annotate-as-pure": "^7.14.5", | ||
"@babel/helper-module-imports": "^7.14.5", | ||
"@babel/helper-annotate-as-pure": "^7.16.0", | ||
"@babel/helper-module-imports": "^7.16.0", | ||
"@babel/helper-plugin-utils": "^7.14.5", | ||
"@babel/plugin-syntax-jsx": "^7.14.5", | ||
"@babel/types": "^7.14.9" | ||
"@babel/plugin-syntax-jsx": "^7.16.0", | ||
"@babel/types": "^7.16.0" | ||
}, | ||
@@ -31,5 +31,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "7.14.8", | ||
"@babel/helper-plugin-test-runner": "7.14.5", | ||
"@babel/traverse": "7.14.9" | ||
"@babel/core": "^7.16.0", | ||
"@babel/helper-plugin-test-runner": "^7.16.0", | ||
"@babel/traverse": "^7.16.0" | ||
}, | ||
@@ -36,0 +36,0 @@ "engines": { |
24260
505
+ Addedbrowserslist@4.23.0(transitive)
+ Addedcaniuse-lite@1.0.30001629(transitive)
+ Addedelectron-to-chromium@1.4.790(transitive)
- Removedbrowserslist@4.23.1(transitive)
- Removedcaniuse-lite@1.0.30001632(transitive)
- Removedelectron-to-chromium@1.4.799(transitive)
Updated@babel/types@^7.16.0