🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP →
Sign In

postcss

Package Overview
Dependencies
Maintainers
1
Versions
283
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss - npm Package Compare versions

Comparing version
8.5.17
to
8.5.18
+4
-1
lib/postcss.d.ts

@@ -232,3 +232,3 @@ import { RawSourceMap, SourceMapGenerator } from 'source-map-js'

css: { toString(): string } | string,
opts?: Pick<ProcessOptions, 'document' | 'from' | 'map'>
opts?: Pick<ProcessOptions, 'document' | 'from' | 'map' | 'unsafeMap'>
): RootNode

@@ -358,2 +358,5 @@ }

* Disable source map file protections.
*
* By default source map is limited only for `.map` files
* in the `from` folder.
*/

@@ -360,0 +363,0 @@ unsafeMap?: boolean

+11
-2
'use strict'
let { existsSync, readFileSync } = require('fs')
let { dirname, join } = require('path')
let { dirname, isAbsolute, join, relative, sep } = require('path')
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')

@@ -88,3 +88,2 @@

loadFile(path, cssFile, trusted) {
/* c8 ignore next 5 */
if (!trusted && !this.unsafeMap) {

@@ -94,2 +93,12 @@ if (!/\.map$/i.test(path)) {

}
if (cssFile) {
let relativePath = relative(dirname(cssFile), path)
if (
relativePath === '..' ||
relativePath.startsWith('..' + sep) ||
isAbsolute(relativePath)
) {
return undefined
}
}
}

@@ -96,0 +105,0 @@ this.root = dirname(path)

@@ -10,3 +10,3 @@ 'use strict'

constructor(plugins = []) {
this.version = '8.5.17'
this.version = '8.5.18'
this.plugins = this.normalize(plugins)

@@ -13,0 +13,0 @@ }

{
"name": "postcss",
"version": "8.5.17",
"version": "8.5.18",
"description": "Tool for transforming styles with JS plugins",

@@ -5,0 +5,0 @@ "keywords": [