Socket
Socket
Sign inDemoInstall

postcss-selector-parser

Package Overview
Dependencies
Maintainers
1
Versions
59
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 1.3.2 to 1.3.3

5

CHANGELOG.md

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

# 1.3.3
* Fixes an infinite loop on `)` and `]` tokens when they had no opening pairs.
Now postcss-selector-parser will throw when it encounters these lone tokens.
# 1.3.2

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

20

dist/parser.js

@@ -215,2 +215,10 @@ 'use strict';

Parser.prototype.missingParenthesis = function missingParenthesis() {
return this.error('Expected opening parenthesis.');
};
Parser.prototype.missingSquareBracket = function missingSquareBracket() {
return this.error('Expected opening square bracket.');
};
Parser.prototype.namespace = function namespace() {

@@ -463,3 +471,3 @@ var before = this.prevToken && this.prevToken[1] || true;

while (this.position < this.tokens.length) {
this.parse();
this.parse(true);
}

@@ -469,3 +477,3 @@ return this.root;

Parser.prototype.parse = function parse() {
Parser.prototype.parse = function parse(throwOnParenthesis) {
switch (this.currToken[0]) {

@@ -481,5 +489,13 @@ case 'space':

break;
case ')':
if (throwOnParenthesis) {
this.missingParenthesis();
}
break;
case '[':
this.attribute();
break;
case ']':
this.missingSquareBracket();
break;
case 'at-word':

@@ -486,0 +502,0 @@ case 'word':

4

package.json
{
"name": "postcss-selector-parser",
"version": "1.3.2",
"version": "1.3.3",
"devDependencies": {

@@ -17,3 +17,3 @@ "ava": "^0.12.0",

"eslint-config-cssnano": "^2.0.0",
"nyc": "^5.3.0"
"nyc": "^6.0.0"
},

@@ -20,0 +20,0 @@ "main": "dist/index.js",

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