Comparing version 8.3.9 to 8.3.10
@@ -51,19 +51,17 @@ 'use strict' | ||
getAnnotationURL(sourceMapString) { | ||
return sourceMapString | ||
.match(/\/\*\s*# sourceMappingURL=((?:(?!sourceMappingURL=).)*)\*\//)[1] | ||
.trim() | ||
console.log(sourceMapString) | ||
return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim() | ||
} | ||
loadAnnotation(css) { | ||
let annotations = css.match( | ||
/\/\*\s*# sourceMappingURL=(?:(?!sourceMappingURL=).)*\*\//gm | ||
) | ||
let comments = css.match(/\/\*\s*# sourceMappingURL=/gm) | ||
if (!comments) return | ||
if (annotations && annotations.length > 0) { | ||
// Locate the last sourceMappingURL to avoid picking up | ||
// sourceMappingURLs from comments, strings, etc. | ||
let lastAnnotation = annotations[annotations.length - 1] | ||
if (lastAnnotation) { | ||
this.annotation = this.getAnnotationURL(lastAnnotation) | ||
} | ||
// sourceMappingURLs from comments, strings, etc. | ||
let start = css.lastIndexOf(comments.pop()) | ||
let end = css.indexOf('*/', start) | ||
if (start > -1 && end > -1) { | ||
// Locate the last sourceMappingURL to avoid pickin | ||
this.annotation = this.getAnnotationURL(css.substring(start, end)) | ||
} | ||
@@ -70,0 +68,0 @@ } |
@@ -9,3 +9,3 @@ 'use strict' | ||
constructor(plugins = []) { | ||
this.version = '8.3.9' | ||
this.version = '8.3.10' | ||
this.plugins = this.normalize(plugins) | ||
@@ -12,0 +12,0 @@ } |
{ | ||
"name": "postcss", | ||
"version": "8.3.9", | ||
"version": "8.3.10", | ||
"description": "Tool for transforming styles with JS plugins", | ||
@@ -67,4 +67,4 @@ "engines": { | ||
"dependencies": { | ||
"nanoid": "^3.1.28", | ||
"picocolors": "^0.2.1", | ||
"nanoid": "^3.1.30", | ||
"picocolors": "^1.0.0", | ||
"source-map-js": "^0.6.2" | ||
@@ -71,0 +71,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172663
6038
+ Addedpicocolors@1.1.1(transitive)
- Removedpicocolors@0.2.1(transitive)
Updatednanoid@^3.1.30
Updatedpicocolors@^1.0.0