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

postcss-safe-parser

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-safe-parser - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

5

CHANGELOG.md
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).
## 5.0.1
* Fixed parsing missed semicolon.
## 5.0
* Removed support for Node.js 6.x, 8.x, 11.x, and 13.x versions.
* Used PostCSS 8.0.
* Moved to PostCSS 8.0.

@@ -8,0 +11,0 @@ ## 4.0.2

21

lib/safe-parser.js

@@ -63,13 +63,20 @@ let tokenizer = require('postcss/lib/tokenize')

let split
for (split = colon - 1; split >= 0; split--) {
if (tokens[split][0] === 'word') break
let nextStart, prevEnd
for (nextStart = colon - 1; nextStart >= 0; nextStart--) {
if (tokens[nextStart][0] === 'word') break
}
for (split -= 1; split >= 0; split--) {
if (tokens[split][0] !== 'space') {
split += 1
if (nextStart === 0) return
for (prevEnd = nextStart - 1; prevEnd >= 0; prevEnd--) {
if (tokens[prevEnd][0] !== 'space') {
prevEnd += 1
break
}
}
let other = tokens.splice(split, tokens.length - split)
let other = tokens.slice(nextStart)
let spaces = tokens.slice(prevEnd, nextStart)
tokens.splice(prevEnd, tokens.length - prevEnd)
this.spaces = spaces.map(i => i[1]).join('')
this.decl(other)

@@ -76,0 +83,0 @@ }

{
"name": "postcss-safe-parser",
"version": "5.0.0",
"version": "5.0.1",
"description": "Fault-tolerant CSS parser for PostCSS",

@@ -20,4 +20,4 @@ "keywords": [

"dependencies": {
"postcss": "^8.0.2"
"postcss": "^8.0.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