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

postcss-modules-scope

Package Overview
Dependencies
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-modules-scope - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

4

package.json
{
"name": "postcss-modules-scope",
"version": "3.0.0",
"version": "3.1.0",
"description": "A CSS Modules transform to extract export statements from local-scope classes",

@@ -48,3 +48,3 @@ "main": "src/index.js",

"lint-staged": "^10.4.0",
"postcss": "^8.1.0",
"postcss": "^8.3.0",
"prettier": "^2.1.2"

@@ -51,0 +51,0 @@ },

@@ -94,7 +94,8 @@ "use strict";

function exportScopedName(name, rawName) {
function exportScopedName(name, rawName, node) {
const scopedName = generateScopedName(
rawName ? rawName : name,
root.source.input.from,
root.source.input.css
root.source.input.css,
node
);

@@ -105,3 +106,4 @@ const exportEntry = generateExportEntry(

root.source.input.from,
root.source.input.css
root.source.input.css,
node
);

@@ -128,3 +130,4 @@ const { key, value } = exportEntry;

node.value,
node.raws && node.raws.value ? node.raws.value : null
node.raws && node.raws.value ? node.raws.value : null,
node
),

@@ -136,6 +139,17 @@ });

node.value,
node.raws && node.raws.value ? node.raws.value : null
node.raws && node.raws.value ? node.raws.value : null,
node
),
});
}
case "attribute": {
if (node.attribute === "class" && node.operator === "=") {
return selectorParser.attribute({
attribute: node.attribute,
operator: node.operator,
quoteMark: "'",
value: exportScopedName(node.value),
});
}
}
}

@@ -157,3 +171,3 @@

const selector = localizeNode(node.first, node.spaces);
// move the spaces that were around the psuedo selector to the first
// move the spaces that were around the pseudo selector to the first
// non-container node

@@ -160,0 +174,0 @@ selector.first.spaces = node.spaces;

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