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

postcss-modules-values-replace

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-modules-values-replace - npm Package Compare versions

Comparing version 2.0.0 to 2.0.2

19

index.js

@@ -5,3 +5,3 @@ const postcss = require('postcss');

const { CachedInputFileSystem, NodeJsInputFileSystem, ResolverFactory } = require('enhanced-resolve');
const { replaceValueSymbols } = require('icss-utils');
const valueParser = require('postcss-value-parser');

@@ -20,2 +20,19 @@ const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;

const replaceValueSymbols = (valueString, replacements) => {
const value = valueParser(valueString);
value.walk((node) => {
if (node.type !== 'word') return;
const replacement = replacements[node.value];
if (replacement != null) {
// eslint-disable-next-line no-param-reassign
node.value = replacement;
}
});
return value.toString();
};
const getDefinition = (atRule, existingDefinitions, requiredDefinitions) => {

@@ -22,0 +39,0 @@ let matches;

6

package.json
{
"name": "postcss-modules-values-replace",
"version": "2.0.0",
"version": "2.0.2",
"description": "PostCSS plugin to work around CSS Modules values limitations",

@@ -24,4 +24,4 @@ "keywords": [

"es6-promisify": "^5.0.0",
"icss-utils": "^3.0.1",
"postcss": "^6.0.1"
"postcss": "^6.0.1",
"postcss-value-parser": "^3.3.0"
},

@@ -28,0 +28,0 @@ "devDependencies": {

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