Skip to content

Commit c0aa45c

Browse files
authoredJul 2, 2020
Update/remove dependencies (#140)
* feat: update dependencies * test: don't bail when there is a failure * feat: remove urix * fix: remove lock file, not needed * fix: don't use const * fix: add const back * test: using latest node version with travis
1 parent 64910e8 commit c0aa45c

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed
 

‎.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
language: node_js
22
node_js:
3-
- "0.10"
3+
- "12.18.2"

‎lib/stringify/source-map-support.js

+10-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
var SourceMap = require('source-map').SourceMapGenerator;
77
var SourceMapConsumer = require('source-map').SourceMapConsumer;
88
var sourceMapResolve = require('source-map-resolve');
9-
var urix = require('urix');
109
var fs = require('fs');
1110
var path = require('path');
1211

@@ -16,6 +15,14 @@ var path = require('path');
1615

1716
module.exports = mixin;
1817

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+
1926
/**
2027
* Mixin source map support into `compiler`.
2128
*
@@ -56,7 +63,7 @@ exports.updatePosition = function(str) {
5663

5764
exports.emit = function(str, pos) {
5865
if (pos) {
59-
var sourceFile = urix(pos.source || 'source.css');
66+
var sourceFile = makeFriendlyPath(pos.source || 'source.css');
6067

6168
this.map.addMapping({
6269
source: sourceFile,
@@ -107,7 +114,7 @@ exports.applySourceMaps = function() {
107114
if (originalMap) {
108115
var map = new SourceMapConsumer(originalMap.map);
109116
var relativeTo = originalMap.sourcesRelativeTo;
110-
this.map.applySourceMap(map, file, urix(path.dirname(relativeTo)));
117+
this.map.applySourceMap(map, file, makeFriendlyPath(path.dirname(relativeTo)));
111118
}
112119
}
113120
}, this);

‎package.json

+7-8
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,19 @@
99
"Readme.md"
1010
],
1111
"dependencies": {
12-
"inherits": "^2.0.3",
12+
"inherits": "^2.0.4",
1313
"source-map": "^0.6.1",
14-
"source-map-resolve": "^0.5.2",
15-
"urix": "^0.1.0"
14+
"source-map-resolve": "^0.6.0"
1615
},
1716
"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"
2221
},
2322
"scripts": {
2423
"benchmark": "matcha",
25-
"test": "mocha --require should --reporter spec --bail test/*.js"
24+
"test": "mocha --require should --reporter spec test/*.js"
2625
},
2726
"author": "TJ Holowaychuk <tj@vision-media.ca>",
2827
"license": "MIT",

0 commit comments

Comments
 (0)
Please sign in to comment.