postcss 8.4.33 → 8.4.34

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/at-rule.d.ts CHANGED
@@ -81,11 +81,30 @@ declare class AtRule_ extends Container {
81
81
  *
82
82
  * ```js
83
83
  * const root = postcss.parse('@media print {}')
84
- * media.name //=> 'media'
85
84
  * const media = root.first
85
+ * media.name //=> 'media'
86
86
  * ```
87
87
  */
88
88
  name: string
89
+ /**
90
+ * An array containing the layer’s children.
91
+ *
92
+ * ```js
93
+ * const root = postcss.parse('@layer example { a { color: black } }')
94
+ * const layer = root.first
95
+ * layer.nodes.length //=> 1
96
+ * layer.nodes[0].selector //=> 'a'
97
+ * ```
98
+ *
99
+ * Can be `undefinded` if the at-rule has no body.
100
+ *
101
+ * ```js
102
+ * const root = postcss.parse('@layer a, b, c;')
103
+ * const layer = root.first
104
+ * layer.nodes //=> undefined
105
+ * ```
106
+ */
107
+ nodes: Container['nodes']
89
108
  /**
90
109
  * The at-rule’s parameters, the values that follow the at-rule’s name
91
110
  * but precede any `{}` block.
@@ -43,7 +43,7 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
43
43
  * root.nodes[0].nodes[0].prop //=> 'color'
44
44
  * ```
45
45
  */
46
- nodes: Child[]
46
+ nodes: Child[] | undefined
47
47
 
48
48
  /**
49
49
  * Inserts new nodes to the end of the container.
package/lib/document.d.ts CHANGED
@@ -35,6 +35,7 @@ declare namespace Document {
35
35
  * ```
36
36
  */
37
37
  declare class Document_ extends Container<Root> {
38
+ nodes: Root[]
38
39
  parent: undefined
39
40
  type: 'document'
40
41
 
@@ -52,7 +52,7 @@ class MapGenerator {
52
52
  if (this.mapOpts.sourcesContent === false) {
53
53
  map = new SourceMapConsumer(prev.text)
54
54
  if (map.sourcesContent) {
55
- map.sourcesContent = map.sourcesContent.map(() => null)
55
+ map.sourcesContent = null
56
56
  }
57
57
  } else {
58
58
  map = prev.consumer()
@@ -38,8 +38,8 @@ class NoWorkResult {
38
38
  this.result.map = generatedMap
39
39
  }
40
40
  } else {
41
- map.clearAnnotation();
42
- this.result.css = map.css;
41
+ map.clearAnnotation()
42
+ this.result.css = map.css
43
43
  }
44
44
  }
45
45
 
package/lib/parser.js CHANGED
@@ -28,7 +28,6 @@ class Parser {
28
28
  this.current = this.root
29
29
  this.spaces = ''
30
30
  this.semicolon = false
31
- this.customProperty = false
32
31
 
33
32
  this.createTokenizer()
34
33
  this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }
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.33'
10
+ this.version = '8.4.34'
11
11
  this.plugins = this.normalize(plugins)
12
12
  }
13
13
 
package/lib/root.d.ts CHANGED
@@ -54,6 +54,7 @@ declare namespace Root {
54
54
  * ```
55
55
  */
56
56
  declare class Root_ extends Container {
57
+ nodes: NonNullable<Container['nodes']>
57
58
  parent: Document | undefined
58
59
  raws: Root.RootRaws
59
60
  type: 'root'
package/lib/rule.d.ts CHANGED
@@ -69,6 +69,7 @@ declare namespace Rule {
69
69
  * ```
70
70
  */
71
71
  declare class Rule_ extends Container {
72
+ nodes: NonNullable<Container['nodes']>
72
73
  parent: Container | undefined
73
74
  raws: Rule.RuleRaws
74
75
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss",
3
- "version": "8.4.33",
3
+ "version": "8.4.34",
4
4
  "description": "Tool for transforming styles with JS plugins",
5
5
  "engines": {
6
6
  "node": "^10 || ^12 || >=14"