Socket
Socket
Sign inDemoInstall

postcss-selector-parser

Package Overview
Dependencies
3
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.3 to 1.1.4

5

CHANGELOG.md

@@ -0,1 +1,6 @@

# 1.1.4
* Fixes a crash when a selector started with a `>` combinator. The module will
now no longer throw if a selector has a leading/trailing combinator node.
# 1.1.3

@@ -2,0 +7,0 @@

24

dist/parser.js

@@ -144,3 +144,3 @@ 'use strict';

combinator.spaces.before = this.currToken[1];
} else if (this.prevToken[0] === 'combinator') {
} else if (this.prevToken && this.prevToken[0] === 'combinator') {
combinator.spaces.after = this.currToken[1];

@@ -151,9 +151,3 @@ } else if (this.currToken[0] === 'space' || this.currToken[0] === 'combinator') {

this.position++;
if (this.position === this.tokens.length) {
this.error('Unexpected right hand side combinator.');
}
}
if (!this.current.last) {
this.error('Unexpected left hand side combinator.');
}
return this.newNode(combinator);

@@ -210,4 +204,8 @@ }

while (this.position < this.tokens.length && balanced) {
if (this.currToken[0] === '(') balanced++;
if (this.currToken[0] === ')') balanced--;
if (this.currToken[0] === '(') {
balanced++;
}
if (this.currToken[0] === ')') {
balanced--;
}
if (balanced) {

@@ -228,4 +226,8 @@ this.parse();

while (this.position < this.tokens.length && balanced) {
if (this.currToken[0] === '(') balanced++;
if (this.currToken[0] === ')') balanced--;
if (this.currToken[0] === '(') {
balanced++;
}
if (this.currToken[0] === ')') {
balanced--;
}
last.value += this.currToken[1];

@@ -232,0 +234,0 @@ this.position++;

{
"name": "postcss-selector-parser",
"version": "1.1.3",
"version": "1.1.4",
"devDependencies": {

@@ -5,0 +5,0 @@ "babel": "^5.4.3",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc