babel-plugin-emotion
Advanced tools
Comparing version 10.0.19 to 10.0.20
# babel-plugin-emotion | ||
## 10.0.20 | ||
### Patch Changes | ||
- [1b3791d4](https://github.com/emotion-js/emotion/commit/1b3791d4c458838a097c815a38108c9719023b92) [#1526](https://github.com/emotion-js/emotion/pull/1526) Thanks [@ahutchings](https://github.com/ahutchings)! - Fix `autoLabel` crash on `css` used in expression assigned to an object pattern | ||
## 10.0.19 | ||
@@ -4,0 +10,0 @@ |
@@ -232,3 +232,7 @@ 'use strict'; | ||
if (parent.isVariableDeclarator()) { | ||
return parent.node.id.name; | ||
if (t.isIdentifier(parent.node.id)) { | ||
return parent.node.id.name; | ||
} | ||
return ''; | ||
} // we probably have an inline css prop usage | ||
@@ -293,3 +297,3 @@ | ||
var declaratorName = getDeclaratorName(path); // if the name starts with _ it was probably generated by babel so we should ignore it | ||
var declaratorName = getDeclaratorName(path, t); // if the name starts with _ it was probably generated by babel so we should ignore it | ||
@@ -296,0 +300,0 @@ if (declaratorName.charAt(0) === '_') { |
@@ -105,3 +105,3 @@ "use strict"; | ||
if (!parent) return ""; | ||
if (parent.isVariableDeclarator()) return parent.node.id.name; | ||
if (parent.isVariableDeclarator()) return t.isIdentifier(parent.node.id) ? parent.node.id.name : ""; | ||
if (parent.isFunctionDeclaration()) { | ||
@@ -129,3 +129,3 @@ var _name = parent.node.id.name; | ||
} | ||
var declaratorName = getDeclaratorName(path); | ||
var declaratorName = getDeclaratorName(path, t); | ||
return "_" === declaratorName.charAt(0) ? "" : declaratorName; | ||
@@ -132,0 +132,0 @@ } |
@@ -226,3 +226,7 @@ import nodePath from 'path'; | ||
if (parent.isVariableDeclarator()) { | ||
return parent.node.id.name; | ||
if (t.isIdentifier(parent.node.id)) { | ||
return parent.node.id.name; | ||
} | ||
return ''; | ||
} // we probably have an inline css prop usage | ||
@@ -287,3 +291,3 @@ | ||
var declaratorName = getDeclaratorName(path); // if the name starts with _ it was probably generated by babel so we should ignore it | ||
var declaratorName = getDeclaratorName(path, t); // if the name starts with _ it was probably generated by babel so we should ignore it | ||
@@ -290,0 +294,0 @@ if (declaratorName.charAt(0) === '_') { |
{ | ||
"name": "babel-plugin-emotion", | ||
"version": "10.0.19", | ||
"version": "10.0.20", | ||
"description": "A recommended babel preprocessing plugin for emotion, The Next Generation of CSS-in-JS.", | ||
@@ -5,0 +5,0 @@ "main": "dist/babel-plugin-emotion.cjs.js", |
@@ -62,3 +62,6 @@ // @flow | ||
if (parent.isVariableDeclarator()) { | ||
return parent.node.id.name | ||
if (t.isIdentifier(parent.node.id)) { | ||
return parent.node.id.name | ||
} | ||
return '' | ||
} | ||
@@ -65,0 +68,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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
135321
3172
0