istanbul-lib-source-maps
Advanced tools
Comparing version 4.0.0-alpha.3 to 4.0.0-alpha.4
@@ -6,2 +6,13 @@ # Change Log | ||
# [4.0.0-alpha.4](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps@4.0.0-alpha.3...istanbul-lib-source-maps@4.0.0-alpha.4) (2019-11-16) | ||
### Bug Fixes | ||
* sourceFinder cannot be async. ([#501](https://github.com/istanbuljs/istanbuljs/issues/501)) ([094f1b8](https://github.com/istanbuljs/istanbuljs/commit/094f1b83b4652c5ba492781620cb6358c685a849)) | ||
# [4.0.0-alpha.3](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps@4.0.0-alpha.2...istanbul-lib-source-maps@4.0.0-alpha.3) (2019-11-15) | ||
@@ -8,0 +19,0 @@ |
@@ -9,3 +9,2 @@ /* | ||
const fs = require('fs'); | ||
const { promisify } = require('util'); | ||
const debug = require('debug')('istanbuljs'); | ||
@@ -16,4 +15,2 @@ const { SourceMapConsumer } = require('source-map'); | ||
const readFile = promisify(fs.readFile); | ||
/** | ||
@@ -46,2 +43,3 @@ * Tracks source maps for registered files | ||
this.data = Object.create(null); | ||
this.sourceFinder = this.sourceFinder.bind(this); | ||
} | ||
@@ -155,3 +153,3 @@ | ||
async sourceFinder(filePath) { | ||
sourceFinder(filePath) { | ||
const content = this.sourceStore.get(filePath); | ||
@@ -163,6 +161,6 @@ if (content !== undefined) { | ||
if (path.isAbsolute(filePath)) { | ||
return await readFile(filePath, 'utf8'); | ||
return fs.readFileSync(filePath, 'utf8'); | ||
} | ||
return await readFile( | ||
return fs.readFileSync( | ||
pathutils.asAbsolute(filePath, this.baseDir), | ||
@@ -169,0 +167,0 @@ 'utf8' |
{ | ||
"name": "istanbul-lib-source-maps", | ||
"version": "4.0.0-alpha.3", | ||
"version": "4.0.0-alpha.4", | ||
"description": "Source maps support for istanbul", | ||
@@ -45,3 +45,3 @@ "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>", | ||
}, | ||
"gitHead": "886e19c078f26ab0bb3662bea8265f61a8089c2e" | ||
"gitHead": "6d0404072c692f6b5dfd79884ccf1896d44c342b" | ||
} |
33034
628