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

postcss

Package Overview
Dependencies
Maintainers
1
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss - npm Package Compare versions

Comparing version 4.1.5 to 4.1.6

2

API.md

@@ -277,3 +277,3 @@ # PostCSS API

instance and processor will take already parser [`Root`] from it.
* `ops (object) optional`: options:
* `opts (object) optional`: options:
* `from`: the path of the CSS source file. You should always set `from`,

@@ -280,0 +280,0 @@ because it is used in source map generation and syntax error messages.

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

## 4.1.6
* Fix Promise behavior on parsing error.
## 4.1.5

@@ -2,0 +5,0 @@ * Parse at-words in declaration values.

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -13,3 +13,3 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _Container3 = _interopRequireWildcard(_Container2);
var _Container3 = _interopRequireDefault(_Container2);

@@ -16,0 +16,0 @@ var AtRule = (function (_Container) {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -13,3 +13,3 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _Node3 = _interopRequireWildcard(_Node2);
var _Node3 = _interopRequireDefault(_Node2);

@@ -16,0 +16,0 @@ var Comment = (function (_Node) {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -15,11 +15,11 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _Declaration2 = _interopRequireWildcard(_Declaration);
var _Declaration2 = _interopRequireDefault(_Declaration);
var _Comment = require('./comment');
var _Comment2 = _interopRequireWildcard(_Comment);
var _Comment2 = _interopRequireDefault(_Comment);
var _Node2 = require('./node');
var _Node3 = _interopRequireWildcard(_Node2);
var _Node3 = _interopRequireDefault(_Node2);

@@ -26,0 +26,0 @@ var Container = (function (_Node) {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -13,3 +13,3 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _warnOnce2 = _interopRequireWildcard(_warnOnce);
var _warnOnce2 = _interopRequireDefault(_warnOnce);

@@ -20,22 +20,26 @@ var CssSyntaxError = (function (_SyntaxError) {

_SyntaxError.call(this, message);
this.reason = message;
var _this = new _SyntaxError(message);
this.message = plugin ? plugin + ': ' : '';
this.message += file ? file : '<css input>';
_this.__proto__ = CssSyntaxError.prototype;
_this.reason = message;
_this.message = plugin ? plugin + ': ' : '';
_this.message += file ? file : '<css input>';
if (typeof line !== 'undefined' && typeof column !== 'undefined') {
this.line = line;
this.column = column;
this.message += ':' + line + ':' + column + ': ' + message;
_this.line = line;
_this.column = column;
_this.message += ':' + line + ':' + column + ': ' + message;
} else {
this.message += ': ' + message;
_this.message += ': ' + message;
}
if (file) this.file = file;
if (source) this.source = source;
if (plugin) this.plugin = plugin;
if (file) _this.file = file;
if (source) _this.source = source;
if (plugin) _this.plugin = plugin;
if (Error.captureStackTrace) {
Error.captureStackTrace(this, CssSyntaxError);
Error.captureStackTrace(_this, CssSyntaxError);
}
return _this;
}

@@ -42,0 +46,0 @@

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -13,3 +13,3 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _Node3 = _interopRequireWildcard(_Node2);
var _Node3 = _interopRequireDefault(_Node2);

@@ -16,0 +16,0 @@ var Declaration = (function (_Node) {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -11,11 +11,11 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _CssSyntaxError2 = _interopRequireWildcard(_CssSyntaxError);
var _CssSyntaxError2 = _interopRequireDefault(_CssSyntaxError);
var _PreviousMap = require('./previous-map');
var _PreviousMap2 = _interopRequireWildcard(_PreviousMap);
var _PreviousMap2 = _interopRequireDefault(_PreviousMap);
var _path = require('path');
var _path2 = _interopRequireWildcard(_path);
var _path2 = _interopRequireDefault(_path);

@@ -22,0 +22,0 @@ var sequence = 0;

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -13,19 +13,19 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _MapGenerator2 = _interopRequireWildcard(_MapGenerator);
var _MapGenerator2 = _interopRequireDefault(_MapGenerator);
var _warnOnce = require('./warn-once');
var _warnOnce2 = _interopRequireWildcard(_warnOnce);
var _warnOnce2 = _interopRequireDefault(_warnOnce);
var _Result = require('./result');
var _Result2 = _interopRequireWildcard(_Result);
var _Result2 = _interopRequireDefault(_Result);
var _parse = require('./parse');
var _parse2 = _interopRequireWildcard(_parse);
var _parse2 = _interopRequireDefault(_parse);
var _Root = require('./root');
var _Root2 = _interopRequireWildcard(_Root);
var _Root2 = _interopRequireDefault(_Root);

@@ -54,3 +54,7 @@ var Promise = global.Promise || require('es6-promise').Promise;

} else {
root = _parse2['default'](css, opts);
try {
root = _parse2['default'](css, opts);
} catch (error) {
this.parseError = error;
}
}

@@ -98,4 +102,8 @@

if (this.processed) {
return Promise.resolve().then(function () {
return _this2.stringify();
return new Promise(function (resolve, reject) {
if (_this2.parseError) {
reject(_this2.parseError);
} else {
resolve(_this2.stringify());
}
});

@@ -109,2 +117,3 @@ }

this.processing = new Promise(function (resolve, reject) {
if (_this2.parseError) return reject(_this2.parseError);
_this2.asyncTick(plugins, resolve, reject);

@@ -128,2 +137,4 @@ }).then(function () {

if (this.parseError) throw this.parseError;
for (var _iterator = this.result.processor.plugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {

@@ -130,0 +141,0 @@ var _ref;

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -13,7 +13,7 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _mozilla2 = _interopRequireWildcard(_mozilla);
var _mozilla2 = _interopRequireDefault(_mozilla);
var _path = require('path');
var _path2 = _interopRequireWildcard(_path);
var _path2 = _interopRequireDefault(_path);

@@ -20,0 +20,0 @@ var _default = (function () {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -11,3 +11,3 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _CssSyntaxError2 = _interopRequireWildcard(_CssSyntaxError);
var _CssSyntaxError2 = _interopRequireDefault(_CssSyntaxError);

@@ -14,0 +14,0 @@ var defaultStyle = {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -10,7 +10,7 @@ exports.__esModule = true;

var _Parser2 = _interopRequireWildcard(_Parser);
var _Parser2 = _interopRequireDefault(_Parser);
var _Input = require('./input');
var _Input2 = _interopRequireWildcard(_Input);
var _Input2 = _interopRequireDefault(_Input);

@@ -17,0 +17,0 @@ function parse(css, opts) {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -11,23 +11,23 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _Declaration2 = _interopRequireWildcard(_Declaration);
var _Declaration2 = _interopRequireDefault(_Declaration);
var _tokenizer = require('./tokenize');
var _tokenizer2 = _interopRequireWildcard(_tokenizer);
var _tokenizer2 = _interopRequireDefault(_tokenizer);
var _Comment = require('./comment');
var _Comment2 = _interopRequireWildcard(_Comment);
var _Comment2 = _interopRequireDefault(_Comment);
var _AtRule = require('./at-rule');
var _AtRule2 = _interopRequireWildcard(_AtRule);
var _AtRule2 = _interopRequireDefault(_AtRule);
var _Root = require('./root');
var _Root2 = _interopRequireWildcard(_Root);
var _Root2 = _interopRequireDefault(_Root);
var _Rule = require('./rule');
var _Rule2 = _interopRequireWildcard(_Rule);
var _Rule2 = _interopRequireDefault(_Rule);

@@ -34,0 +34,0 @@ var Parser = (function () {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -9,35 +9,35 @@ exports.__esModule = true;

var _Declaration2 = _interopRequireWildcard(_Declaration);
var _Declaration2 = _interopRequireDefault(_Declaration);
var _Processor = require('./processor');
var _Processor2 = _interopRequireWildcard(_Processor);
var _Processor2 = _interopRequireDefault(_Processor);
var _Comment = require('./comment');
var _Comment2 = _interopRequireWildcard(_Comment);
var _Comment2 = _interopRequireDefault(_Comment);
var _AtRule = require('./at-rule');
var _AtRule2 = _interopRequireWildcard(_AtRule);
var _AtRule2 = _interopRequireDefault(_AtRule);
var _vendor = require('./vendor');
var _vendor2 = _interopRequireWildcard(_vendor);
var _vendor2 = _interopRequireDefault(_vendor);
var _parse = require('./parse');
var _parse2 = _interopRequireWildcard(_parse);
var _parse2 = _interopRequireDefault(_parse);
var _list = require('./list');
var _list2 = _interopRequireWildcard(_list);
var _list2 = _interopRequireDefault(_list);
var _Rule = require('./rule');
var _Rule2 = _interopRequireWildcard(_Rule);
var _Rule2 = _interopRequireDefault(_Rule);
var _Root = require('./root');
var _Root2 = _interopRequireWildcard(_Root);
var _Root2 = _interopRequireDefault(_Root);

@@ -44,0 +44,0 @@ var postcss = function postcss() {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -13,11 +13,11 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _mozilla2 = _interopRequireWildcard(_mozilla);
var _mozilla2 = _interopRequireDefault(_mozilla);
var _path = require('path');
var _path2 = _interopRequireWildcard(_path);
var _path2 = _interopRequireDefault(_path);
var _fs = require('fs');
var _fs2 = _interopRequireWildcard(_fs);
var _fs2 = _interopRequireDefault(_fs);

@@ -24,0 +24,0 @@ var PreviousMap = (function () {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -11,3 +11,3 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _LazyResult2 = _interopRequireWildcard(_LazyResult);
var _LazyResult2 = _interopRequireDefault(_LazyResult);

@@ -14,0 +14,0 @@ var Processor = (function () {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -13,7 +13,7 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _warnOnce2 = _interopRequireWildcard(_warnOnce);
var _warnOnce2 = _interopRequireDefault(_warnOnce);
var _Warning = require('./warning');
var _Warning2 = _interopRequireWildcard(_Warning);
var _Warning2 = _interopRequireDefault(_Warning);

@@ -20,0 +20,0 @@ var Result = (function () {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -13,3 +13,3 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _Container3 = _interopRequireWildcard(_Container2);
var _Container3 = _interopRequireDefault(_Container2);

@@ -16,0 +16,0 @@ var Root = (function (_Container) {

'use strict';
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -15,7 +15,7 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _Container3 = _interopRequireWildcard(_Container2);
var _Container3 = _interopRequireDefault(_Container2);
var _list = require('./list');
var _list2 = _interopRequireWildcard(_list);
var _list2 = _interopRequireDefault(_list);

@@ -22,0 +22,0 @@ var Rule = (function (_Container) {

{
"name": "postcss",
"version": "4.1.5",
"version": "4.1.6",
"description": "Tool for transforming CSS with JS plugins",

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

"dependencies": {
"es6-promise": "~2.0.1",
"es6-promise": "~2.1.1",
"source-map": "~0.4.2",

@@ -31,4 +31,5 @@ "js-base64": "~2.1.8"

"gulp-json-editor": "2.2.1",
"stylecow-parser": "2.1.0",
"gonzales-pe": "3.0.0-26",
"gulp-eslint": "0.9.0",
"gulp-eslint": "0.11.0",
"browserify": "9.0.8",

@@ -39,13 +40,12 @@ "gulp-babel": "5.1.0",

"node-sass": "2.1.1",
"yaspeller": "2.0.0",
"yaspeller": "2.1.0",
"gulp-util": "3.0.4",
"fs-extra": "0.18.0",
"fs-extra": "0.18.2",
"gonzales": "1.0.7",
"through2": "0.6.5",
"stylecow": "5.0.1",
"request": "2.55.0",
"cssnext": "1.2.3",
"cssnext": "1.3.0",
"rework": "1.0.1",
"mensch": "0.3.1",
"stylus": "0.50.0",
"stylus": "0.51.0",
"sinon": "1.14.1",

@@ -56,4 +56,4 @@ "mocha": "2.2.4",

"less": "2.5.0",
"chai": "2.2.0",
"babel-core": "5.1.6"
"chai": "2.3.0",
"babel-core": "5.1.13"
},

@@ -60,0 +60,0 @@ "scripts": {

@@ -202,3 +202,3 @@ # PostCSS [![Build Status](https://travis-ci.org/postcss/postcss.svg)](https://travis-ci.org/postcss/postcss) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/postcss/postcss?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[Grunt]: https://github.com/nDmitry/grunt-postcss
[Gulp]: https://github.com/w0rm/gulp-postcss
[Gulp]: https://github.com/postcss/gulp-postcss

@@ -209,8 +209,10 @@ ## Plugins

* [cssnext] contains plugins that allow you to use future CSS features today.
* [AtCSS] contains plugins that transform your CSS according
* [`cssnano`] contains plugins that optimise CSS size for use in production.
* [`cssnext`] contains plugins that allow you to use future CSS features today.
* [`atcss`] contains plugins that transform your CSS according
to special annotation comments.
[cssnext]: https://github.com/putaindecode/cssnext
[AtCSS]: https://github.com/morishitter/atcss
[`cssnano`]: https://github.com/ben-eb/cssnano
[`cssnext`]: https://github.com/putaindecode/cssnext
[`atcss`]: https://github.com/morishitter/atcss

@@ -237,3 +239,3 @@ ### Future CSS Syntax

* [`postcss-color-hex`] transforms `rgb()` and `rgba()` to hex.
* [`postcss-color-rgba-fallback`] transforms `rgba()` to hexadecimal.
* [`postcss-epub`] adds the `-epub-` prefix to relevant properties.

@@ -255,5 +257,7 @@ * [`postcss-image-set`] adds `background-image` with first image for `image-set()`

to `rgba()`.
* [`postcss-for`] adds `@for` loops.
* [`postcss-mixins`] enables mixins more powerful than Sass’s,
defined within stylesheets or in JS.
* [`postcss-map`] enables configuration maps.
* [`postcss-neat`] is a semantic and fluid grid framework.
* [`postcss-nested`] unwraps nested rules.

@@ -265,2 +269,3 @@ * [`postcss-quantity-queries`] enables quantity queries.

* [`csstyle`] adds components workflow to your styles.
* [`lost`] feature rich `calc()` grid system by Jeet author.

@@ -304,2 +309,3 @@ ### Optimizations

with `cubic-bezier()` functions.
* [`postcss-focus`] adds `:focus` selector to every `:hover`.
* [`postcss-size`] adds a `size` shortcut that sets width and height

@@ -332,2 +338,3 @@ with one declaration.

[`postcss-color-rgba-fallback`]: https://github.com/postcss/postcss-color-rgba-fallback
[`postcss-color-rebeccapurple`]: https://github.com/postcss/postcss-color-rebeccapurple

@@ -366,3 +373,2 @@ [`postcss-discard-duplicates`]: https://github.com/ben-eb/postcss-discard-duplicates

[`postcss-color-gray`]: https://github.com/postcss/postcss-color-gray
[`postcss-color-hex`]: https://github.com/TrySound/postcss-color-hex
[`postcss-color-hwb`]: https://github.com/postcss/postcss-color-hwb

@@ -373,2 +379,3 @@ [`postcss-image-set`]: https://github.com/alex499/postcss-image-set

[`postcss-messages`]: https://github.com/postcss/postcss-messages
[`postcss-spiffing`]: https://github.com/HashanP/postcss-spiffing
[`postcss-easings`]: https://github.com/postcss/postcss-easings

@@ -384,3 +391,5 @@ [`postcss-opacity`]: https://github.com/iamvdo/postcss-opacity

[`css2modernizr`]: https://github.com/vovanbo/css2modernizr
[`postcss-focus`]: https://github.com/postcss/postcss-focus
[`postcss-at2x`]: https://github.com/simonsmith/postcss-at2x
[`postcss-neat`]: https://github.com/jo-asakura/postcss-neat
[`autoprefixer`]: https://github.com/postcss/autoprefixer

@@ -395,2 +404,3 @@ [`css-mqpacker`]: https://github.com/hail2u/node-css-mqpacker

[`postcss-map`]: https://github.com/pascalduez/postcss-map
[`postcss-for`]: https://github.com/antyakushev/postcss-for
[`css-byebye`]: https://github.com/AoDev/css-byebye

@@ -404,3 +414,3 @@ [`cssgrace`]: https://github.com/cssdream/cssgrace

[`doiuse`]: https://github.com/anandthakker/doiuse
[`postcss-spiffing`]: https://github.com/HashanP/postcss-spiffing
[`lost`]: https://github.com/corysimmons/lost

@@ -407,0 +417,0 @@ ## Usage

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