postcss 8.5.12 → 8.5.14

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.
@@ -379,7 +379,10 @@ class LazyResult {
379
379
  if (str.stringify) str = str.stringify
380
380
 
381
381
  let rootSource = this.result.root.source
382
- if (opts.map === undefined && !(rootSource && rootSource.input && rootSource.input.map)) {
382
+ if (
383
+ opts.map === undefined &&
384
+ !(rootSource && rootSource.input && rootSource.input.map)
385
+ ) {
383
386
  let result = ''
384
387
  str(this.result.root, i => {
385
388
  result += i
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.5.12'
10
+ this.version = '8.5.14'
11
11
  this.plugins = this.normalize(plugins)
12
12
  }
13
13
 
@@ -85,22 +85,15 @@ class Stringifier {
85
85
  }
86
86
 
87
87
  block(node, start) {
88
- let raws = node.raws
89
- let between = typeof raws.between !== 'undefined'
90
- ? raws.between
91
- : this.raw(node, 'between', 'beforeOpen')
88
+ let between = this.raw(node, 'between', 'beforeOpen')
92
89
  this.builder(escapeHTMLInCSS(start + between) + '{', node, 'start')
93
90
 
94
91
  let after
95
92
  if (node.nodes && node.nodes.length) {
96
93
  this.body(node)
97
- after = typeof raws.after !== 'undefined'
98
- ? raws.after
99
- : this.raw(node, 'after')
94
+ after = this.raw(node, 'after')
100
95
  } else {
101
- after = typeof raws.after !== 'undefined'
102
- ? raws.after
103
- : this.raw(node, 'after', 'emptyBody')
96
+ after = this.raw(node, 'after', 'emptyBody')
104
97
  }
105
98
 
106
99
  if (after) this.builder(escapeHTMLInCSS(after))
@@ -119,36 +112,23 @@ class Stringifier {
119
112
  let isDocument = node.type === 'document'
120
113
  for (let i = 0; i < nodes.length; i++) {
121
114
  let child = nodes[i]
122
- let before = child.raws.before
123
- if (typeof before === 'undefined') {
124
- before = this.raw(child, 'before')
125
- }
115
+ let before = this.raw(child, 'before')
126
116
  if (before) this.builder(isDocument ? before : escapeHTMLInCSS(before))
127
117
  this.stringify(child, last !== i || semicolon)
128
118
  }
129
119
  }
130
120
 
131
121
  comment(node) {
132
- let raws = node.raws
133
- let left = typeof raws.left !== 'undefined'
134
- ? raws.left
135
- : this.raw(node, 'left', 'commentLeft')
136
- let right = typeof raws.right !== 'undefined'
137
- ? raws.right
138
- : this.raw(node, 'right', 'commentRight')
122
+ let left = this.raw(node, 'left', 'commentLeft')
123
+ let right = this.raw(node, 'right', 'commentRight')
139
124
  this.builder(escapeHTMLInCSS('/*' + left + node.text + right + '*/'), node)
140
125
  }
141
126
 
142
127
  decl(node, semicolon) {
143
128
  let raws = node.raws
144
- let between = typeof raws.between !== 'undefined'
145
- ? raws.between
146
- : this.raw(node, 'between', 'colon')
147
-
148
- let rawVal = raws.value
149
- let value = rawVal && rawVal.value === node.value ? rawVal.raw : node.value
129
+ let between = this.raw(node, 'between', 'colon')
150
130
 
151
- let string = node.prop + between + value
131
+ let string = node.prop + between + this.rawValue(node, 'value')
152
132
 
153
133
  if (node.important) {
154
134
  string += raws.important || ' !important'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss",
3
- "version": "8.5.12",
3
+ "version": "8.5.14",
4
4
  "description": "Tool for transforming styles with JS plugins",
5
5
  "keywords": [
6
6
  "css",