Comparing version 3.2.1 to 3.2.2
@@ -261,3 +261,3 @@ "use strict"; | ||
var _a = compile(code, fileName, lineOffset), value = _a[0], sourceMap = _a[1]; | ||
var output = updateOutput(value, fileName, sourceMap); | ||
var output = updateOutput(value, fileName, sourceMap, getExtension); | ||
cache.outputs[fileName] = output; | ||
@@ -280,3 +280,3 @@ return output; | ||
var _a = compile(code, fileName, lineOffset), value = _a[0], sourceMap = _a[1]; | ||
var output = updateOutput(value, fileName, sourceMap); | ||
var output = updateOutput(value, fileName, sourceMap, getExtension); | ||
cache.outputs[fileName] = output; | ||
@@ -287,6 +287,7 @@ fs_1.writeFileSync(outputPath, output); | ||
} | ||
function updateOutput(outputText, fileName, sourceMap) { | ||
function updateOutput(outputText, fileName, sourceMap, getExtension) { | ||
var base64Map = new Buffer(updateSourceMap(sourceMap, fileName), 'utf8').toString('base64'); | ||
var sourceMapContent = "data:application/json;charset=utf-8;base64," + base64Map; | ||
return outputText.replace(/[^=]+$/, sourceMapContent); | ||
var sourceMapLength = (path_1.basename(fileName) + ".map").length + (getExtension(fileName).length - path_1.extname(fileName).length); | ||
return outputText.slice(0, -1 * sourceMapLength) + sourceMapContent; | ||
} | ||
@@ -293,0 +294,0 @@ function updateSourceMap(sourceMapText, fileName) { |
{ | ||
"name": "ts-node", | ||
"version": "3.2.1", | ||
"version": "3.2.2", | ||
"description": "TypeScript execution environment and REPL for node", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
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
124123
993