Socket
Socket
Sign inDemoInstall

@modular-css/processor

Package Overview
Dependencies
22
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 27.0.1 to 27.0.2

4

package.json
{
"name": "@modular-css/processor",
"version": "27.0.1",
"version": "27.0.2",
"description": "A streamlined reinterpretation of CSS Modules",

@@ -39,3 +39,3 @@ "main": "./processor.js",

},
"gitHead": "5adcb0e31f79ab2535a39e8cca87e8b0e42d3545"
"gitHead": "9682e2178f012b2431f5fb3175faf327ca85262b"
}
"use strict";
const value = require("postcss-value-parser");
const parser = require("../../parsers/values.js");

@@ -19,6 +20,6 @@

value(rule) {
let parsed;
let details;
try {
parsed = parser.parse(rule.params);
details = parser.parse(rule.params);
} catch(e) {

@@ -29,13 +30,24 @@ // Errors aren't world-ending, necessarily

if(parsed.type !== "assignment") {
if(details.type !== "assignment") {
return;
}
// References to existing values are handled as object references,
// Simple references to existing values are handled as object references,
// so they're always kept up-to-date
if(values[parsed.value]) {
values[parsed.name] = values[parsed.value];
if(values[details.value]) {
values[details.name] = values[details.value];
} else {
values[parsed.name] = {
value : parsed.value,
// Otherwise need to walk @value body and check for any replacments to make
const parsed = value(details.value);
parsed.walk((node) => {
if(node.type !== "word" || !values[node.value]) {
return;
}
node.value = values[node.value].value;
});
values[details.name] = {
value : parsed.toString(),
source : rule.source,

@@ -42,0 +54,0 @@ };

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

const current = values[node.value];

@@ -46,0 +45,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc