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 2.0.2 to 2.0.3

8

lib/utils/detectors.js

@@ -8,12 +8,8 @@ "use strict";

var _escapeRegExp = _interopRequireDefault(require("lodash/escapeRegExp"));
var _options = require("./options");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const VALID_TOP_LEVEL_IMPORT_PATH_MATCHERS = ['styled-components', 'styled-components/no-tags', 'styled-components/native', 'styled-components/primitives'].map(literal => x => x === literal);
const VALID_TOP_LEVEL_IMPORT_PATH_MATCHERS = ['styled-components', 'styled-components/no-tags', 'styled-components/native', 'styled-components/primitives'].map(literal => new RegExp(`^${(0, _escapeRegExp.default)(literal)}$`));
const isValidTopLevelImport = (x, state) => {
return [...VALID_TOP_LEVEL_IMPORT_PATH_MATCHERS, ...(0, _options.useTopLevelImportPathMatchers)(state)].some(re => re.test(x));
return [...VALID_TOP_LEVEL_IMPORT_PATH_MATCHERS, ...(0, _options.useTopLevelImportPathMatchers)(state)].some(isMatch => isMatch(x));
};

@@ -20,0 +16,0 @@

@@ -8,2 +8,6 @@ "use strict";

var _picomatch = _interopRequireDefault(require("picomatch"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getOption({

@@ -19,3 +23,3 @@ opts

const useTopLevelImportPathMatchers = state => getOption(state, 'topLevelImportPaths', []).map(pattern => new RegExp(pattern));
const useTopLevelImportPathMatchers = state => getOption(state, 'topLevelImportPaths', []).map(pattern => (0, _picomatch.default)(pattern));

@@ -22,0 +26,0 @@ exports.useTopLevelImportPathMatchers = useTopLevelImportPathMatchers;

{
"version": "2.0.2",
"version": "2.0.3",
"name": "babel-plugin-styled-components",

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

"babel-plugin-syntax-jsx": "^6.18.0",
"lodash": "^4.17.11"
"lodash": "^4.17.11",
"picomatch": "^2.3.0"
},

@@ -40,0 +41,0 @@ "resolutions": {

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