autoprefixer 9.7.2 → 9.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 9.7.3
5
+ * Fix compatibility with PostCSS Modules.
6
+
4
7
  ## 9.7.2
5
8
  * Add `-ms-user-select: element` support.
6
9
  * Add funding link for `npm fund`.
@@ -18,7 +18,7 @@ var _require = require('./grid-utils'),
18
18
  inheritGridGap = _require.inheritGridGap;
19
19
 
20
20
  function getGridRows(tpl) {
21
- return tpl.trim().slice(1, -1).split(/['"]\s*['"]?/g);
21
+ return tpl.trim().slice(1, -1).split(/["']\s*["']?/g);
22
22
  }
23
23
 
24
24
  var GridTemplateAreas =
@@ -235,7 +235,7 @@ function parseGridAreas(_ref6) {
235
235
 
236
236
 
237
237
  function testTrack(node) {
238
- return node.type === 'word' && /^\[.+\]$/.test(node.value);
238
+ return node.type === 'word' && /^\[.+]$/.test(node.value);
239
239
  }
240
240
 
241
241
  function verifyRowSize(result) {
@@ -76,7 +76,7 @@ function (_Declaration) {
76
76
  decl = _Declaration.prototype.set.call(this, decl, prefix);
77
77
 
78
78
  if (prefix === '-ms-') {
79
- decl.value = decl.value.replace(/rotateZ/gi, 'rotate');
79
+ decl.value = decl.value.replace(/rotatez/gi, 'rotate');
80
80
  }
81
81
 
82
82
  return decl;
package/lib/prefixes.js CHANGED
@@ -98,8 +98,8 @@ function () {
98
98
  this.processor = new Processor(this);
99
99
  }
100
100
  /**
101
- * Return clone instance to remove all prefixes
102
- */
101
+ * Return clone instance to remove all prefixes
102
+ */
103
103
 
104
104
 
105
105
  var _proto = Prefixes.prototype;
@@ -119,8 +119,8 @@ function () {
119
119
  return this.cleanerCache;
120
120
  }
121
121
  /**
122
- * Select prefixes from data, which is necessary for selected browsers
123
- */
122
+ * Select prefixes from data, which is necessary for selected browsers
123
+ */
124
124
  ;
125
125
 
126
126
  _proto.select = function select(list) {
@@ -196,8 +196,8 @@ function () {
196
196
  return selected;
197
197
  }
198
198
  /**
199
- * Sort vendor prefixes
200
- */
199
+ * Sort vendor prefixes
200
+ */
201
201
  ;
202
202
 
203
203
  _proto.sort = function sort(prefixes) {
@@ -213,8 +213,8 @@ function () {
213
213
  });
214
214
  }
215
215
  /**
216
- * Cache prefixes data to fast CSS processing
217
- */
216
+ * Cache prefixes data to fast CSS processing
217
+ */
218
218
  ;
219
219
 
220
220
  _proto.preprocess = function preprocess(selected) {
@@ -436,8 +436,8 @@ function () {
436
436
  }
437
437
  }
438
438
  /**
439
- * Return unprefixed version of property
440
- */
439
+ * Return unprefixed version of property
440
+ */
441
441
  ;
442
442
 
443
443
  _proto.unprefixed = function unprefixed(prop) {
@@ -450,16 +450,16 @@ function () {
450
450
  return value;
451
451
  }
452
452
  /**
453
- * Normalize prefix for remover
454
- */
453
+ * Normalize prefix for remover
454
+ */
455
455
  ;
456
456
 
457
457
  _proto.normalize = function normalize(prop) {
458
458
  return this.decl(prop).normalize(prop);
459
459
  }
460
460
  /**
461
- * Return prefixed version of property
462
- */
461
+ * Return prefixed version of property
462
+ */
463
463
  ;
464
464
 
465
465
  _proto.prefixed = function prefixed(prop, prefix) {
@@ -467,8 +467,8 @@ function () {
467
467
  return this.decl(prop).prefixed(prop, prefix);
468
468
  }
469
469
  /**
470
- * Return values, which must be prefixed in selected property
471
- */
470
+ * Return values, which must be prefixed in selected property
471
+ */
472
472
  ;
473
473
 
474
474
  _proto.values = function values(type, prop) {
@@ -483,8 +483,8 @@ function () {
483
483
  }
484
484
  }
485
485
  /**
486
- * Group declaration by unprefixed property to check them
487
- */
486
+ * Group declaration by unprefixed property to check them
487
+ */
488
488
  ;
489
489
 
490
490
  _proto.group = function group(decl) {
package/lib/processor.js CHANGED
@@ -360,20 +360,24 @@ function () {
360
360
 
361
361
  var unprefixed = _this.prefixes.unprefixed(decl.prop);
362
362
 
363
- for (var _iterator3 = _this.prefixes.values('add', unprefixed), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
364
- var _ref3;
363
+ var list = _this.prefixes.values('add', unprefixed);
365
364
 
366
- if (_isArray3) {
367
- if (_i3 >= _iterator3.length) break;
368
- _ref3 = _iterator3[_i3++];
369
- } else {
370
- _i3 = _iterator3.next();
371
- if (_i3.done) break;
372
- _ref3 = _i3.value;
373
- }
365
+ if (Array.isArray(list)) {
366
+ for (var _iterator3 = list, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
367
+ var _ref3;
368
+
369
+ if (_isArray3) {
370
+ if (_i3 >= _iterator3.length) break;
371
+ _ref3 = _iterator3[_i3++];
372
+ } else {
373
+ _i3 = _iterator3.next();
374
+ if (_i3.done) break;
375
+ _ref3 = _i3.value;
376
+ }
374
377
 
375
- var value = _ref3;
376
- value.process(decl, result);
378
+ var value = _ref3;
379
+ if (value.process) value.process(decl, result);
380
+ }
377
381
  }
378
382
 
379
383
  Value.save(_this.prefixes, decl);
@@ -482,11 +486,8 @@ function () {
482
486
  }
483
487
 
484
488
  var checker = _ref5;
485
-
486
- if (!checker.check(decl.value)) {
487
- continue;
488
- }
489
-
489
+ if (!checker.check) continue;
490
+ if (!checker.check(decl.value)) continue;
490
491
  unprefixed = checker.unprefixed;
491
492
 
492
493
  var _notHack = _this2.prefixes.group(decl).down(function (other) {
package/lib/selector.js CHANGED
@@ -47,7 +47,7 @@ function (_Prefixer) {
47
47
  ;
48
48
 
49
49
  _proto.prefixed = function prefixed(prefix) {
50
- return this.name.replace(/^([^\w]*)/, "$1" + prefix);
50
+ return this.name.replace(/^(\W*)/, "$1" + prefix);
51
51
  }
52
52
  /**
53
53
  * Lazy loadRegExp for name
package/lib/utils.js CHANGED
@@ -56,7 +56,7 @@ module.exports = {
56
56
  * Escape RegExp symbols
57
57
  */
58
58
  escapeRegexp: function escapeRegexp(string) {
59
- return string.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&');
59
+ return string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&');
60
60
  },
61
61
 
62
62
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autoprefixer",
3
- "version": "9.7.2",
3
+ "version": "9.7.3",
4
4
  "description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
5
5
  "keywords": ["autoprefixer", "css", "prefix", "postcss", "postcss-plugin"],
6
6
  "funding": {
@@ -14,8 +14,8 @@
14
14
  "node": ">=6.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "browserslist": "^4.7.3",
18
- "caniuse-lite": "^1.0.30001010",
17
+ "browserslist": "^4.8.0",
18
+ "caniuse-lite": "^1.0.30001012",
19
19
  "chalk": "^2.4.2",
20
20
  "normalize-range": "^0.1.2",
21
21
  "num2fraction": "^1.2.2",