postcss-merge-rules 5.0.4 → 5.0.5

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 CHANGED
@@ -83,7 +83,7 @@ function canMerge(ruleA, ruleB, browsers, compatibilityCache) {
83
83
  name
84
84
  } = ruleA.parent;
85
85
 
86
- if (parent && name && ~name.indexOf('keyframes')) {
86
+ if (parent && name && name.includes('keyframes')) {
87
87
  return false;
88
88
  }
89
89
 
@@ -174,11 +174,11 @@ function ensureCompatibility(selectors, browsers, compatibilityCache) {
174
174
  }
175
175
 
176
176
  if (type === 'combinator') {
177
- if (~value.indexOf('~')) {
177
+ if (value.includes('~')) {
178
178
  compatible = isSupportedCached(cssSel3, browsers);
179
179
  }
180
180
 
181
- if (~value.indexOf('>') || ~value.indexOf('+')) {
181
+ if (value.includes('>') || value.includes('+')) {
182
182
  compatible = isSupportedCached(cssSel2, browsers);
183
183
  }
184
184
  }
@@ -191,12 +191,12 @@ function ensureCompatibility(selectors, browsers, compatibilityCache) {
191
191
 
192
192
  if (value) {
193
193
  // [foo="bar"], [foo~="bar"], [foo|="bar"]
194
- if (~['=', '~=', '|='].indexOf(node.operator)) {
194
+ if (['=', '~=', '|='].includes(node.operator)) {
195
195
  compatible = isSupportedCached(cssSel2, browsers);
196
196
  } // [foo^="bar"], [foo$="bar"], [foo*="bar"]
197
197
 
198
198
 
199
- if (~['^=', '$=', '*='].indexOf(node.operator)) {
199
+ if (['^=', '$=', '*='].includes(node.operator)) {
200
200
  compatible = isSupportedCached(cssSel3, browsers);
201
201
  }
202
202
  } // [foo="bar" i]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-merge-rules",
3
- "version": "5.0.4",
3
+ "version": "5.0.5",
4
4
  "description": "Merge CSS rules with PostCSS.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "browserslist": "^4.16.6",
26
26
  "caniuse-api": "^3.0.0",
27
- "cssnano-utils": "^3.0.0",
27
+ "cssnano-utils": "^3.0.1",
28
28
  "postcss-selector-parser": "^6.0.5"
29
29
  },
30
30
  "bugs": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "postcss": "^8.2.15",
38
- "postcss-discard-comments": "^5.0.1"
38
+ "postcss-discard-comments": "^5.0.2"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "postcss": "^8.2.15"