postcss-minify-params 5.0.1 → 5.0.2
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/dist/index.js +7 -5
- package/package.json +6 -8
- package/CHANGELOG.md +0 -78
package/dist/index.js
CHANGED
|
@@ -11,8 +11,6 @@ var _postcssValueParser = _interopRequireWildcard(require("postcss-value-parser"
|
|
|
11
11
|
|
|
12
12
|
var _alphanumSort = _interopRequireDefault(require("alphanum-sort"));
|
|
13
13
|
|
|
14
|
-
var _uniqs = _interopRequireDefault(require("uniqs"));
|
|
15
|
-
|
|
16
14
|
var _cssnanoUtils = require("cssnano-utils");
|
|
17
15
|
|
|
18
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -43,6 +41,12 @@ function removeNode(node) {
|
|
|
43
41
|
node.type = 'word';
|
|
44
42
|
}
|
|
45
43
|
|
|
44
|
+
function sortAndDedupe(items) {
|
|
45
|
+
return (0, _alphanumSort.default)([...new Set(items)], {
|
|
46
|
+
insensitive: true
|
|
47
|
+
}).join();
|
|
48
|
+
}
|
|
49
|
+
|
|
46
50
|
function transform(legacy, rule) {
|
|
47
51
|
const ruleName = rule.name.toLowerCase(); // We should re-arrange parameters only for `@media` and `@supports` at-rules
|
|
48
52
|
|
|
@@ -82,9 +86,7 @@ function transform(legacy, rule) {
|
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
}, true);
|
|
85
|
-
rule.params = (
|
|
86
|
-
insensitive: true
|
|
87
|
-
}).join();
|
|
89
|
+
rule.params = sortAndDedupe((0, _cssnanoUtils.getArguments)(params).map(split));
|
|
88
90
|
|
|
89
91
|
if (!rule.params.length) {
|
|
90
92
|
rule.raws.afterName = '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postcss-minify-params",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "Minify at-rule params with PostCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"postcss",
|
|
@@ -23,15 +23,14 @@
|
|
|
23
23
|
"homepage": "https://github.com/cssnano/cssnano",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"alphanum-sort": "^1.0.2",
|
|
26
|
-
"browserslist": "^4.16.
|
|
26
|
+
"browserslist": "^4.16.6",
|
|
27
27
|
"cssnano-utils": "^2.0.1",
|
|
28
|
-
"postcss-value-parser": "^4.1.0"
|
|
29
|
-
"uniqs": "^2.0.0"
|
|
28
|
+
"postcss-value-parser": "^4.1.0"
|
|
30
29
|
},
|
|
31
30
|
"scripts": {
|
|
32
|
-
"prebuild": "
|
|
31
|
+
"prebuild": "rimraf dist",
|
|
33
32
|
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"",
|
|
34
|
-
"
|
|
33
|
+
"prepare": "yarn build"
|
|
35
34
|
},
|
|
36
35
|
"engines": {
|
|
37
36
|
"node": "^10 || ^12 || >=14.0"
|
|
@@ -41,6 +40,5 @@
|
|
|
41
40
|
},
|
|
42
41
|
"peerDependencies": {
|
|
43
42
|
"postcss": "^8.2.15"
|
|
44
|
-
}
|
|
45
|
-
"gitHead": "28c247175032fa03f04911cde56ad82d74d211cc"
|
|
43
|
+
}
|
|
46
44
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [5.0.1](https://github.com/cssnano/cssnano/compare/postcss-minify-params@5.0.0...postcss-minify-params@5.0.1) (2021-05-19)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package postcss-minify-params
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# [5.0.0](https://github.com/cssnano/cssnano/compare/postcss-minify-params@5.0.0-rc.2...postcss-minify-params@5.0.0) (2021-04-06)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package postcss-minify-params
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# [5.0.0-rc.2](https://github.com/cssnano/cssnano/compare/postcss-minify-params@5.0.0-rc.1...postcss-minify-params@5.0.0-rc.2) (2021-03-15)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package postcss-minify-params
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
# [5.0.0-rc.1](https://github.com/cssnano/cssnano/compare/postcss-minify-params@5.0.0-rc.0...postcss-minify-params@5.0.0-rc.1) (2021-03-04)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package postcss-minify-params
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# 5.0.0-rc.0 (2021-02-19)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
### chore
|
|
42
|
-
|
|
43
|
-
* minimum require version of node is 10.13 ([#871](https://github.com/cssnano/cssnano/issues/871)) ([28bda24](https://github.com/cssnano/cssnano/commit/28bda243e32ce3ba89b3c358a5f78727b3732f11))
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
### Features
|
|
47
|
-
|
|
48
|
-
* migarete to PostCSS 8 ([#975](https://github.com/cssnano/cssnano/issues/975)) ([40b82dc](https://github.com/cssnano/cssnano/commit/40b82dca7f53ac02cd4fe62846dec79b898ccb49))
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### BREAKING CHANGES
|
|
52
|
-
|
|
53
|
-
* minimum supported `postcss` version is `8.2.1`
|
|
54
|
-
* minimum require version of node is 10.13
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
## 4.1.9 (2019-02-12)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
### Bug Fixes
|
|
62
|
-
|
|
63
|
-
* do not mangle `[@page](https://github.com/page) :first` rules ([#678](https://github.com/cssnano/cssnano/issues/678)) ([69aab0b](https://github.com/cssnano/cssnano/commit/69aab0b527198979e2232a57554cf888ad868231))
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
### Performance Improvements
|
|
67
|
-
|
|
68
|
-
* **postcss-minify-params:** increase perf ([e06a24e](https://github.com/cssnano/cssnano/commit/e06a24e44aae8935290b7bc05d9da51b99367d2b))
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
## 4.1.1 (2018-09-24)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
### Bug Fixes
|
|
76
|
-
|
|
77
|
-
* add `browserslist` to dependencies for `postcss-minify-params` ([#594](https://github.com/cssnano/cssnano/issues/594)) ([9d40806](https://github.com/cssnano/cssnano/commit/9d40806151026dcd2272dc22a76009b27224d512))
|
|
78
|
-
* **postcss-merge-longhand:** not mangle border output ([#555](https://github.com/cssnano/cssnano/issues/555)) ([9a70605](https://github.com/cssnano/cssnano/commit/9a706050b621e7795a9bf74eb7110b5c81804ffe)), closes [#553](https://github.com/cssnano/cssnano/issues/553) [#554](https://github.com/cssnano/cssnano/issues/554)
|