Skip to content

Commit 8465934

Browse files
novemberbornsindresorhus
authored andcommitted
Bump convert-source-map dependency, clean up duplicate require call
* convert-source-map@^1.2.0 The generateMapFileComment() method used in #662 isn't available in v1.1.2. * use already required convert-source-map dependency No need to require the generateMapFileComment() method separately. Also remove unnecessary linebreak at the end of the file.
1 parent 5b3c27a commit 8465934

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/caching-precompiler.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22
var path = require('path');
33
var fs = require('fs');
4-
var generateMapFileComment = require('convert-source-map').generateMapFileComment;
54
var convertSourceMap = require('convert-source-map');
65
var cachingTransform = require('caching-transform');
76
var objectAssign = require('object-assign');
@@ -84,7 +83,7 @@ CachingPrecompiler.prototype._transform = function (code, filePath, hash) {
8483
// is cached. This will allow the source map to be resolved.
8584
var dirPath = path.dirname(filePath);
8685
var relativeMapPath = path.relative(dirPath, mapPath);
87-
var comment = generateMapFileComment(relativeMapPath);
86+
var comment = convertSourceMap.generateMapFileComment(relativeMapPath);
8887

8988
return result.code + '\n' + comment;
9089
};
@@ -182,4 +181,3 @@ CachingPrecompiler.prototype._generateHash = function (code, filePath, salt) {
182181

183182
return hash;
184183
};
185-

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"cli-truncate": "^0.2.0",
9595
"co-with-promise": "^4.6.0",
9696
"common-path-prefix": "^1.0.0",
97-
"convert-source-map": "^1.1.2",
97+
"convert-source-map": "^1.2.0",
9898
"core-assert": "^0.1.0",
9999
"debug": "^2.2.0",
100100
"empower-core": "^0.5.0",

0 commit comments

Comments
 (0)