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 3.3.0 to 3.4.0

25

index.js

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

const imports = getImports(aliases);
const definitions = await walkFile(exportsPath, fromDir, imports);
const definitions = await walkFile(exportsPath, fromDir, imports);
return Object.assign(existingDefinitions, definitions);
// Map the exported symbols to their aliased names in the importing module.
Object.keys(imports).forEach((key) => {
existingDefinitions[imports[key]] = definitions[key];
});
return existingDefinitions;
}

@@ -120,10 +125,5 @@

if (requiredDefinitions) {
const validDefinitions = {};
Object.keys(requiredDefinitions).forEach((key) => {
validDefinitions[requiredDefinitions[key]] = definitions[key];
});
result.messages.push({
type: INNER_PLUGIN,
value: validDefinitions,
value: definitions,
});

@@ -162,5 +162,12 @@

const definitionCache = new Map();
async function walkFile(from, dir, requiredDefinitions) {
const request = importsAsModuleRequests ? urlToRequest(from) : from;
const resolvedFrom = await resolve(concordContext, dir, request);
const cached = definitionCache.get(resolvedFrom);
if (cached) {
return cached;
}
const content = await readFile(resolvedFrom);

@@ -174,2 +181,4 @@ const plugins = [

definitionCache.set(resolvedFrom, result.messages[0].value);
return result.messages[0].value;

@@ -176,0 +185,0 @@ }

{
"name": "postcss-modules-values-replace",
"version": "3.3.0",
"version": "3.4.0",
"description": "PostCSS plugin to work around CSS Modules values limitations",

@@ -5,0 +5,0 @@ "keywords": [

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