postcss 8.4.43 → 8.4.45
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/lib/container.js +1 -1
- package/lib/lazy-result.js +5 -5
- package/lib/node.js +12 -8
- package/lib/processor.js +1 -1
- package/package.json +1 -1
package/lib/container.js
CHANGED
@@ -210,7 +210,7 @@ class Container extends Node {
|
|
210
210
|
|
211
211
|
let processed = nodes.map(i => {
|
212
212
|
/* c8 ignore next */
|
213
|
-
if (!i[my]
|
213
|
+
if (!i[my]) Container.rebuild(i)
|
214
214
|
i = i.proxyOf
|
215
215
|
if (i.parent) i.parent.removeChild(i)
|
216
216
|
if (i[isClean]) markTreeDirty(i)
|
package/lib/lazy-result.js
CHANGED
@@ -269,7 +269,7 @@ class LazyResult {
|
|
269
269
|
if (this.hasListener) {
|
270
270
|
let root = this.result.root
|
271
271
|
while (!root[isClean]) {
|
272
|
-
root
|
272
|
+
root[isClean] = true
|
273
273
|
let stack = [toStack(root)]
|
274
274
|
while (stack.length > 0) {
|
275
275
|
let promise = this.visitTick(stack)
|
@@ -374,7 +374,7 @@ class LazyResult {
|
|
374
374
|
if (this.hasListener) {
|
375
375
|
let root = this.result.root
|
376
376
|
while (!root[isClean]) {
|
377
|
-
root
|
377
|
+
root[isClean] = true
|
378
378
|
this.walkSync(root)
|
379
379
|
}
|
380
380
|
if (this.listeners.OnceExit) {
|
@@ -456,7 +456,7 @@ class LazyResult {
|
|
456
456
|
while ((child = node.nodes[node.indexes[iterator]])) {
|
457
457
|
node.indexes[iterator] += 1
|
458
458
|
if (!child[isClean]) {
|
459
|
-
child
|
459
|
+
child[isClean] = true
|
460
460
|
stack.push(toStack(child))
|
461
461
|
return
|
462
462
|
}
|
@@ -471,7 +471,7 @@ class LazyResult {
|
|
471
471
|
visit.eventIndex += 1
|
472
472
|
if (event === CHILDREN) {
|
473
473
|
if (node.nodes && node.nodes.length) {
|
474
|
-
node
|
474
|
+
node[isClean] = true
|
475
475
|
visit.iterator = node.getIterator()
|
476
476
|
}
|
477
477
|
return
|
@@ -484,7 +484,7 @@ class LazyResult {
|
|
484
484
|
}
|
485
485
|
|
486
486
|
walkSync(node) {
|
487
|
-
node
|
487
|
+
node[isClean] = true
|
488
488
|
let events = getEvents(node)
|
489
489
|
for (let event of events) {
|
490
490
|
if (event === CHILDREN) {
|
package/lib/node.js
CHANGED
@@ -153,8 +153,9 @@ class Node {
|
|
153
153
|
}
|
154
154
|
}
|
155
155
|
|
156
|
+
/* c8 ignore next 3 */
|
156
157
|
markClean() {
|
157
|
-
this[isClean] = true
|
158
|
+
this[isClean] = true
|
158
159
|
}
|
159
160
|
|
160
161
|
markDirty() {
|
@@ -215,20 +216,23 @@ class Node {
|
|
215
216
|
}
|
216
217
|
let end = this.source.end
|
217
218
|
? {
|
218
|
-
|
219
|
-
|
220
|
-
|
219
|
+
column: this.source.end.column + 1,
|
220
|
+
line: this.source.end.line
|
221
|
+
}
|
221
222
|
: {
|
222
|
-
|
223
|
-
|
224
|
-
|
223
|
+
column: start.column + 1,
|
224
|
+
line: start.line
|
225
|
+
}
|
225
226
|
|
226
227
|
if (opts.word) {
|
227
228
|
let stringRepresentation = this.toString()
|
228
229
|
let index = stringRepresentation.indexOf(opts.word)
|
229
230
|
if (index !== -1) {
|
230
231
|
start = this.positionInside(index, stringRepresentation)
|
231
|
-
end = this.positionInside(
|
232
|
+
end = this.positionInside(
|
233
|
+
index + opts.word.length,
|
234
|
+
stringRepresentation
|
235
|
+
)
|
232
236
|
}
|
233
237
|
} else {
|
234
238
|
if (opts.start) {
|
package/lib/processor.js
CHANGED