Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.10.6 to 1.10.7

14

lib/utils/detectors.js

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

});
exports.isPureHelper = exports.isHelper = exports.isKeyframesHelper = exports.isInjectGlobalHelper = exports.isCreateGlobalStyleHelper = exports.isCSSHelper = exports.isStyled = exports.importLocalName = exports.isValidTopLevelImport = void 0;
exports.isPureHelper = exports.isHelper = exports.isWithThemeHelper = exports.isKeyframesHelper = exports.isInjectGlobalHelper = exports.isCreateGlobalStyleHelper = exports.isCSSHelper = exports.isStyled = exports.importLocalName = exports.isValidTopLevelImport = void 0;
var VALID_TOP_LEVEL_IMPORT_PATHS = ['styled-components', 'styled-components/no-tags', 'styled-components/native', 'styled-components/primitives'];

@@ -132,5 +132,13 @@

var isWithThemeHelper = function isWithThemeHelper(t) {
return function (tag, state) {
return t.isIdentifier(tag) && tag.name === importLocalName('withTheme', state);
};
};
exports.isWithThemeHelper = isWithThemeHelper;
var isHelper = function isHelper(t) {
return function (tag, state) {
return isCSSHelper(t)(tag, state) || isKeyframesHelper(t)(tag, state);
return isCSSHelper(t)(tag, state) || isKeyframesHelper(t)(tag, state) || isWithThemeHelper(t)(tag, state);
};

@@ -143,3 +151,3 @@ };

return function (tag, state) {
return isCSSHelper(t)(tag, state) || isKeyframesHelper(t)(tag, state) || isCreateGlobalStyleHelper(t)(tag, state);
return isCSSHelper(t)(tag, state) || isKeyframesHelper(t)(tag, state) || isCreateGlobalStyleHelper(t)(tag, state) || isWithThemeHelper(t)(tag, state);
};

@@ -146,0 +154,0 @@ };

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

function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

@@ -21,0 +21,0 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

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

if (TAG_NAME_REGEXP.test(name)) {
styled = t.memberExpression(importName, t.identifier(name));
styled = t.callExpression(importName, [t.stringLiteral(name)]);
} else {

@@ -58,0 +58,0 @@ styled = t.callExpression(importName, [t.identifier(name)]);

{
"version": "1.10.6",
"version": "1.10.7",
"name": "babel-plugin-styled-components",

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

"babel-test": "^0.2.1",
"jest": "^24.8.0",
"jest": "^25.1.0",
"jest-file-snapshot": "^0.3.6",
"prettier": "^1.18.2",
"rimraf": "^2.6.3",
"styled-components": "^4.3.1"
"rimraf": "^3.0.0",
"styled-components": "^5.0.0"
},

@@ -32,0 +32,0 @@ "dependencies": {

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