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

icss-utils

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icss-utils - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0

4

lib/extractICSS.js

@@ -6,3 +6,3 @@ "use strict";

});
var importPattern = /^:import\(("[^"]*"|'[^']*'|[\w-\.]+)\)$/;
var importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;

@@ -27,3 +27,3 @@ var getDeclsObject = function getDeclsObject(rule) {

if (matches) {
var path = matches[1];
var path = matches[1].replace(/'|"/g, "");
var aliases = Object.assign(icssImports[path] || {}, getDeclsObject(node));

@@ -30,0 +30,0 @@ icssImports[path] = aliases;

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -7,3 +7,3 @@ Object.defineProperty(exports, "__esModule", {

var _replaceValueSymbols = require('./replaceValueSymbols.js');
var _replaceValueSymbols = require("./replaceValueSymbols.js");

@@ -15,10 +15,13 @@ var _replaceValueSymbols2 = _interopRequireDefault(_replaceValueSymbols);

var replaceSymbols = function replaceSymbols(css, replacements) {
css.walkDecls(function (decl) {
return decl.value = (0, _replaceValueSymbols2.default)(decl.value, replacements);
css.walk(function (node) {
if (node.type === "decl") {
node.value = (0, _replaceValueSymbols2.default)(node.value, replacements);
} else if (node.type === "rule") {
node.selector = (0, _replaceValueSymbols2.default)(node.selector, replacements);
} else if (node.type === "atrule" && node.name === "media") {
node.params = (0, _replaceValueSymbols2.default)(node.params, replacements);
}
});
css.walkAtRules('media', function (atRule) {
return atRule.params = (0, _replaceValueSymbols2.default)(atRule.params, replacements);
});
};
exports.default = replaceSymbols;

@@ -6,3 +6,3 @@ "use strict";

});
var matchValueName = /[$#]?[\w-\.]+/g;
var matchValueName = /[$]?[\w-]+/g;

@@ -9,0 +9,0 @@ var replaceValueSymbols = function replaceValueSymbols(value, replacements) {

{
"name": "icss-utils",
"version": "2.1.0",
"version": "3.0.0",
"description": "ICSS utils for postcss ast",

@@ -17,4 +17,4 @@ "main": "lib/index.js",

"*.js": [
"prettier --write",
"eslint",
"prettier --write",
"git add"

@@ -25,5 +25,7 @@ ]

"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"env": {
"es6": true
},
"extends": "eslint:recommended"

@@ -60,3 +62,3 @@ },

"dependencies": {
"postcss": "^6.0.1"
"postcss": "^6.0.2"
},

@@ -66,9 +68,9 @@ "devDependencies": {

"babel-jest": "^20.0.3",
"babel-preset-env": "^1.5.1",
"eslint": "^3.19.0",
"husky": "^0.13.3",
"jest": "^20.0.3",
"lint-staged": "^3.4.2",
"prettier": "^1.3.1"
"babel-preset-env": "^1.5.2",
"eslint": "^4.0.0",
"husky": "^0.13.4",
"jest": "^20.0.4",
"lint-staged": "^3.6.1",
"prettier": "^1.4.4"
}
}
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