🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

postcss-selector-parser

Package Overview
Dependencies
Maintainers
5
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-selector-parser - npm Package Compare versions

Comparing version
6.1.3
to
6.1.4
+5
-1
CHANGELOG.md

@@ -1,3 +0,7 @@

# 6.1.3
# 6.1.4 - 2026-06-11
- fix: tolerate non-node children when serializing selectors
# 6.1.3 - 2026-06-11
- Fix [CVE-2026-9358](https://github.com/advisories/GHSA-w9m9-85wc-3x92) (NVD) / SNYK-JS-POSTCSSSELECTORPARSER-16873882 via backport of ([#316](https://github.com/postcss/postcss-selector-parser/pull/316) by [@MoOx](https://github.com/MoOx))

@@ -4,0 +8,0 @@

@@ -303,5 +303,16 @@ "use strict";

_proto._stringify = function _stringify(options, depth, max) {
var _this10 = this;
return this.map(function (child) {
return child._stringify(options, depth, max);
return _this10._stringifyChild(child, options, depth, max);
}).join('');
}
// Serialize a child node. Historically `toString` used `this.map(String)`,
// which leniently coerced anything — including raw arrays inserted via
// `replaceWith(array)` / `insertBefore` / `insertAfter` (e.g. Tailwind's
// `:merge()` expansion). Fall back to `String(child)` for values that are
// not parser nodes so that behaviour is preserved.
;
_proto._stringifyChild = function _stringifyChild(child, options, depth, max) {
return typeof child._stringify === 'function' ? child._stringify(options, depth, max) : String(child);
};

@@ -308,0 +319,0 @@ _createClass(Container, [{

+2
-1

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

_proto._stringify = function _stringify(options, depth, max) {
var _this2 = this;
if (depth >= max) {

@@ -25,3 +26,3 @@ throw new Error("Cannot serialize selector: nesting depth exceeds the maximum of " + max + ".");

var params = this.length ? '(' + this.map(function (child) {
return child._stringify(options, depth + 1, max);
return _this2._stringifyChild(child, options, depth + 1, max);
}).join(',') + ')' : '';

@@ -28,0 +29,0 @@ return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join('');

@@ -24,4 +24,5 @@ "use strict";

_proto._stringify = function _stringify(options, depth, max) {
var _this2 = this;
var str = this.reduce(function (memo, selector) {
memo.push(selector._stringify(options, depth, max));
memo.push(_this2._stringifyChild(selector, options, depth, max));
return memo;

@@ -28,0 +29,0 @@ }, []).join(',');

{
"version": "6.1.3",
"version": "6.1.4",
"name": "postcss-selector-parser",

@@ -4,0 +4,0 @@ "description": "Selector parser with built in methods for working with selector strings.",