postcss 8.4.18 → 8.4.20

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/README.md CHANGED
@@ -41,4 +41,4 @@ at <postcss@evilmartians.com>.
41
41
 
42
42
 
43
43
  ## Docs
44
- Read **[full docs](https://github.com/postcss/postcss#readme)** on GitHub.
44
+ Read full docs **[here](https://postcss.org/)**.
package/lib/container.js CHANGED
@@ -177,7 +177,7 @@ class Container extends Node {
177
177
 
178
178
  insertBefore(exist, add) {
179
179
  let existIndex = this.index(exist)
180
- let type = exist === 0 ? 'prepend' : false
180
+ let type = existIndex === 0 ? 'prepend' : false
181
181
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse()
182
182
  existIndex = this.index(exist)
183
183
  for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)
@@ -298,7 +298,9 @@ class MapGenerator {
298
298
 
299
299
  if (node && type !== 'start') {
300
300
  let p = node.parent || { raws: {} }
301
- if (node.type !== 'decl' || node !== p.last || p.raws.semicolon) {
301
+ let childless =
302
+ node.type === 'decl' || (node.type === 'atrule' && !node.nodes)
303
+ if (!childless || node !== p.last || p.raws.semicolon) {
302
304
  if (node.source && node.source.end) {
303
305
  mapping.source = this.sourcePath(node)
304
306
  mapping.original.line = node.source.end.line
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.4.18'
10
+ this.version = '8.4.20'
11
11
  this.plugins = this.normalize(plugins)
12
12
  }
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss",
3
- "version": "8.4.18",
3
+ "version": "8.4.20",
4
4
  "description": "Tool for transforming styles with JS plugins",
5
5
  "engines": {
6
6
  "node": "^10 || ^12 || >=14"