stylehacks
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -0,1 +1,7 @@ | ||
# 2.3.1 | ||
* Upgraded postcss-selector-parser to `v2.0.0`. | ||
* Fixed an issue where stylehacks was not removing `*zoom: 1` from rules | ||
generated by other PostCSS plugins. | ||
# 2.3.0 | ||
@@ -2,0 +8,0 @@ |
@@ -14,2 +14,3 @@ 'use strict'; | ||
var targets = ['ie 5.5', 'ie 6', 'ie 7']; | ||
var hacks = '!_$_&_*_)_=_%_+_,_._/_`_]_#_~_?_:_|'.split('_'); | ||
@@ -21,10 +22,21 @@ exports.default = (0, _plugin2.default)(targets, ['decl', 'atrule'], function (node) { | ||
var _ret = function () { | ||
// some values are not picked up by before, so ensure they are | ||
// at the beginning of the value | ||
hacks.some(function (hack) { | ||
if (!node.prop.indexOf(hack)) { | ||
_this.push(node, { | ||
identifier: 'property', | ||
hack: node.prop | ||
}); | ||
return true; | ||
} | ||
}); | ||
var before = node.raws.before; | ||
if (!before) { | ||
return { | ||
v: undefined | ||
v: void 0 | ||
}; | ||
} | ||
var hacks = '!_$_&_*_)_=_%_+_,_._/_`_]_#_~_?_:_|'.split('_'); | ||
var hasBefore = hacks.some(function (hack) { | ||
hacks.some(function (hack) { | ||
if (~before.indexOf(hack)) { | ||
@@ -38,22 +50,9 @@ _this.push(node, { | ||
}); | ||
if (!hasBefore) { | ||
// some values are not picked up by before, so ensure they are | ||
// at the beginning of the value | ||
hacks.some(function (hack) { | ||
if (!node.prop.indexOf(hack)) { | ||
_this.push(node, { | ||
identifier: 'property', | ||
hack: node.prop | ||
}); | ||
return true; | ||
} | ||
}); | ||
} | ||
}(); | ||
if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; | ||
} | ||
if (node.type === 'atrule') { | ||
} else if (node.type === 'atrule') { | ||
// test for the @property: value; hack | ||
var name = node.name; | ||
var len = name.length - 1; | ||
@@ -60,0 +59,0 @@ if (name.lastIndexOf(':') === len) { |
{ | ||
"name": "stylehacks", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Detect/remove browser hacks from CSS files.", | ||
@@ -17,3 +17,3 @@ "main": "dist/index.js", | ||
"prepublish": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/", | ||
"test": "npm run prepublish && ava src/__tests__" | ||
"test": "ava src/__tests__" | ||
}, | ||
@@ -32,6 +32,6 @@ "keywords": [ | ||
"devDependencies": { | ||
"ava": "^0.12.0", | ||
"ava": "^0.14.0", | ||
"babel-cli": "^6.5.1", | ||
"babel-core": "^6.5.2", | ||
"babel-plugin-add-module-exports": "^0.1.2", | ||
"babel-plugin-add-module-exports": "^0.2.0", | ||
"babel-preset-es2015": "^6.5.0", | ||
@@ -59,3 +59,3 @@ "babel-preset-es2015-loose": "^7.0.0", | ||
"postcss-reporter": "^1.3.3", | ||
"postcss-selector-parser": "^1.3.2", | ||
"postcss-selector-parser": "^2.0.0", | ||
"read-file-stdin": "^0.2.1", | ||
@@ -62,0 +62,0 @@ "text-table": "^0.2.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
27805
0
496
+ Addedpostcss-selector-parser@2.2.3(transitive)
- Removedpostcss-selector-parser@1.3.3(transitive)