@fullstory/babel-plugin-annotate-react
Advanced tools
Comparing version 1.0.2 to 2.0.0
# Changelog | ||
## 2.0.0 | ||
- React.Fragments are no longer annotated | ||
- Updated to new dependency versions | ||
## 1.0.2 | ||
@@ -4,0 +9,0 @@ |
15
index.js
@@ -79,4 +79,8 @@ const webComponentName = 'data-component'; | ||
!openingElement.node || | ||
!openingElement.node.name || | ||
!openingElement.node.name.name || | ||
!openingElement.node.name | ||
) return | ||
if (openingElement.node.name.name === 'Fragment') return true; | ||
if ( | ||
!openingElement.node.name.type || | ||
@@ -88,6 +92,5 @@ !openingElement.node.name.object || | ||
return ( | ||
openingElement.node.name.name === 'Fragment' || | ||
(openingElement.node.name.type === 'JSXMemberExpression' && | ||
openingElement.node.name.object.name === 'React' && | ||
openingElement.node.name.property.name === 'Fragment') | ||
openingElement.node.name.type === 'JSXMemberExpression' && | ||
openingElement.node.name.object.name === 'React' && | ||
openingElement.node.name.property.name === 'Fragment' | ||
) | ||
@@ -94,0 +97,0 @@ } |
{ | ||
"name": "@fullstory/babel-plugin-annotate-react", | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"description": "A Babel plugin that annotates React components, making them easier to target with FullStory search", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
11197
198