Socket
Socket
Sign inDemoInstall

babel-plugin-styled-components

Package Overview
Dependencies
Maintainers
3
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-styled-components - npm Package Compare versions

Comparing version 1.9.2 to 1.9.3-0

7

lib/visitors/transpileCssProp.js

@@ -58,3 +58,3 @@ "use strict";

} else if (t.isJSXExpressionContainer(path.node.value)) {
if (t.isTemplateLiteral(path.node.value.expression)) {
if (t.isTemplateLiteral(path.node.value.expression) || t.isObjectExpression(path.node.value.expression)) {
css = path.node.value.expression;

@@ -82,2 +82,7 @@ } else if (t.isTaggedTemplateExpression(path.node.value.expression) && path.node.value.expression.tag.name === 'css') {

if (t.isObjectExpression(css)) {
state.items.push(t.variableDeclaration('var', [t.variableDeclarator(id, t.callExpression(styled, [css]))]));
return;
}
css.expressions = css.expressions.reduce(function (acc, ex) {

@@ -84,0 +89,0 @@ if (Object.entries(bindings).some(function (_ref

2

package.json
{
"version": "1.9.2",
"version": "1.9.3-0",
"name": "babel-plugin-styled-components",

@@ -4,0 +4,0 @@ "description": "Improve the debugging experience and add server-side rendering support to styled-components",

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