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.2 to 6.0.0

2

lib/safe-parse.js

@@ -5,3 +5,3 @@ let { Input } = require('postcss')

module.exports = function safeParse (css, opts) {
module.exports = function safeParse(css, opts) {
let input = new Input(css, opts)

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

@@ -6,7 +6,7 @@ let tokenizer = require('postcss/lib/tokenize')

class SafeParser extends Parser {
createTokenizer () {
createTokenizer() {
this.tokenizer = tokenizer(this.input, { ignoreErrors: true })
}
comment (token) {
comment(token) {
let node = new Comment()

@@ -38,3 +38,3 @@ this.init(node, token[2])

decl (tokens) {
decl(tokens) {
if (tokens.length > 1 && tokens.some(i => i[0] === 'word')) {

@@ -45,19 +45,19 @@ super.decl(tokens)

unclosedBracket () {}
unclosedBracket() {}
unknownWord (tokens) {
unknownWord(tokens) {
this.spaces += tokens.map(i => i[1]).join('')
}
unexpectedClose () {
unexpectedClose() {
this.current.raws.after += '}'
}
doubleColon () {}
doubleColon() {}
unnamedAtrule (node) {
unnamedAtrule(node) {
node.name = ''
}
precheckMissedSemicolon (tokens) {
precheckMissedSemicolon(tokens) {
let colon = this.colon(tokens)

@@ -87,5 +87,5 @@ if (colon === false) return

checkMissedSemicolon () {}
checkMissedSemicolon() {}
endFile () {
endFile() {
if (this.current.nodes && this.current.nodes.length) {

@@ -92,0 +92,0 @@ this.current.raws.semicolon = this.semicolon

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

@@ -16,3 +16,3 @@ "keywords": [

"engines": {
"node": ">=10.0"
"node": ">=12.0"
},

@@ -24,5 +24,5 @@ "main": "lib/safe-parse",

},
"dependencies": {
"postcss": "^8.1.0"
"peerDependencies": {
"postcss": "^8.3.3"
}
}

@@ -19,3 +19,4 @@ # PostCSS Safe Parser

<a href="https://evilmartians.com/?utm_source=postcss">
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
alt="Sponsored by Evil Martians" width="236" height="54">
</a>

@@ -22,0 +23,0 @@

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