postcss 8.5.2 → 8.5.4

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/result.js CHANGED
@@ -3,12 +3,16 @@
3
3
  let Warning = require('./warning')
4
4
 
5
5
  class Result {
6
+ get content() {
7
+ return this.css
8
+ }
9
+
6
10
  constructor(processor, root, opts) {
7
11
  this.processor = processor
8
12
  this.messages = []
9
13
  this.root = root
10
14
  this.opts = opts
11
- this.css = undefined
15
+ this.css = ''
12
16
  this.map = undefined
13
17
  }
14
18
 
@@ -32,10 +36,6 @@ class Result {
32
36
  warnings() {
33
37
  return this.messages.filter(i => i.type === 'warning')
34
38
  }
35
-
36
- get content() {
37
- return this.css
38
- }
39
39
  }
40
40
 
41
41
  module.exports = Result
package/lib/rule.d.ts CHANGED
@@ -83,14 +83,6 @@ declare class Rule_ extends Container {
83
83
  parent: ContainerWithChildren | undefined
84
84
  raws: Rule.RuleRaws
85
85
  type: 'rule'
86
- constructor(defaults?: Rule.RuleProps)
87
-
88
- assign(overrides: object | Rule.RuleProps): this
89
- clone(overrides?: Partial<Rule.RuleProps>): this
90
-
91
- cloneAfter(overrides?: Partial<Rule.RuleProps>): this
92
-
93
- cloneBefore(overrides?: Partial<Rule.RuleProps>): this
94
86
  /**
95
87
  * The rule’s full selector represented as a string.
96
88
  *
@@ -101,6 +93,7 @@ declare class Rule_ extends Container {
101
93
  * ```
102
94
  */
103
95
  get selector(): string
96
+
104
97
  set selector(value: string)
105
98
  /**
106
99
  * An array containing the rule’s individual selectors.
@@ -118,7 +111,14 @@ declare class Rule_ extends Container {
118
111
  * ```
119
112
  */
120
113
  get selectors(): string[]
114
+
121
115
  set selectors(values: string[])
116
+
117
+ constructor(defaults?: Rule.RuleProps)
118
+ assign(overrides: object | Rule.RuleProps): this
119
+ clone(overrides?: Partial<Rule.RuleProps>): this
120
+ cloneAfter(overrides?: Partial<Rule.RuleProps>): this
121
+ cloneBefore(overrides?: Partial<Rule.RuleProps>): this
122
122
  }
123
123
 
124
124
  declare class Rule extends Rule_ {}
package/lib/rule.js CHANGED
@@ -4,12 +4,6 @@ let Container = require('./container')
4
4
  let list = require('./list')
5
5
 
6
6
  class Rule extends Container {
7
- constructor(defaults) {
8
- super(defaults)
9
- this.type = 'rule'
10
- if (!this.nodes) this.nodes = []
11
- }
12
-
13
7
  get selectors() {
14
8
  return list.comma(this.selector)
15
9
  }
@@ -19,6 +13,12 @@ class Rule extends Container {
19
13
  let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')
20
14
  this.selector = values.join(sep)
21
15
  }
16
+
17
+ constructor(defaults) {
18
+ super(defaults)
19
+ this.type = 'rule'
20
+ if (!this.nodes) this.nodes = []
21
+ }
22
22
  }
23
23
 
24
24
  module.exports = Rule
@@ -25,7 +25,7 @@ declare class Stringifier_ {
25
25
  comment(node: Comment): void
26
26
  decl(node: Declaration, semicolon?: boolean): void
27
27
  document(node: Document): void
28
- raw(node: AnyNode, own: null | string, detect?: string): string
28
+ raw(node: AnyNode, own: null | string, detect?: string): boolean | string
29
29
  rawBeforeClose(root: Root): string | undefined
30
30
  rawBeforeComment(root: Root, node: Comment): string | undefined
31
31
  rawBeforeDecl(root: Root, node: Declaration): string | undefined
@@ -35,7 +35,7 @@ declare class Stringifier_ {
35
35
  rawEmptyBody(root: Root): string | undefined
36
36
  rawIndent(root: Root): string | undefined
37
37
  rawSemicolon(root: Root): boolean | undefined
38
- rawValue(node: AnyNode, prop: string): string
38
+ rawValue(node: AnyNode, prop: string): number | string
39
39
  root(node: Root): void
40
40
  rule(node: Rule): void
41
41
  stringify(node: AnyNode, semicolon?: boolean): void
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss",
3
- "version": "8.5.2",
3
+ "version": "8.5.4",
4
4
  "description": "Tool for transforming styles with JS plugins",
5
5
  "engines": {
6
6
  "node": "^10 || ^12 || >=14"
@@ -74,7 +74,7 @@
74
74
  "url": "https://github.com/postcss/postcss/issues"
75
75
  },
76
76
  "dependencies": {
77
- "nanoid": "^3.3.8",
77
+ "nanoid": "^3.3.11",
78
78
  "picocolors": "^1.1.1",
79
79
  "source-map-js": "^1.2.1"
80
80
  },