postcss 8.1.6 → 8.1.10

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.

Potentially problematic release.


This version of postcss might be problematic. Click here for more details.

package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
- This project adheres to [Semantic Versioning](http://semver.org/).
2
+ This project adheres to [Semantic Versioning](https://semver.org/).
3
+
4
+ ## 8.1.10
5
+ * Fixed `LazyResult` type export (by Evan You).
6
+ * Fixed `LazyResult` type compatibility with `Promise` (by Anton Kastritskiy).
7
+
8
+ ## 8.1.9
9
+ * Reduced dependencies number (by Bogdan Chadkin).
10
+
11
+ ## 8.1.8
12
+ * Fixed `LazyResult` type compatibility with `Promise` (by Ludovico Fischer).
13
+ * Fixed HTTPS links in documentation.
14
+
15
+ ## 8.1.7
16
+ * Fixed `import` support in TypeScript (by Remco Haszing).
3
17
 
4
18
  ## 8.1.6
5
19
  * Reverted `package.exports` Node.js 15 fix.
package/README.md CHANGED
@@ -60,7 +60,7 @@ on top of PostCSS.
60
60
 
61
61
  If you have any new ideas, [PostCSS plugin development] is really easy.
62
62
 
63
- [searchable catalog]: http://postcss.parts
63
+ [searchable catalog]: https://www.postcss.parts/
64
64
  [plugins list]: https://github.com/postcss/postcss/blob/master/docs/plugins.md
65
65
 
66
66
 
@@ -139,7 +139,7 @@ If you have any new ideas, [PostCSS plugin development] is really easy.
139
139
  [`colorguard`]: https://github.com/SlexAxton/css-colorguard
140
140
  [`stylelint`]: https://github.com/stylelint/stylelint
141
141
  [`stylefmt`]: https://github.com/morishitter/stylefmt
142
- [`cssnano`]: http://cssnano.co
142
+ [`cssnano`]: https://cssnano.co/
143
143
  [`precss`]: https://github.com/jonathantneal/precss
144
144
  [`doiuse`]: https://github.com/anandthakker/doiuse
145
145
  [`rtlcss`]: https://github.com/MohammadYounes/rtlcss
@@ -190,8 +190,8 @@ you can write a parser and/or stringifier to extend PostCSS.
190
190
  ## Articles
191
191
 
192
192
  * [Some things you may think about PostCSS… and you might be wrong](http://julian.io/some-things-you-may-think-about-postcss-and-you-might-be-wrong)
193
- * [What PostCSS Really Is; What It Really Does](http://davidtheclark.com/its-time-for-everyone-to-learn-about-postcss)
194
- * [PostCSS Guides](http://webdesign.tutsplus.com/series/postcss-deep-dive--cms-889)
193
+ * [What PostCSS Really Is; What It Really Does](https://davidtheclark.com/its-time-for-everyone-to-learn-about-postcss/)
194
+ * [PostCSS Guides](https://webdesign.tutsplus.com/series/postcss-deep-dive--cms-889)
195
195
 
196
196
  More articles and videos you can find on [awesome-postcss](https://github.com/jjaderg/awesome-postcss) list.
197
197
 
@@ -208,7 +208,7 @@ You can start using PostCSS in just two steps:
208
208
  1. Find and add PostCSS extensions for your build tool.
209
209
  2. [Select plugins] and add them to your PostCSS process.
210
210
 
211
- [Select plugins]: http://postcss.parts
211
+ [Select plugins]: https://www.postcss.parts/
212
212
 
213
213
 
214
214
  ### CSS-in-JS
package/lib/at-rule.js CHANGED
@@ -20,5 +20,6 @@ class AtRule extends Container {
20
20
  }
21
21
 
22
22
  module.exports = AtRule
23
+ AtRule.default = AtRule
23
24
 
24
25
  Container.registerAtRule(AtRule)
package/lib/comment.js CHANGED
@@ -10,3 +10,4 @@ class Comment extends Node {
10
10
  }
11
11
 
12
12
  module.exports = Comment
13
+ Comment.default = Comment
package/lib/container.js CHANGED
@@ -426,3 +426,4 @@ Container.registerAtRule = dependant => {
426
426
  }
427
427
 
428
428
  module.exports = Container
429
+ Container.default = Container
@@ -89,3 +89,4 @@ class CssSyntaxError extends Error {
89
89
  }
90
90
 
91
91
  module.exports = CssSyntaxError
92
+ CssSyntaxError.default = CssSyntaxError
@@ -21,3 +21,4 @@ class Declaration extends Node {
21
21
  }
22
22
 
23
23
  module.exports = Declaration
24
+ Declaration.default = Declaration
package/lib/input.js CHANGED
@@ -3,7 +3,7 @@
3
3
  let { fileURLToPath, pathToFileURL } = require('url')
4
4
  let { resolve, isAbsolute } = require('path')
5
5
  let { nanoid } = require('nanoid/non-secure')
6
- let lineColumn = require('line-column')
6
+ let vfileLocation = require('vfile-location')
7
7
 
8
8
  let terminalHighlight = require('./terminal-highlight')
9
9
  let CssSyntaxError = require('./css-syntax-error')
@@ -50,8 +50,14 @@ class Input {
50
50
  }
51
51
 
52
52
  fromOffset (offset) {
53
- let finder = lineColumn(this.css)
54
- this.fromOffset = i => finder.fromIndex(i)
53
+ let finder = vfileLocation(this.css)
54
+ this.fromOffset = i => {
55
+ let position = finder.toPoint(i)
56
+ return {
57
+ line: position.line,
58
+ col: position.column
59
+ }
60
+ }
55
61
  return this.fromOffset(offset)
56
62
  }
57
63
 
@@ -139,6 +145,7 @@ class Input {
139
145
  }
140
146
 
141
147
  module.exports = Input
148
+ Input.default = Input
142
149
 
143
150
  if (terminalHighlight && terminalHighlight.registerInput) {
144
151
  terminalHighlight.registerInput(Input)
@@ -13,7 +13,7 @@ import Root from './root.js'
13
13
  * const lazy = postcss([autoprefixer]).process(css)
14
14
  * ```
15
15
  */
16
- export default class LazyResult {
16
+ export default class LazyResult implements PromiseLike<Result> {
17
17
  /**
18
18
  * Processes input CSS through synchronous and asynchronous plugins
19
19
  * and calls `onFulfilled` with a Result instance. If a plugin throws
@@ -66,6 +66,12 @@ export default class LazyResult {
66
66
  */
67
67
  constructor (processor: Processor, css: string, opts: ResultOptions)
68
68
 
69
+ /**
70
+ * Returns the default string description of an object.
71
+ * Required to implement the Promise interface.
72
+ */
73
+ get [Symbol.toStringTag] (): string
74
+
69
75
  /**
70
76
  * Returns a `Processor` instance, which will be used
71
77
  * for CSS transformations.
@@ -114,6 +114,10 @@ class LazyResult {
114
114
  })
115
115
  }
116
116
 
117
+ get [Symbol.toStringTag] () {
118
+ return 'LazyResult'
119
+ }
120
+
117
121
  get processor () {
118
122
  return this.result.processor
119
123
  }
@@ -475,5 +479,6 @@ LazyResult.registerPostcss = dependant => {
475
479
  }
476
480
 
477
481
  module.exports = LazyResult
482
+ LazyResult.default = LazyResult
478
483
 
479
484
  Root.registerLazyResult(LazyResult)
package/lib/list.js CHANGED
@@ -53,3 +53,4 @@ let list = {
53
53
  }
54
54
 
55
55
  module.exports = list
56
+ list.default = list
package/lib/node.js CHANGED
@@ -288,3 +288,4 @@ class Node {
288
288
  }
289
289
 
290
290
  module.exports = Node
291
+ Node.default = Node
package/lib/parse.js CHANGED
@@ -37,5 +37,6 @@ function parse (css, opts) {
37
37
  }
38
38
 
39
39
  module.exports = parse
40
+ parse.default = parse
40
41
 
41
42
  Container.registerParse(parse)
package/lib/postcss.d.ts CHANGED
@@ -13,6 +13,7 @@ import Root, { RootProps } from './root.js'
13
13
  import Comment, { CommentProps } from './comment.js'
14
14
  import AtRule, { AtRuleProps } from './at-rule.js'
15
15
  import Result, { Message } from './result.js'
16
+ import LazyResult from './lazy-result.js'
16
17
  import Rule, { RuleProps } from './rule.js'
17
18
  import Container, { ContainerProps } from './container.js'
18
19
  import Warning, { WarningOptions } from './warning.js'
@@ -48,6 +49,7 @@ export {
48
49
  Rule,
49
50
  Root,
50
51
  Result,
52
+ LazyResult,
51
53
  Input
52
54
  }
53
55
 
package/lib/postcss.js CHANGED
@@ -85,3 +85,4 @@ postcss.Node = Node
85
85
  LazyResult.registerPostcss(postcss)
86
86
 
87
87
  module.exports = postcss
88
+ postcss.default = postcss
@@ -140,3 +140,4 @@ class PreviousMap {
140
140
  }
141
141
 
142
142
  module.exports = PreviousMap
143
+ PreviousMap.default = PreviousMap
package/lib/processor.js CHANGED
@@ -5,7 +5,7 @@ let Root = require('./root')
5
5
 
6
6
  class Processor {
7
7
  constructor (plugins = []) {
8
- this.version = '8.1.6'
8
+ this.version = '8.1.10'
9
9
  this.plugins = this.normalize(plugins)
10
10
  }
11
11
 
@@ -65,5 +65,6 @@ class Processor {
65
65
  }
66
66
 
67
67
  module.exports = Processor
68
+ Processor.default = Processor
68
69
 
69
70
  Root.registerProcessor(Processor)
package/lib/result.js CHANGED
@@ -39,3 +39,4 @@ class Result {
39
39
  }
40
40
 
41
41
  module.exports = Result
42
+ Result.default = Result
package/lib/root.js CHANGED
@@ -56,3 +56,4 @@ Root.registerProcessor = dependant => {
56
56
  }
57
57
 
58
58
  module.exports = Root
59
+ Root.default = Root
package/lib/rule.js CHANGED
@@ -22,5 +22,6 @@ class Rule extends Container {
22
22
  }
23
23
 
24
24
  module.exports = Rule
25
+ Rule.default = Rule
25
26
 
26
27
  Container.registerRule(Rule)
package/lib/stringify.js CHANGED
@@ -2,7 +2,10 @@
2
2
 
3
3
  let Stringifier = require('./stringifier')
4
4
 
5
- module.exports = function stringify (node, builder) {
5
+ function stringify (node, builder) {
6
6
  let str = new Stringifier(builder)
7
7
  str.stringify(node)
8
8
  }
9
+
10
+ module.exports = stringify
11
+ stringify.default = stringify
package/lib/warning.js CHANGED
@@ -32,3 +32,4 @@ class Warning {
32
32
  }
33
33
 
34
34
  module.exports = Warning
35
+ Warning.default = Warning
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss",
3
- "version": "8.1.6",
3
+ "version": "8.1.10",
4
4
  "description": "Tool for transforming styles with JS plugins",
5
5
  "engines": {
6
6
  "node": "^10 || ^12 || >=14"
@@ -36,9 +36,9 @@
36
36
  "repository": "postcss/postcss",
37
37
  "dependencies": {
38
38
  "colorette": "^1.2.1",
39
- "line-column": "^1.0.2",
40
- "nanoid": "^3.1.16",
41
- "source-map": "^0.6.1"
39
+ "nanoid": "^3.1.18",
40
+ "source-map": "^0.6.1",
41
+ "vfile-location": "^3.2.0"
42
42
  },
43
43
  "browser": {
44
44
  "./lib/terminal-highlight": false,