postcss-discard-unused 2.2.2 → 2.2.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,3 +1,8 @@
1
+ # 2.2.3
2
+
3
+ * Font lookup is now case-insensitive, preventing unwanted removal of fonts
4
+ that are used (thanks to @thomas-mcdonald).
5
+
1
6
  # 2.2.2
2
7
 
3
8
  * Removed a dependency on `flatten`.
package/README.md CHANGED
@@ -114,8 +114,8 @@ Pass `false` to disable discarding unused namespace rules.
114
114
  Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
115
115
 
116
116
  <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
117
- | [<img src="https://avatars.githubusercontent.com/u/1282980?v=3" width="100px;"/><br /><sub>Ben Briggs</sub>](http://beneb.info)<br />[💻](https://github.com/ben-eb/postcss-discard-unused/commits?author=ben-eb) [📖](https://github.com/ben-eb/postcss-discard-unused/commits?author=ben-eb) 👀 [⚠️](https://github.com/ben-eb/postcss-discard-unused/commits?author=ben-eb) | [<img src="https://avatars.githubusercontent.com/u/5635476?v=3" width="100px;"/><br /><sub>Bogdan Chadkin</sub>](https://github.com/TrySound)<br />[💻](https://github.com/ben-eb/postcss-discard-unused/commits?author=TrySound) [📖](https://github.com/ben-eb/postcss-discard-unused/commits?author=TrySound) 👀 [⚠️](https://github.com/ben-eb/postcss-discard-unused/commits?author=TrySound) | [<img src="https://avatars.githubusercontent.com/u/770675?v=3" width="100px;"/><br /><sub>Paweł Lesiecki</sub>](https://github.com/plesiecki)<br />[💻](https://github.com/ben-eb/postcss-discard-unused/commits?author=plesiecki) [⚠️](https://github.com/ben-eb/postcss-discard-unused/commits?author=plesiecki) |
118
- | :---: | :---: | :---: |
117
+ | [<img src="https://avatars.githubusercontent.com/u/1282980?v=3" width="100px;"/><br /><sub>Ben Briggs</sub>](http://beneb.info)<br />[💻](https://github.com/ben-eb/postcss-discard-unused/commits?author=ben-eb) [📖](https://github.com/ben-eb/postcss-discard-unused/commits?author=ben-eb) 👀 [⚠️](https://github.com/ben-eb/postcss-discard-unused/commits?author=ben-eb) | [<img src="https://avatars.githubusercontent.com/u/5635476?v=3" width="100px;"/><br /><sub>Bogdan Chadkin</sub>](https://github.com/TrySound)<br />[💻](https://github.com/ben-eb/postcss-discard-unused/commits?author=TrySound) [📖](https://github.com/ben-eb/postcss-discard-unused/commits?author=TrySound) 👀 [⚠️](https://github.com/ben-eb/postcss-discard-unused/commits?author=TrySound) | [<img src="https://avatars.githubusercontent.com/u/770675?v=3" width="100px;"/><br /><sub>Paweł Lesiecki</sub>](https://github.com/plesiecki)<br />[💻](https://github.com/ben-eb/postcss-discard-unused/commits?author=plesiecki) [⚠️](https://github.com/ben-eb/postcss-discard-unused/commits?author=plesiecki) | [<img src="https://avatars.githubusercontent.com/u/197928?v=3" width="100px;"/><br /><sub>Thomas McDonald</sub>](https://github.com/thomas-mcdonald)<br />[💻](https://github.com/ben-eb/postcss-discard-unused/commits?author=thomas-mcdonald) [⚠️](https://github.com/ben-eb/postcss-discard-unused/commits?author=thomas-mcdonald) |
118
+ | :---: | :---: | :---: | :---: |
119
119
  <!-- ALL-CONTRIBUTORS-LIST:END -->
120
120
 
121
121
  This project follows the [all-contributors] specification. Contributions of
package/dist/index.js CHANGED
@@ -90,7 +90,7 @@ function filterFont(_ref4) {
90
90
  return r.remove();
91
91
  }
92
92
  families.forEach(function (family) {
93
- if (!hasFont(family.value, values)) {
93
+ if (!hasFont(family.value.toLowerCase(), values)) {
94
94
  r.remove();
95
95
  }
96
96
  });
@@ -130,7 +130,7 @@ exports.default = (0, _postcss.plugin)('postcss-discard-unused', function (opts)
130
130
  counterStyleCache.values = addValues(counterStyleCache.values, node);
131
131
  }
132
132
  if (fontFace && node.parent.type === rule && /font(|-family)/.test(prop)) {
133
- fontCache.values = fontCache.values.concat(comma(node.value));
133
+ fontCache.values = fontCache.values.concat(comma(node.value.toLowerCase()));
134
134
  }
135
135
  if (keyframes && /animation/.test(prop)) {
136
136
  keyframesCache.values = addValues(keyframesCache.values, node);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-discard-unused",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "Discard unused counter styles, keyframes and fonts.",
5
5
  "main": "dist/index.js",
6
6
  "files": [