postcss-modules-values
Advanced tools
Comparing version 2.0.0 to 3.0.0
{ | ||
"name": "postcss-modules-values", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "PostCSS plugin for CSS Modules to pass arbitrary values between your module files", | ||
@@ -16,3 +16,3 @@ "main": "src/index.js", | ||
"travis": "yarn lint && yarn cover", | ||
"prepublish": "yarn test" | ||
"prepublishOnly": "yarn test" | ||
}, | ||
@@ -38,10 +38,10 @@ "repository": { | ||
"coveralls": "^3.0.2", | ||
"mocha": "^5.2.0", | ||
"eslint": "^5.9.0", | ||
"nyc": "^13.1.0" | ||
"mocha": "^6.1.4", | ||
"nyc": "^14.1.0" | ||
}, | ||
"dependencies": { | ||
"icss-replace-symbols": "^1.1.0", | ||
"icss-utils": "^4.0.0", | ||
"postcss": "^7.0.6" | ||
} | ||
} |
@@ -31,3 +31,3 @@ # CSS Modules: Values | ||
/* alias paths for other values or composition */ | ||
@value colors: "./colors.css"; | ||
@value colors: "./colors.css"; | ||
/* import multiple from a single file */ | ||
@@ -37,3 +37,9 @@ @value primary, secondary from colors; | ||
@value small as bp-small, large as bp-large from "./breakpoints.css"; | ||
/* value as selector name */ | ||
@value selectorValue: secondary-color; | ||
.selectorValue { | ||
color: secondary; | ||
} | ||
.header { | ||
@@ -79,2 +85,3 @@ composes: text-primary from colors; | ||
--- | ||
Glen Maddern, 2015. |
'use strict'; | ||
const postcss = require('postcss'); | ||
const ICSSReplaceSymbols = require('icss-replace-symbols'); | ||
const replaceSymbols = require('icss-replace-symbols'); | ||
const ICSSUtils = require('icss-utils'); | ||
@@ -29,3 +28,3 @@ const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; | ||
// Add to the definitions, knowing that values can refer to each other | ||
definitions[key] = replaceSymbols.replaceAll(definitions, value); | ||
definitions[key] = ICSSUtils.replaceValueSymbols(value, definitions); | ||
atRule.remove(); | ||
@@ -91,3 +90,3 @@ } | ||
/* Perform replacements */ | ||
ICSSReplaceSymbols.default(css, definitions); | ||
ICSSUtils.replaceSymbols(css, definitions); | ||
@@ -94,0 +93,0 @@ /* Add export rules if any */ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7053
85
0
104
+ Addedicss-utils@^4.0.0
+ Addedicss-utils@4.1.1(transitive)
- Removedicss-replace-symbols@^1.1.0
- Removedicss-replace-symbols@1.1.0(transitive)