Socket
Socket
Sign inDemoInstall

postcss

Package Overview
Dependencies
4
Maintainers
1
Versions
252
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.7 to 4.1.8

3

CHANGELOG.md

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

## 4.1.8
* Accepts `Processor` instance in `postcss()` constructor too.
## 4.1.7

@@ -2,0 +5,0 @@ * Speed up `postcss.list` (by Bogdan Chadkin).

4

lib/at-rule.js
'use strict';
exports.__esModule = true;
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };

@@ -9,4 +11,2 @@

exports.__esModule = true;
var _Container2 = require('./container');

@@ -13,0 +13,0 @@

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

@@ -9,4 +11,2 @@

exports.__esModule = true;
var _Node2 = require('./node');

@@ -13,0 +13,0 @@

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

@@ -11,4 +13,2 @@

exports.__esModule = true;
var _Declaration = require('./declaration');

@@ -15,0 +15,0 @@

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

@@ -9,4 +11,2 @@

exports.__esModule = true;
var _warnOnce = require('./warn-once');

@@ -13,0 +13,0 @@

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

@@ -9,4 +11,2 @@

exports.__esModule = true;
var _Node2 = require('./node');

@@ -13,0 +13,0 @@

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

@@ -7,4 +9,2 @@

exports.__esModule = true;
var _CssSyntaxError = require('./css-syntax-error');

@@ -57,13 +57,3 @@

Input.prototype.error = (function (_error) {
function error(_x, _x2, _x3) {
return _error.apply(this, arguments);
}
error.toString = function () {
return _error.toString();
};
return error;
})(function (message, line, column) {
Input.prototype.error = function error(message, line, column) {
var opts = arguments[3] === undefined ? {} : arguments[3];

@@ -88,3 +78,3 @@

return error;
});
};

@@ -91,0 +81,0 @@ Input.prototype.origin = function origin(line, column) {

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

@@ -9,4 +11,2 @@

exports.__esModule = true;
var _MapGenerator = require('./map-generator');

@@ -13,0 +13,0 @@

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

@@ -7,4 +9,2 @@

exports.__esModule = true;
var _Base64 = require('js-base64');

@@ -11,0 +11,0 @@

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

@@ -7,4 +9,2 @@

exports.__esModule = true;
var _CssSyntaxError = require('./css-syntax-error');

@@ -28,16 +28,7 @@

var cloneNode = (function (_cloneNode) {
function cloneNode(_x, _x2) {
return _cloneNode.apply(this, arguments);
}
var cloneNode = function cloneNode(obj, parent) {
if (typeof obj !== 'object') {
return obj;
}var cloned = new obj.constructor();
cloneNode.toString = function () {
return _cloneNode.toString();
};
return cloneNode;
})(function (obj, parent) {
if (typeof obj !== 'object') return obj;
var cloned = new obj.constructor();
for (var i in obj) {

@@ -61,3 +52,3 @@ if (!obj.hasOwnProperty(i)) continue;

return cloned;
});
};

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

'use strict';
exports.__esModule = true;
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
exports.__esModule = true;
exports['default'] = parse;

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

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

@@ -7,4 +9,2 @@

exports.__esModule = true;
var _Declaration = require('./declaration');

@@ -11,0 +11,0 @@

'use strict';
exports.__esModule = true;
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };
exports.__esModule = true;
var _Declaration = require('./declaration');

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

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

@@ -7,4 +9,2 @@

exports.__esModule = true;
var _Base64 = require('js-base64');

@@ -11,0 +11,0 @@

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

@@ -7,4 +9,2 @@

exports.__esModule = true;
var _LazyResult = require('./lazy-result');

@@ -16,4 +16,2 @@

function Processor() {
var _this = this;
var plugins = arguments[0] === undefined ? [] : arguments[0];

@@ -23,14 +21,7 @@

this.plugins = plugins.map(function (i) {
return _this.normalize(i);
});
this.plugins = this.normalize(plugins);
}
Processor.prototype.use = function use(plugin) {
plugin = this.normalize(plugin);
if (typeof plugin === 'object' && Array.isArray(plugin.plugins)) {
this.plugins = this.plugins.concat(plugin.plugins);
} else {
this.plugins.push(plugin);
}
this.plugins = this.plugins.concat(this.normalize([plugin]));
return this;

@@ -45,9 +36,28 @@ };

Processor.prototype.normalize = function normalize(plugin) {
var type = typeof plugin;
if ((type === 'object' || type === 'function') && plugin.postcss) {
return plugin.postcss;
} else {
return plugin;
Processor.prototype.normalize = function normalize(plugins) {
var normalized = [];
for (var _iterator = plugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var i = _ref;
var type = typeof i;
if ((type === 'object' || type === 'function') && i.postcss) {
normalized.push(i.postcss);
} else if (type === 'object' && Array.isArray(i.plugins)) {
normalized = normalized.concat(i.plugins);
} else {
normalized.push(i);
}
}
return normalized;
};

@@ -54,0 +64,0 @@

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

@@ -9,4 +11,2 @@

exports.__esModule = true;
var _warnOnce = require('./warn-once');

@@ -13,0 +13,0 @@

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

@@ -9,4 +11,2 @@

exports.__esModule = true;
var _Container2 = require('./container');

@@ -13,0 +13,0 @@

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

@@ -11,4 +13,2 @@

exports.__esModule = true;
var _Container2 = require('./container');

@@ -15,0 +15,0 @@

'use strict';
exports.__esModule = true;
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
exports.__esModule = true;
var Warning = (function () {

@@ -8,0 +8,0 @@ function Warning(text) {

{
"name": "postcss",
"version": "4.1.7",
"version": "4.1.8",
"description": "Tool for transforming CSS with JS plugins",

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

"chai": "2.3.0",
"babel-core": "5.1.13"
"babel-core": "5.2.2"
},

@@ -44,0 +44,0 @@ "benchmarkDependencies": {

@@ -138,3 +138,3 @@ # PostCSS [![Build Status][ci-img]][ci] [![Gitter][chat-img]][chat]

[PostCSS API]: https://github.com/postcss/postcss/blob/master/API.md
[PostCSS API]: https://github.com/postcss/postcss/blob/master/docs/api.md
[CLI tool]: https://github.com/code42day/postcss-cli

@@ -352,3 +352,3 @@ [Broccoli]: https://github.com/jeffjewiss/broccoli-postcss

* [PostCSS API](https://github.com/postcss/postcss/blob/master/API.md)
* [PostCSS API](https://github.com/postcss/postcss/blob/master/docs/api.md)
* [Plugin Boilerplate](https://github.com/postcss/postcss-plugin-boilerplate)

@@ -355,0 +355,0 @@ * [Ask questions](https://gitter.im/postcss/postcss)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc