postcss 8.1.2 → 8.1.6

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,13 +1,25 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 8.1.6
5
+ * Reverted `package.exports` Node.js 15 fix.
6
+
7
+ ## 8.1.5
8
+ * Fixed Node.js 15 warning (by 沈鸿飞).
9
+
10
+ ## 8.1.4
11
+ * Fixed TypeScript definition (by Arthur Petrie).
12
+
13
+ ## 8.1.3
14
+ * Added `package.types`.
15
+
4
16
  ## 8.1.2
5
- * Fix API docs (by Arthur Petrie).
6
- * Improve plugin guide (by Yunus Gaziev).
7
- * Prepare code base for Deno support (by Oscar Otero).
17
+ * Fixed API docs (by Arthur Petrie).
18
+ * Improved plugin guide (by Yunus Gaziev).
19
+ * Prepared code base for Deno support (by Oscar Otero).
8
20
 
9
21
  ## 8.1.1
10
- * Update funding link.
22
+ * Updated funding link.
11
23
 
12
24
  ## 8.1 “Duke Gemory”
13
25
  * Added `Once` and `OnceExit` events.
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/node.d.ts CHANGED
@@ -22,12 +22,12 @@ export type ChildProps =
22
22
 
23
23
  export interface Position {
24
24
  /**
25
- * Source offset in file.
25
+ * Source offset in file. It starts from 0.
26
26
  */
27
27
  offset: number
28
28
 
29
29
  /**
30
- * Source line in file.
30
+ * Source line in file. In contrast to `offset` it starts from 1.
31
31
  */
32
32
  column: number
33
33
 
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']
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.2'
8
+ this.version = '8.1.6'
9
9
  this.plugins = this.normalize(plugins)
10
10
  }
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss",
3
- "version": "8.1.2",
3
+ "version": "8.1.6",
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",
@@ -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.16",
39
41
  "source-map": "^0.6.1"
40
42
  },
41
43
  "browser": {