postcss-merge-rules 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 +8 -8
- package/package.json +3 -3
- package/CHANGELOG.md +0 -87
package/dist/index.js
CHANGED
|
@@ -232,24 +232,24 @@ function partialMerge(first, second) {
|
|
|
232
232
|
const firstDecls = getDecls(first); // Filter out intersections with later conflicts in First
|
|
233
233
|
|
|
234
234
|
intersection = intersection.filter((decl, intersectIndex) => {
|
|
235
|
-
const
|
|
236
|
-
const nextConflictInFirst = firstDecls.slice(
|
|
235
|
+
const indexOfDecl = indexOfDeclaration(firstDecls, decl);
|
|
236
|
+
const nextConflictInFirst = firstDecls.slice(indexOfDecl + 1).filter(d => isConflictingProp(d.prop, decl.prop));
|
|
237
237
|
|
|
238
|
-
if (!nextConflictInFirst) {
|
|
238
|
+
if (!nextConflictInFirst.length) {
|
|
239
239
|
return true;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
const nextConflictInIntersection = intersection.slice(intersectIndex + 1).
|
|
242
|
+
const nextConflictInIntersection = intersection.slice(intersectIndex + 1).filter(d => isConflictingProp(d.prop, decl.prop));
|
|
243
243
|
|
|
244
|
-
if (!nextConflictInIntersection) {
|
|
244
|
+
if (!nextConflictInIntersection.length) {
|
|
245
245
|
return false;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
if (
|
|
249
|
-
return
|
|
248
|
+
if (nextConflictInFirst.length !== nextConflictInIntersection.length) {
|
|
249
|
+
return false;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
return
|
|
252
|
+
return nextConflictInFirst.every((d, index) => declarationIsEqual(d, nextConflictInIntersection[index]));
|
|
253
253
|
}); // Filter out intersections with previous conflicts in Second
|
|
254
254
|
|
|
255
255
|
const secondDecls = getDecls(second);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postcss-merge-rules",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "Merge CSS rules with PostCSS.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"repository": "cssnano/cssnano",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"browserslist": "^4.16.
|
|
30
|
+
"browserslist": "^4.16.6",
|
|
31
31
|
"caniuse-api": "^3.0.0",
|
|
32
32
|
"cssnano-utils": "^2.0.1",
|
|
33
33
|
"postcss-selector-parser": "^6.0.5",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"postcss": "^8.2.15"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "9b3c54fd94f3e2bdb503d1e21f171d7fe02f33ca"
|
|
49
49
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,87 +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-merge-rules@5.0.0...postcss-merge-rules@5.0.1) (2021-05-19)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* **postcss-merge-rules:** add some missing known pseudo classes. ([#1099](https://github.com/cssnano/cssnano/issues/1099)) ([4d7fe36](https://github.com/cssnano/cssnano/commit/4d7fe367bebab86c7b5664ed4621ee7586ca7d86))
|
|
12
|
-
* **postcss-merge-rules:** prevent breaking rule merges ([#1072](https://github.com/cssnano/cssnano/issues/1072)) ([c5e0a5e](https://github.com/cssnano/cssnano/commit/c5e0a5eac171089ae994fcba21d9c565fb462577)), closes [#999](https://github.com/cssnano/cssnano/issues/999)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# [5.0.0](https://github.com/cssnano/cssnano/compare/postcss-merge-rules@5.0.0-rc.2...postcss-merge-rules@5.0.0) (2021-04-06)
|
|
19
|
-
|
|
20
|
-
**Note:** Version bump only for package postcss-merge-rules
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# [5.0.0-rc.2](https://github.com/cssnano/cssnano/compare/postcss-merge-rules@5.0.0-rc.1...postcss-merge-rules@5.0.0-rc.2) (2021-03-15)
|
|
27
|
-
|
|
28
|
-
**Note:** Version bump only for package postcss-merge-rules
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
# [5.0.0-rc.1](https://github.com/cssnano/cssnano/compare/postcss-merge-rules@5.0.0-rc.0...postcss-merge-rules@5.0.0-rc.1) (2021-03-04)
|
|
35
|
-
|
|
36
|
-
**Note:** Version bump only for package postcss-merge-rules
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
# 5.0.0-rc.0 (2021-02-19)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
### Bug Fixes
|
|
46
|
-
|
|
47
|
-
* don't unsafe merge 'all' declaration ([#872](https://github.com/cssnano/cssnano/issues/872)) ([6ea9e5d](https://github.com/cssnano/cssnano/commit/6ea9e5dcad2d8ea22be7209332ee29d352c807de))
|
|
48
|
-
* focus-visible issue ([#882](https://github.com/cssnano/cssnano/issues/882)) ([4cfcaaf](https://github.com/cssnano/cssnano/commit/4cfcaaf25b162ec2b0308907a408d7dba6a354c3))
|
|
49
|
-
* **merge-rules, merge-idents:** add support for nested at-rules ([#719](https://github.com/cssnano/cssnano/issues/719)) ([cdedda7](https://github.com/cssnano/cssnano/commit/cdedda7f9d67873d872add044ad34c91616579f3))
|
|
50
|
-
* **postcss-merge-rules:** don't change specificity of prefixed properties ([#723](https://github.com/cssnano/cssnano/issues/723)) ([863cf2b](https://github.com/cssnano/cssnano/commit/863cf2b3470d3172523a3165dc368abcfa18809c))
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
### chore
|
|
54
|
-
|
|
55
|
-
* minimum require version of node is 10.13 ([#871](https://github.com/cssnano/cssnano/issues/871)) ([28bda24](https://github.com/cssnano/cssnano/commit/28bda243e32ce3ba89b3c358a5f78727b3732f11))
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
### Features
|
|
59
|
-
|
|
60
|
-
* migarete to PostCSS 8 ([#975](https://github.com/cssnano/cssnano/issues/975)) ([40b82dc](https://github.com/cssnano/cssnano/commit/40b82dca7f53ac02cd4fe62846dec79b898ccb49))
|
|
61
|
-
* **postcss-merge-rules:** merge at-rules ([#722](https://github.com/cssnano/cssnano/issues/722)) ([8d4610a](https://github.com/cssnano/cssnano/commit/8d4610a6391ddab29bcb08ef0522d0b7ce2d6582))
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
### BREAKING CHANGES
|
|
65
|
-
|
|
66
|
-
* minimum supported `postcss` version is `8.2.1`
|
|
67
|
-
* minimum require version of node is 10.13
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
## 4.1.9 (2019-02-12)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
### Performance Improvements
|
|
75
|
-
|
|
76
|
-
* **postcss-merge-rules:** increase perf ([#681](https://github.com/cssnano/cssnano/issues/681)) ([35bad2b](https://github.com/cssnano/cssnano/commit/35bad2b70fca5390c88eaabc24c25bb8d28b2f95))
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
## 4.1.1 (2018-09-24)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
### Bug Fixes
|
|
84
|
-
|
|
85
|
-
* handle uppercase `all` property in merge rules ([#611](https://github.com/cssnano/cssnano/issues/611)) ([0dfe335](https://github.com/cssnano/cssnano/commit/0dfe3355951fa4a080a04dca34c6d99420def7ac))
|
|
86
|
-
* merge same atrules with difference case ([#605](https://github.com/cssnano/cssnano/issues/605)) ([ca350fd](https://github.com/cssnano/cssnano/commit/ca350fda779bab5ca2eadf70299d92f8e495a273))
|
|
87
|
-
* **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)
|