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/README.md +1 -1
- package/lib/at-rule.d.ts +9 -9
- package/lib/comment.d.ts +7 -7
- package/lib/container.d.ts +45 -48
- package/lib/container.js +10 -10
- package/lib/declaration.d.ts +9 -9
- package/lib/declaration.js +4 -4
- package/lib/input.d.ts +38 -19
- package/lib/input.js +40 -26
- package/lib/lazy-result.d.ts +40 -40
- package/lib/lazy-result.js +32 -32
- package/lib/no-work-result.d.ts +5 -5
- package/lib/no-work-result.js +50 -50
- package/lib/node.d.ts +25 -10
- package/lib/node.js +46 -31
- package/lib/parser.js +1 -1
- package/lib/postcss.d.mts +33 -33
- package/lib/processor.js +1 -1
- package/lib/result.d.ts +10 -10
- package/lib/result.js +5 -5
- package/lib/rule.d.ts +8 -8
- package/lib/rule.js +6 -6
- package/lib/stringifier.d.ts +2 -2
- package/package.json +2 -2
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 =
|
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
|
package/lib/stringifier.d.ts
CHANGED
@@ -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.
|
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.
|
77
|
+
"nanoid": "^3.3.11",
|
78
78
|
"picocolors": "^1.1.1",
|
79
79
|
"source-map-js": "^1.2.1"
|
80
80
|
},
|