postcss 8.4.16 → 8.4.17

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.

Potentially problematic release.


This version of postcss might be problematic. Click here for more details.

package/lib/container.js CHANGED
@@ -176,16 +176,16 @@ class Container extends Node {
176
176
  }
177
177
 
178
178
  insertBefore(exist, add) {
179
- exist = this.index(exist)
180
-
179
+ let existIndex = this.index(exist)
181
180
  let type = exist === 0 ? 'prepend' : false
182
- let nodes = this.normalize(add, this.proxyOf.nodes[exist], type).reverse()
183
- for (let node of nodes) this.proxyOf.nodes.splice(exist, 0, node)
181
+ let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse()
182
+ existIndex = this.index(exist)
183
+ for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)
184
184
 
185
185
  let index
186
186
  for (let id in this.indexes) {
187
187
  index = this.indexes[id]
188
- if (exist <= index) {
188
+ if (existIndex <= index) {
189
189
  this.indexes[id] = index + nodes.length
190
190
  }
191
191
  }
@@ -196,15 +196,15 @@ class Container extends Node {
196
196
  }
197
197
 
198
198
  insertAfter(exist, add) {
199
- exist = this.index(exist)
200
-
201
- let nodes = this.normalize(add, this.proxyOf.nodes[exist]).reverse()
202
- for (let node of nodes) this.proxyOf.nodes.splice(exist + 1, 0, node)
199
+ let existIndex = this.index(exist)
200
+ let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()
201
+ existIndex = this.index(exist)
202
+ for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)
203
203
 
204
204
  let index
205
205
  for (let id in this.indexes) {
206
206
  index = this.indexes[id]
207
- if (exist < index) {
207
+ if (existIndex < index) {
208
208
  this.indexes[id] = index + nodes.length
209
209
  }
210
210
  }
package/lib/processor.js CHANGED
@@ -7,7 +7,7 @@ let Root = require('./root')
7
7
 
8
8
  class Processor {
9
9
  constructor(plugins = []) {
10
- this.version = '8.4.16'
10
+ this.version = '8.4.17'
11
11
  this.plugins = this.normalize(plugins)
12
12
  }
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss",
3
- "version": "8.4.16",
3
+ "version": "8.4.17",
4
4
  "description": "Tool for transforming styles with JS plugins",
5
5
  "engines": {
6
6
  "node": "^10 || ^12 || >=14"