postcss-merge-idents 8.0.2 → 8.0.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.
Files changed (2) hide show
  1. package/package.json +7 -4
  2. package/src/index.js +9 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-merge-idents",
3
- "version": "8.0.2",
3
+ "version": "8.0.3",
4
4
  "description": "Merge keyframe and counter style identifiers.",
5
5
  "exports": {
6
6
  ".": {
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "postcss-value-parser": "^4.2.0",
39
- "cssnano-utils": "^6.0.2"
39
+ "cssnano-utils": "^6.0.3"
40
40
  },
41
41
  "bugs": {
42
42
  "url": "https://github.com/cssnano/cssnano/issues"
@@ -45,9 +45,12 @@
45
45
  "node": "^22.11.0 || ^24.11.0 || >=26.0"
46
46
  },
47
47
  "devDependencies": {
48
- "postcss": "^8.5.25"
48
+ "postcss": "^8.5.26"
49
49
  },
50
50
  "peerDependencies": {
51
- "postcss": "^8.5.25"
51
+ "postcss": "^8.5.26"
52
+ },
53
+ "scripts": {
54
+ "test": "node --test"
52
55
  }
53
56
  }
package/src/index.js CHANGED
@@ -79,7 +79,7 @@ function mergeAtRules(css) {
79
79
  } else {
80
80
  const toString = node.nodes ? node.nodes.toString() : '';
81
81
 
82
- relevant.cache.forEach((cached) => {
82
+ for (const cached of relevant.cache) {
83
83
  const cachedStringContent = cached.nodes
84
84
  ? cached.nodes.toString()
85
85
  : '';
@@ -94,7 +94,7 @@ function mergeAtRules(css) {
94
94
  relevant.removals.push(cached);
95
95
  relevant.replacements[cached.params] = node.params;
96
96
  }
97
- });
97
+ }
98
98
 
99
99
  relevant.cache.push(node);
100
100
 
@@ -115,10 +115,10 @@ function mergeAtRules(css) {
115
115
  }
116
116
  });
117
117
 
118
- pairs.forEach((pair) => {
118
+ for (const pair of pairs) {
119
119
  const canon = canonical(pair.replacements);
120
120
 
121
- pair.decls.forEach((decl) => {
121
+ for (const decl of pair.decls) {
122
122
  decl.value = valueParser(decl.value)
123
123
  .walk((node) => {
124
124
  if (node.type === 'word') {
@@ -126,9 +126,11 @@ function mergeAtRules(css) {
126
126
  }
127
127
  })
128
128
  .toString();
129
- });
130
- pair.removals.forEach((cached) => cached.remove());
131
- });
129
+ }
130
+ for (const cached of pair.removals) {
131
+ cached.remove();
132
+ }
133
+ }
132
134
  }
133
135
 
134
136
  /**