Socket
Socket
Sign inDemoInstall

babel-plugin-emotion-rename

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-emotion-rename - npm Package Compare versions

Comparing version 1.0.0-beta.7 to 1.0.0-beta.8

3

lib/index.js

@@ -140,2 +140,3 @@ "use strict";

ImportDeclaration: function ImportDeclaration(path, state) {
console.log("imp-declare---");
var isReactEmotionImport = path.node.source.value === "react-emotion";

@@ -207,2 +208,4 @@

if (node.callee.name === "require" && node.arguments && node.arguments.length === 1 && t.isStringLiteral(node.arguments[0]) && isModule(node.arguments[0].value, original)) {
console.log("require-declare---");
if (path.scope.bindings.styled && /(react-)?emotion/.test(node.arguments[0].value)) {

@@ -209,0 +212,0 @@ path.node.arguments = [t.stringLiteral("@emotion/styled")];

2

package.json
{
"name": "babel-plugin-emotion-rename",
"version": "1.0.0-beta.7",
"version": "1.0.0-beta.8",
"description": "Babel plugin to rename old Emotion 9 import to new Emotion 10+ import",

@@ -5,0 +5,0 @@ "main": "lib/index",

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