postcss 8.0.8 → 8.0.9
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/CHANGELOG.md +5 -1
- package/lib/container.js +10 -17
- package/lib/postcss.d.ts +1 -1
- package/lib/processor.d.ts +1 -0
- package/lib/processor.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
3
3
|
|
4
|
+
## 8.0.9
|
5
|
+
* Replace prototype in PostCSS 7 nodes instead of recreating them.
|
6
|
+
* Added missed `Transformer` to exported types (by Pierre-Marie Dartus).
|
7
|
+
|
4
8
|
## 8.0.8
|
5
|
-
* Fix `8.0.7` regression on PostCSS 7 nodes converting.
|
9
|
+
* Fix `8.0.7` regression on PostCSS 7 nodes converting (by Adam Wathan).
|
6
10
|
|
7
11
|
## 8.0.7
|
8
12
|
* Fixed compatibility issue with mixin AST with PostCSS 7 and 8 nodes.
|
package/lib/container.js
CHANGED
@@ -26,29 +26,22 @@ function markDirtyUp (node) {
|
|
26
26
|
}
|
27
27
|
|
28
28
|
// istanbul ignore next
|
29
|
-
function rebuild (node
|
30
|
-
let fix
|
29
|
+
function rebuild (node) {
|
31
30
|
if (node.type === 'atrule') {
|
32
|
-
|
31
|
+
Object.setPrototypeOf(node, AtRule.prototype)
|
33
32
|
} else if (node.type === 'rule') {
|
34
|
-
|
33
|
+
Object.setPrototypeOf(node, Rule.prototype)
|
35
34
|
} else if (node.type === 'decl') {
|
36
|
-
|
35
|
+
Object.setPrototypeOf(node, Declaration.prototype)
|
37
36
|
} else if (node.type === 'comment') {
|
38
|
-
|
37
|
+
Object.setPrototypeOf(node, Comment.prototype)
|
39
38
|
}
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
}
|
45
|
-
fix.parent = parent
|
46
|
-
} else if (Object.prototype.hasOwnProperty.call(node, i)) {
|
47
|
-
fix[i] = node[i]
|
48
|
-
}
|
40
|
+
if (node.nodes) {
|
41
|
+
node.nodes.forEach(child => {
|
42
|
+
rebuild(child)
|
43
|
+
})
|
49
44
|
}
|
50
|
-
|
51
|
-
return fix
|
52
45
|
}
|
53
46
|
|
54
47
|
class Container extends Node {
|
@@ -344,7 +337,7 @@ class Container extends Node {
|
|
344
337
|
|
345
338
|
let processed = nodes.map(i => {
|
346
339
|
// istanbul ignore next
|
347
|
-
if (typeof i.markDirty !== 'function')
|
340
|
+
if (typeof i.markDirty !== 'function') rebuild(i)
|
348
341
|
if (i.parent) i.parent.removeChild(i)
|
349
342
|
if (i[isClean]) markDirtyUp(i)
|
350
343
|
if (typeof i.raws.before === 'undefined') {
|
package/lib/postcss.d.ts
CHANGED
package/lib/processor.d.ts
CHANGED
package/lib/processor.js
CHANGED