postcss 8.5.25 → 8.5.26
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/README.md +4 -1
- package/lib/list.js +1 -1
- package/lib/previous-map.js +14 -2
- package/lib/processor.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ and JetBrains. The [Autoprefixer] and [Stylelint] PostCSS plugins are some o
|
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
<img src="https://cdn.evilmartians.com/badges/logo-no-label.svg" alt="" width="22" height="16" /> PostCSS is built by <b><a href="https://evilmartians.com
|
|
16
|
+
<img src="https://cdn.evilmartians.com/badges/logo-no-label.svg" alt="" width="22" height="16" /> PostCSS is built by <b><a href="https://evilmartians.com/">Evil Martians</a></b>, an American design and engineering consultancy for <b>developer tools, AI, and cybersecurity startups</b>.
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
@@ -22,3 +22,6 @@ and JetBrains. The [Autoprefixer] and [Stylelint] PostCSS plugins are some o
|
|
|
22
22
|
[Autoprefixer]: https://github.com/postcss/autoprefixer
|
|
23
23
|
[Stylelint]: https://stylelint.io/
|
|
24
24
|
[plugins]: https://github.com/postcss/postcss#plugins
|
|
25
|
+
|
|
26
|
+
## Docs
|
|
27
|
+
Read full docs **[here](https://postcss.org/)**.
|
package/lib/list.js
CHANGED
package/lib/previous-map.js
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
let { existsSync, readFileSync } = require('fs')
|
|
3
|
+
let { existsSync, readFileSync, realpathSync } = require('fs')
|
|
4
4
|
let { dirname, isAbsolute, join, relative, sep } = require('path')
|
|
5
5
|
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
|
|
6
6
|
|
|
7
|
+
function realPath(path) {
|
|
8
|
+
try {
|
|
9
|
+
return realpathSync(path)
|
|
10
|
+
} catch {
|
|
11
|
+
// Missing or dangling: keep the literal path. The existsSync() check below
|
|
12
|
+
// still gates the read, and a path that does not exist cannot escape.
|
|
13
|
+
return path
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
7
17
|
function fromBase64(str) {
|
|
8
18
|
if (Buffer) {
|
|
9
19
|
return Buffer.from(str, 'base64').toString()
|
|
@@ -89,7 +99,9 @@ class PreviousMap {
|
|
|
89
99
|
if (!/\.map$/i.test(path)) return undefined
|
|
90
100
|
if (!cssFile) return undefined
|
|
91
101
|
|
|
92
|
-
|
|
102
|
+
// Compare *resolved* paths: relative() is textual, so without this a
|
|
103
|
+
// symlink at or below the CSS file's directory points the map outside it.
|
|
104
|
+
let rel = relative(realPath(dirname(cssFile)), realPath(path))
|
|
93
105
|
if (rel === '..' || rel.startsWith('..' + sep) || isAbsolute(rel)) {
|
|
94
106
|
return undefined
|
|
95
107
|
}
|
package/lib/processor.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postcss",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.26",
|
|
4
4
|
"description": "Tool for transforming styles with JS plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"./package.json": "./package.json"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"nanoid": "^3.3.
|
|
81
|
+
"nanoid": "^3.3.17",
|
|
82
82
|
"picocolors": "^1.1.1",
|
|
83
83
|
"source-map-js": "^1.2.1"
|
|
84
84
|
},
|