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

autoprefixer

Package Overview
Dependencies
Maintainers
4
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autoprefixer - npm Package Compare versions

Comparing version 7.1.5 to 7.1.6

5

CHANGELOG.md
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).
## 7.1.6
* Add warning for using `browserslist` option instead of `browsers`.
* Add warning for multiple control comments in the same scope.
* Fix `Invalid array length` error during indent changes.
## 7.1.5

@@ -5,0 +10,0 @@ * Fix `::placeholder` prefix for Edge.

4

lib/autoprefixer.js

@@ -55,2 +55,4 @@ 'use strict';

throw new Error('Change `browser` option to `browsers` in Autoprefixer');
} else if (options.browserslist) {
throw new Error('Change `browserslist` option to `browsers` in Autoprefixer');
}

@@ -85,3 +87,3 @@

if (options.remove !== false) {
prefixes.processor.remove(css);
prefixes.processor.remove(css, result);
}

@@ -88,0 +90,0 @@ if (options.add !== false) {

@@ -146,3 +146,5 @@ 'use strict';

var before = decl.raw('before');
before += Array(diff).fill(' ').join('');
if (diff > 0) {
before += Array(diff).fill(' ').join('');
}

@@ -149,0 +151,0 @@ return before;

@@ -35,15 +35,15 @@ 'use strict';

if (rule.name === 'keyframes') {
if (!_this.disabled(rule)) {
if (!_this.disabled(rule, result)) {
return keyframes && keyframes.process(rule);
}
} else if (rule.name === 'viewport') {
if (!_this.disabled(rule)) {
if (!_this.disabled(rule, result)) {
return viewport && viewport.process(rule);
}
} else if (rule.name === 'supports') {
if (_this.prefixes.options.supports !== false && !_this.disabled(rule)) {
if (_this.prefixes.options.supports !== false && !_this.disabled(rule, result)) {
return supports.process(rule);
}
} else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) {
if (!_this.disabled(rule)) {
if (!_this.disabled(rule, result)) {
return resolution && resolution.process(rule);

@@ -58,3 +58,3 @@ }

css.walkRules(function (rule) {
if (_this.disabled(rule)) return undefined;
if (_this.disabled(rule, result)) return undefined;

@@ -67,3 +67,3 @@ return _this.prefixes.add.selectors.map(function (selector) {

css.walkDecls(function (decl) {
if (_this.disabledDecl(decl)) return undefined;
if (_this.disabledDecl(decl, result)) return undefined;

@@ -151,3 +151,3 @@ if (decl.prop === 'display' && decl.value === 'box') {

return css.walkDecls(function (decl) {
if (_this.disabledValue(decl)) return;
if (_this.disabledValue(decl, result)) return;

@@ -180,3 +180,3 @@ var unprefixed = _this.prefixes.unprefixed(decl.prop);

Processor.prototype.remove = function remove(css) {
Processor.prototype.remove = function remove(css, result) {
var _this2 = this;

@@ -189,3 +189,3 @@

if (_this2.prefixes.remove['@' + rule.name]) {
if (!_this2.disabled(rule)) {
if (!_this2.disabled(rule, result)) {
rule.parent.removeChild(i);

@@ -203,3 +203,3 @@ }

if (checker.check(rule)) {
if (!_this2.disabled(rule)) {
if (!_this2.disabled(rule, result)) {
rule.parent.removeChild(i);

@@ -229,3 +229,3 @@ }

return css.walkDecls(function (decl, i) {
if (_this2.disabled(decl)) return;
if (_this2.disabled(decl, result)) return;

@@ -310,3 +310,3 @@ var rule = decl.parent;

Processor.prototype.disabledValue = function disabledValue(node) {
Processor.prototype.disabledValue = function disabledValue(node, result) {
if (this.prefixes.options.grid === false && node.type === 'decl') {

@@ -323,3 +323,3 @@ if (node.prop === 'display' && node.value.indexOf('grid') !== -1) {

return this.disabled(node);
return this.disabled(node, result);
};

@@ -332,3 +332,3 @@

Processor.prototype.disabledDecl = function disabledDecl(node) {
Processor.prototype.disabledDecl = function disabledDecl(node, result) {
if (this.prefixes.options.grid === false && node.type === 'decl') {

@@ -346,3 +346,3 @@ if (node.prop.indexOf('grid') !== -1 || node.prop === 'justify-items') {

return this.disabled(node);
return this.disabled(node, result);
};

@@ -355,3 +355,3 @@

Processor.prototype.disabled = function disabled(node) {
Processor.prototype.disabled = function disabled(node, result) {
if (node._autoprefixerDisabled !== undefined) {

@@ -367,8 +367,8 @@ return node._autoprefixerDisabled;

}
if (/(!\s*)?autoprefixer:\s*off/i.test(i.text)) {
status = false;
return false;
} else if (/(!\s*)?autoprefixer:\s*on/i.test(i.text)) {
status = true;
return false;
if (/(!\s*)?autoprefixer:\s*(off|on)/i.test(i.text)) {
if (typeof status !== 'undefined') {
result.warn('Second Autoprefixer control comment ' + 'was ignored. Autoprefixer applies control ' + 'comment to whole block, not to next rules.', { node: i });
} else {
status = /on/i.test(i.text);
}
}

@@ -378,10 +378,10 @@ return undefined;

var result = false;
var value = false;
if (status !== undefined) {
result = !status;
value = !status;
} else if (node.parent) {
result = this.disabled(node.parent);
value = this.disabled(node.parent, result);
}
node._autoprefixerDisabled = result;
node._autoprefixerDisabled = value;
return node._autoprefixerDisabled;

@@ -391,3 +391,3 @@ }

if (node.parent) {
node._autoprefixerDisabled = this.disabled(node.parent);
node._autoprefixerDisabled = this.disabled(node.parent, result);
return node._autoprefixerDisabled;

@@ -394,0 +394,0 @@ }

{
"name": "autoprefixer",
"version": "7.1.5",
"version": "7.1.6",
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",

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

"dependencies": {
"browserslist": "^2.5.0",
"caniuse-lite": "^1.0.30000744",
"browserslist": "^2.5.1",
"caniuse-lite": "^1.0.30000748",
"normalize-range": "^0.1.2",

@@ -27,6 +27,6 @@ "num2fraction": "^1.2.2",

"babel-plugin-transform-class-properties": "^6.24.1",
"babel-preset-env": "^1.6.0",
"babel-preset-env": "^1.6.1",
"babelify": "^7.3.0",
"browserify": "^14.4.0",
"eslint": "^4.8.0",
"browserify": "^14.5.0",
"eslint": "^4.9.0",
"eslint-config-postcss": "^2.0.2",

@@ -40,3 +40,3 @@ "fs-extra": "^4.0.2",

"jest": "^21.2.1",
"lint-staged": "^4.2.3",
"lint-staged": "^4.3.0",
"pre-commit": "^1.2.2",

@@ -43,0 +43,0 @@ "size-limit": "^0.11.6",

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