File tree 3 files changed +18
-12
lines changed
3 files changed +18
-12
lines changed Original file line number Diff line number Diff line change 1
1
language : node_js
2
2
node_js :
3
- - " 0.10 "
3
+ - " 12.18.2 "
Original file line number Diff line number Diff line change 6
6
var SourceMap = require ( 'source-map' ) . SourceMapGenerator ;
7
7
var SourceMapConsumer = require ( 'source-map' ) . SourceMapConsumer ;
8
8
var sourceMapResolve = require ( 'source-map-resolve' ) ;
9
- var urix = require ( 'urix' ) ;
10
9
var fs = require ( 'fs' ) ;
11
10
var path = require ( 'path' ) ;
12
11
@@ -16,6 +15,14 @@ var path = require('path');
16
15
17
16
module . exports = mixin ;
18
17
18
+ /**
19
+ * Ensure Windows-style paths are formatted properly
20
+ */
21
+
22
+ const makeFriendlyPath = function ( aPath ) {
23
+ return path . sep === "\\" ? aPath . replace ( / \\ / g, "/" ) . replace ( / ^ [ a - z ] : \/ ? / i, "/" ) : aPath ;
24
+ }
25
+
19
26
/**
20
27
* Mixin source map support into `compiler`.
21
28
*
@@ -56,7 +63,7 @@ exports.updatePosition = function(str) {
56
63
57
64
exports . emit = function ( str , pos ) {
58
65
if ( pos ) {
59
- var sourceFile = urix ( pos . source || 'source.css' ) ;
66
+ var sourceFile = makeFriendlyPath ( pos . source || 'source.css' ) ;
60
67
61
68
this . map . addMapping ( {
62
69
source : sourceFile ,
@@ -107,7 +114,7 @@ exports.applySourceMaps = function() {
107
114
if ( originalMap ) {
108
115
var map = new SourceMapConsumer ( originalMap . map ) ;
109
116
var relativeTo = originalMap . sourcesRelativeTo ;
110
- this . map . applySourceMap ( map , file , urix ( path . dirname ( relativeTo ) ) ) ;
117
+ this . map . applySourceMap ( map , file , makeFriendlyPath ( path . dirname ( relativeTo ) ) ) ;
111
118
}
112
119
}
113
120
} , this ) ;
Original file line number Diff line number Diff line change 9
9
" Readme.md"
10
10
],
11
11
"dependencies" : {
12
- "inherits" : " ^2.0.3 " ,
12
+ "inherits" : " ^2.0.4 " ,
13
13
"source-map" : " ^0.6.1" ,
14
- "source-map-resolve" : " ^0.5.2" ,
15
- "urix" : " ^0.1.0"
14
+ "source-map-resolve" : " ^0.6.0"
16
15
},
17
16
"devDependencies" : {
18
- "mocha" : " ^1.21.3 " ,
19
- "should" : " ^4.0.4 " ,
20
- "matcha" : " ^0.5 .0" ,
21
- "bytes" : " ^1.0 .0"
17
+ "mocha" : " ^8.0.1 " ,
18
+ "should" : " ^13.2.3 " ,
19
+ "matcha" : " ^0.7 .0" ,
20
+ "bytes" : " ^3.1 .0"
22
21
},
23
22
"scripts" : {
24
23
"benchmark" : " matcha" ,
25
- "test" : " mocha --require should --reporter spec --bail test/*.js"
24
+ "test" : " mocha --require should --reporter spec test/*.js"
26
25
},
27
26
"author" : " TJ Holowaychuk <tj@vision-media.ca>" ,
28
27
"license" : " MIT" ,
You can’t perform that action at this time.
0 commit comments