Socket
Socket
Sign inDemoInstall

postcss-safe-parser

Package Overview
Dependencies
Maintainers
1
Versions
20
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 1.0.4 to 1.0.5

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## 1.0.5
* Fix CSS syntax error position on unclosed quotes.
## 1.0.4

@@ -2,0 +5,0 @@ * Fix wrong `main` in `package.json`.

4

lib/safe-parser.js

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

var SafeParser = (function (_Parser) {
var SafeParser = function (_Parser) {
_inherits(SafeParser, _Parser);

@@ -87,5 +87,5 @@

return SafeParser;
})(_parser2.default);
}(_parser2.default);
exports.default = SafeParser;
module.exports = exports['default'];

@@ -149,3 +149,18 @@ 'use strict';

tokens.push(['string', css.slice(pos, next + 1), line, pos - offset, line, next - offset]);
content = css.slice(pos, next + 1);
lines = content.split('\n');
last = lines.length - 1;
if (last > 0) {
nextLine = line + last;
nextOffset = next - lines[last].length;
} else {
nextLine = line;
nextOffset = offset;
}
tokens.push(['string', css.slice(pos, next + 1), line, pos - offset, nextLine, next - nextOffset]);
offset = nextOffset;
line = nextLine;
pos = next;

@@ -152,0 +167,0 @@ break;

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

@@ -14,24 +14,23 @@ "keywords": [

"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/postcss/postcss-safe-parser.git"
},
"repository": "postcss/postcss-safe-parser",
"dependencies": {
"postcss": "^5.0.13"
"babel-preset-es2015": "6.5.0",
"postcss": "^5.0.15"
},
"devDependencies": {
"eslint-config-postcss": "2.0.0",
"postcss-parser-tests": "5.0.5",
"gulp-json-editor": "2.2.1",
"babel-eslint": "5.0.0-beta6",
"gulp-eslint": "1.1.1",
"gulp-babel": "6.1.1",
"babel-eslint": "5.0.0-beta10",
"gulp-eslint": "2.0.0",
"gulp-babel": "6.1.2",
"gulp-mocha": "2.2.0",
"mocha": "2.3.4",
"gulp": "3.9.0",
"chai": "3.4.1",
"mocha": "2.4.5",
"gulp": "3.9.1",
"chai": "3.5.0",
"del": "2.2.0",
"babel-plugin-add-module-exports": "0.1.2",
"babel-preset-es2015-loose": "6.1.3",
"babel-preset-stage-0": "6.3.13",
"babel-core": "6.3.26"
"babel-preset-es2015-loose": "7.0.0",
"babel-preset-stage-0": "6.5.0",
"babel-core": "6.5.2"
},

@@ -38,0 +37,0 @@ "scripts": {

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