Comparing version 2.2.4 to 3.0.0
@@ -9,3 +9,2 @@ | ||
var sourceMapResolve = require('source-map-resolve'); | ||
var urix = require('urix'); | ||
var fs = require('fs'); | ||
@@ -21,2 +20,10 @@ var path = require('path'); | ||
/** | ||
* Ensure Windows-style paths are formatted properly | ||
*/ | ||
const makeFriendlyPath = function(aPath) { | ||
return path.sep === "\\" ? aPath.replace(/\\/g, "/").replace(/^[a-z]:\/?/i, "/") : aPath; | ||
} | ||
/** | ||
* Mixin source map support into `compiler`. | ||
@@ -61,3 +68,3 @@ * | ||
if (pos) { | ||
var sourceFile = urix(pos.source || 'source.css'); | ||
var sourceFile = makeFriendlyPath(pos.source || 'source.css'); | ||
@@ -113,3 +120,3 @@ this.map.addMapping({ | ||
var relativeTo = originalMap.sourcesRelativeTo; | ||
this.map.applySourceMap(map, file, urix(path.dirname(relativeTo))); | ||
this.map.applySourceMap(map, file, makeFriendlyPath(path.dirname(relativeTo))); | ||
} | ||
@@ -116,0 +123,0 @@ } |
{ | ||
"name": "css", | ||
"version": "2.2.4", | ||
"version": "3.0.0", | ||
"description": "CSS parser / stringifier", | ||
@@ -12,16 +12,15 @@ "main": "index", | ||
"dependencies": { | ||
"inherits": "^2.0.3", | ||
"inherits": "^2.0.4", | ||
"source-map": "^0.6.1", | ||
"source-map-resolve": "^0.5.2", | ||
"urix": "^0.1.0" | ||
"source-map-resolve": "^0.6.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^1.21.3", | ||
"should": "^4.0.4", | ||
"matcha": "^0.5.0", | ||
"bytes": "^1.0.0" | ||
"mocha": "^8.0.1", | ||
"should": "^13.2.3", | ||
"matcha": "^0.7.0", | ||
"bytes": "^3.1.0" | ||
}, | ||
"scripts": { | ||
"benchmark": "matcha", | ||
"test": "mocha --require should --reporter spec --bail test/*.js" | ||
"test": "mocha --require should --reporter spec test/*.js" | ||
}, | ||
@@ -28,0 +27,0 @@ "author": "TJ Holowaychuk <tj@vision-media.ca>", |
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
35471
3
1014
+ Addedsource-map-resolve@0.6.0(transitive)
- Removedurix@^0.1.0
- Removedresolve-url@0.2.1(transitive)
- Removedsource-map-resolve@0.5.3(transitive)
- Removedsource-map-url@0.4.1(transitive)
- Removedurix@0.1.0(transitive)
Updatedinherits@^2.0.4
Updatedsource-map-resolve@^0.6.0