postcss 8.5.6 → 8.5.8

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
@@ -49,7 +49,7 @@ declare namespace AtRule {
49
49
  raws?: AtRuleRaws
50
50
  }
51
51
 
52
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
52
+
53
53
  export { AtRule_ as default }
54
54
  }
55
55
 
package/lib/comment.d.ts CHANGED
@@ -26,7 +26,7 @@ declare namespace Comment {
26
26
  text: string
27
27
  }
28
28
 
29
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
29
+
30
30
  export { Comment_ as default }
31
31
  }
32
32
 
@@ -43,7 +43,7 @@ declare namespace Container {
43
43
  | string
44
44
  | undefined
45
45
 
46
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
46
+
47
47
  export { Container_ as default }
48
48
  }
49
49
 
@@ -16,7 +16,7 @@ declare namespace CssSyntaxError {
16
16
  line: number
17
17
  }
18
18
 
19
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
19
+
20
20
  export { CssSyntaxError_ as default }
21
21
  }
22
22
 
@@ -39,7 +39,7 @@ declare namespace Declaration {
39
39
  value: string
40
40
  }
41
41
 
42
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
42
+
43
43
  export { Declaration_ as default }
44
44
  }
45
45
 
package/lib/document.d.ts CHANGED
@@ -16,7 +16,7 @@ declare namespace Document {
16
16
  raws?: Record<string, any>
17
17
  }
18
18
 
19
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
19
+
20
20
  export { Document_ as default }
21
21
  }
22
22
 
package/lib/input.d.ts CHANGED
@@ -49,7 +49,7 @@ declare namespace Input {
49
49
  url: string
50
50
  }
51
51
 
52
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
52
+
53
53
  export { Input_ as default }
54
54
  }
55
55
 
@@ -6,7 +6,7 @@ import Root from './root.js'
6
6
  import Warning from './warning.js'
7
7
 
8
8
  declare namespace LazyResult {
9
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
9
+
10
10
  export { LazyResult_ as default }
11
11
  }
12
12
 
@@ -75,7 +75,15 @@ class MapGenerator {
75
75
  }
76
76
  }
77
77
  } else if (this.css) {
78
- this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, '')
78
+ let startIndex
79
+ while ((startIndex = this.css.lastIndexOf('/*#')) !== -1) {
80
+ let endIndex = this.css.indexOf('*/', startIndex + 3)
81
+ if (endIndex === -1) break
82
+ while (startIndex > 0 && this.css[startIndex - 1] === '\n') {
83
+ startIndex--
84
+ }
85
+ this.css = this.css.slice(0, startIndex) + this.css.slice(endIndex + 2)
86
+ }
79
87
  }
80
88
  }
81
89
 
@@ -6,7 +6,7 @@ import Root from './root.js'
6
6
  import Warning from './warning.js'
7
7
 
8
8
  declare namespace NoWorkResult {
9
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
9
+
10
10
  export { NoWorkResult_ as default }
11
11
  }
12
12
 
@@ -65,10 +65,9 @@ class NoWorkResult {
65
65
  this._css = css
66
66
  this._opts = opts
67
67
  this._map = undefined
68
- let root
69
68
 
70
69
  let str = stringify
71
- this.result = new Result(this._processor, root, this._opts)
70
+ this.result = new Result(this._processor, undefined, this._opts)
72
71
  this.result.css = css
73
72
 
74
73
  let self = this
@@ -78,7 +77,7 @@ class NoWorkResult {
78
77
  }
79
78
  })
80
79
 
81
- let map = new MapGenerator(str, root, this._opts, css)
80
+ let map = new MapGenerator(str, undefined, this._opts, css)
82
81
  if (map.isMap()) {
83
82
  let [generatedCSS, generatedMap] = map.generate()
84
83
  if (generatedCSS) {
package/lib/node.d.ts CHANGED
@@ -126,7 +126,7 @@ declare namespace Node {
126
126
  word?: string
127
127
  }
128
128
 
129
- // eslint-disable-next-line @typescript-eslint/no-shadow
129
+
130
130
  class Node extends Node_ {}
131
131
  export { Node as default }
132
132
  }
package/lib/parser.js CHANGED
@@ -176,7 +176,7 @@ class Parser {
176
176
  node.source.end.offset++
177
177
 
178
178
  let text = token[1].slice(2, -2)
179
- if (/^\s*$/.test(text)) {
179
+ if (!text.trim()) {
180
180
  node.text = ''
181
181
  node.raws.left = text
182
182
  node.raws.right = ''
@@ -3,7 +3,7 @@ import { SourceMapConsumer } from 'source-map-js'
3
3
  import { ProcessOptions } from './postcss.js'
4
4
 
5
5
  declare namespace PreviousMap {
6
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
6
+
7
7
  export { PreviousMap_ as default }
8
8
  }
9
9
 
@@ -12,7 +12,7 @@ import Result from './result.js'
12
12
  import Root from './root.js'
13
13
 
14
14
  declare namespace Processor {
15
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
15
+
16
16
  export { Processor_ as default }
17
17
  }
18
18
 
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.6'
10
+ this.version = '8.5.8'
11
11
  this.plugins = this.normalize(plugins)
12
12
  }
13
13
 
package/lib/result.d.ts CHANGED
@@ -39,7 +39,7 @@ declare namespace Result {
39
39
  plugin?: string
40
40
  }
41
41
 
42
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
42
+
43
43
  export { Result_ as default }
44
44
  }
45
45
 
package/lib/root.d.ts CHANGED
@@ -40,7 +40,7 @@ declare namespace Root {
40
40
  raws?: RootRaws
41
41
  }
42
42
 
43
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
43
+
44
44
  export { Root_ as default }
45
45
  }
46
46
 
package/lib/rule.d.ts CHANGED
@@ -56,7 +56,7 @@ declare namespace Rule {
56
56
  }
57
57
  ) & ContainerProps
58
58
 
59
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
59
+
60
60
  export { Rule_ as default }
61
61
  }
62
62
 
@@ -11,7 +11,7 @@ import {
11
11
  } from './postcss.js'
12
12
 
13
13
  declare namespace Stringifier {
14
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
14
+
15
15
  export { Stringifier_ as default }
16
16
  }
17
17
 
package/lib/warning.d.ts CHANGED
@@ -40,7 +40,7 @@ declare namespace Warning {
40
40
  word?: string
41
41
  }
42
42
 
43
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
43
+
44
44
  export { Warning_ as default }
45
45
  }
46
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss",
3
- "version": "8.5.6",
3
+ "version": "8.5.8",
4
4
  "description": "Tool for transforming styles with JS plugins",
5
5
  "engines": {
6
6
  "node": "^10 || ^12 || >=14"