@emotion/babel-plugin
Advanced tools
Comparing version 11.3.0 to 11.7.1
# @emotion/babel-plugin | ||
## 11.7.1 | ||
### Patch Changes | ||
- [#2590](https://github.com/emotion-js/emotion/pull/2590) [`1554a7e2`](https://github.com/emotion-js/emotion/commit/1554a7e264e05780b2c5bd74ccb20a92005ba61d) Thanks [@Andarist](https://github.com/Andarist)! - Upgraded and pinned the version of Stylis - the CSS parser that Emotion uses under the hood. | ||
## 11.3.0 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@emotion/babel-plugin", | ||
"version": "11.3.0", | ||
"version": "11.7.1", | ||
"description": "A recommended babel preprocessing plugin for emotion, The Next Generation of CSS-in-JS.", | ||
@@ -27,3 +27,3 @@ "main": "dist/emotion-babel-plugin.cjs.js", | ||
"source-map": "^0.5.7", | ||
"stylis": "^4.0.3" | ||
"stylis": "4.0.13" | ||
}, | ||
@@ -30,0 +30,0 @@ "peerDependencies": { |
@@ -32,29 +32,25 @@ // @flow | ||
let createEmotionTransformer = (isPure: boolean) => ({ | ||
state, | ||
babel, | ||
importSource, | ||
reference, | ||
importSpecifierName | ||
}: Object) => { | ||
const path = reference.parentPath | ||
let createEmotionTransformer = | ||
(isPure: boolean) => | ||
({ state, babel, importSource, reference, importSpecifierName }: Object) => { | ||
const path = reference.parentPath | ||
if (isAlreadyTranspiled(path)) { | ||
return | ||
} | ||
if (isAlreadyTranspiled(path)) { | ||
return | ||
} | ||
if (isPure) { | ||
path.addComment('leading', '#__PURE__') | ||
} | ||
if (isPure) { | ||
path.addComment('leading', '#__PURE__') | ||
} | ||
let node = transformExpressionWithStyles({ | ||
babel, | ||
state, | ||
path, | ||
shouldLabel: true | ||
}) | ||
if (node) { | ||
path.node.arguments[0] = node | ||
let node = transformExpressionWithStyles({ | ||
babel, | ||
state, | ||
path, | ||
shouldLabel: true | ||
}) | ||
if (node) { | ||
path.node.arguments[0] = node | ||
} | ||
} | ||
} | ||
@@ -61,0 +57,0 @@ export let transformers = { |
@@ -78,3 +78,3 @@ // @flow | ||
export default function(babel: *, options: *) { | ||
export default function (babel: *, options: *) { | ||
if ( | ||
@@ -81,0 +81,0 @@ options.autoLabel !== undefined && |
@@ -6,5 +6,3 @@ // @flow | ||
export { simplifyObject } from './object-to-string' | ||
export { | ||
transformExpressionWithStyles | ||
} from './transform-expression-with-styles' | ||
export { transformExpressionWithStyles } from './transform-expression-with-styles' | ||
export { getStyledOptions } from './get-styled-options' | ||
@@ -11,0 +9,0 @@ export { |
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
208235
4463
+ Addedcaniuse-lite@1.0.30001684(transitive)
+ Addedelectron-to-chromium@1.5.65(transitive)
+ Addedstylis@4.0.13(transitive)
- Removedcaniuse-lite@1.0.30001683(transitive)
- Removedelectron-to-chromium@1.5.64(transitive)
- Removedstylis@4.3.4(transitive)
Updatedstylis@4.0.13