postcss 8.1.0 → 8.1.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.

Potentially problematic release.


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

package/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 8.1.4
5
+ * Fix TypeScript definition (by Arthur Petrie).
6
+
7
+ ## 8.1.3
8
+ * Added `package.types`.
9
+
10
+ ## 8.1.2
11
+ * Fixed API docs (by Arthur Petrie).
12
+ * Improved plugin guide (by Yunus Gaziev).
13
+ * Prepared code base for Deno support (by Oscar Otero).
14
+
15
+ ## 8.1.1
16
+ * Updated funding link.
17
+
4
18
  ## 8.1 “Duke Gemory”
5
19
  * Added `Once` and `OnceExit` events.
6
20
  * Fixed `Root` and `RootExit` events re-visiting.
@@ -68,6 +82,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
68
82
  * Removed docs from npm package.
69
83
  * Replaced `chalk` to `colorette`.
70
84
 
85
+ ## 7.0.35
86
+ * Add migration guide link to PostCSS 8 error text.
87
+
71
88
  ## 7.0.34
72
89
  * Fix compatibility with `postcss-scss` 2.
73
90
 
package/README.md CHANGED
@@ -357,8 +357,8 @@ To apply PostCSS plugins to React Inline Styles, JSS, Radium
357
357
  and other [CSS-in-JS], you can use [`postcss-js`] and transforms style objects.
358
358
 
359
359
  ```js
360
- var postcss = require('postcss-js')
361
- var prefixer = postcss.sync([ require('autoprefixer') ])
360
+ const postcss = require('postcss-js')
361
+ const prefixer = postcss.sync([ require('autoprefixer') ])
362
362
 
363
363
  prefixer({ display: 'flex' }) //=> { display: ['-webkit-box', '-webkit-flex', '-ms-flexbox', 'flex'] }
364
364
  ```
@@ -369,6 +369,20 @@ prefixer({ display: 'flex' }) //=> { display: ['-webkit-box', '-webkit-flex', '-
369
369
  [webpack]: https://webpack.github.io/
370
370
 
371
371
 
372
+ ### Deno
373
+
374
+ PostCSS also supports [Deno]:
375
+
376
+ ```js
377
+ import postcss from 'https://deno.land/x/postcss/mod.js'
378
+ import autoprefixer from 'https://dev.jspm.io/autoprefixer'
379
+
380
+ const result = await postcss([autoprefixer]).process(css)
381
+ ```
382
+
383
+ [Deno]: https://deno.land/
384
+
385
+
372
386
  ### Runners
373
387
 
374
388
  * **Grunt**: [`@lodder/grunt-postcss`](https://github.com/C-Lodder/grunt-postcss)
package/lib/comment.d.ts CHANGED
@@ -14,7 +14,7 @@ interface CommentRaws {
14
14
  /**
15
15
  * The space symbols between the comment’s text.
16
16
  */
17
- right?: boolean
17
+ right?: string
18
18
  }
19
19
 
20
20
  export interface CommentProps extends NodeProps {
package/lib/container.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
- let { isClean } = require('./symbols')
4
3
  let Declaration = require('./declaration')
4
+ let { isClean } = require('./symbols')
5
5
  let Comment = require('./comment')
6
6
  let Node = require('./node')
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
- let { isClean } = require('./symbols')
4
3
  let MapGenerator = require('./map-generator')
4
+ let { isClean } = require('./symbols')
5
5
  let stringify = require('./stringify')
6
6
  let warnOnce = require('./warn-once')
7
7
  let Result = require('./result')
package/lib/parse.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict'
2
2
 
3
+ let Container = require('./container')
3
4
  let Parser = require('./parser')
4
5
  let Input = require('./input')
5
- let Container = require('./container')
6
6
 
7
7
  function parse (css, opts) {
8
8
  let input = new Input(css, opts)
package/lib/postcss.d.ts CHANGED
@@ -409,8 +409,10 @@ export interface Postcss {
409
409
  }
410
410
 
411
411
  export const stringify: Stringifier
412
- export const atRule: Postcss['atRule']
413
412
  export const parse: Parser
413
+
414
+ export const comment: Postcss['comment']
415
+ export const atRule: Postcss['atRule']
414
416
  export const decl: Postcss['decl']
415
417
  export const rule: Postcss['rule']
416
418
  export const root: Postcss['root']
@@ -1,8 +1,8 @@
1
1
  'use strict'
2
2
 
3
+ let { existsSync, readFileSync } = require('fs')
3
4
  let { dirname, join } = require('path')
4
5
  let mozilla = require('source-map')
5
- let fs = require('fs')
6
6
 
7
7
  function fromBase64 (str) {
8
8
  if (Buffer) {
@@ -86,9 +86,9 @@ class PreviousMap {
86
86
 
87
87
  loadFile (path) {
88
88
  this.root = dirname(path)
89
- if (fs.existsSync && fs.existsSync(path)) {
89
+ if (existsSync(path)) {
90
90
  this.mapFile = path
91
- return fs.readFileSync(path, 'utf-8').toString().trim()
91
+ return readFileSync(path, 'utf-8').toString().trim()
92
92
  }
93
93
  }
94
94
 
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.0'
8
+ this.version = '8.1.4'
9
9
  this.plugins = this.normalize(plugins)
10
10
  }
11
11
 
package/lib/symbols.js CHANGED
@@ -1,5 +1,3 @@
1
1
  'use strict'
2
2
 
3
- module.exports = {
4
- isClean: Symbol('isClean')
5
- }
3
+ module.exports.isClean = Symbol('isClean')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss",
3
- "version": "8.1.0",
3
+ "version": "8.1.4",
4
4
  "description": "Tool for transforming styles with JS plugins",
5
5
  "engines": {
6
6
  "node": "^10 || ^12 || >=14"
@@ -8,11 +8,13 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "require": "./lib/postcss.js",
11
- "import": "./lib/postcss.mjs"
11
+ "import": "./lib/postcss.mjs",
12
+ "types": "./lib/postcss.d.ts"
12
13
  },
13
14
  "./": "./"
14
15
  },
15
- "main": "lib/postcss.js",
16
+ "main": "./lib/postcss.js",
17
+ "types": "./lib/postcss.d.ts",
16
18
  "keywords": [
17
19
  "css",
18
20
  "postcss",
@@ -25,8 +27,8 @@
25
27
  "transpiler"
26
28
  ],
27
29
  "funding": {
28
- "type": "tidelift",
29
- "url": "https://tidelift.com/funding/github/npm/postcss"
30
+ "type": "opencollective",
31
+ "url": "https://opencollective.com/postcss/"
30
32
  },
31
33
  "author": "Andrey Sitnik <andrey@sitnik.ru>",
32
34
  "license": "MIT",
@@ -35,7 +37,7 @@
35
37
  "dependencies": {
36
38
  "colorette": "^1.2.1",
37
39
  "line-column": "^1.0.2",
38
- "nanoid": "^3.1.12",
40
+ "nanoid": "^3.1.15",
39
41
  "source-map": "^0.6.1"
40
42
  },
41
43
  "browser": {