Skip to content

Commit

Permalink
fix: lookup source from inline sourcemaps (istanbuljs#1307)
Browse files Browse the repository at this point in the history
  • Loading branch information
satouriko committed Sep 25, 2024
1 parent 41f4476 commit 2ee90a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ class NYC {
const context = libReport.createContext({
dir: this.reportDirectory(),
watermarks: this.config.watermarks,
coverageMap: await this.getCoverageMapFromAllCoverageFiles()
coverageMap: await this.getCoverageMapFromAllCoverageFiles(),
sourceFinder: this.sourceMaps.sourceFinder
})

this.reporter.forEach((_reporter) => {
Expand Down
1 change: 1 addition & 0 deletions lib/source-maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class SourceMaps {
this.cacheDirectory = opts.cacheDirectory
this.loadedMaps = {}
this._sourceMapCache = libSourceMaps.createSourceMapStore()
this.sourceFinder = this._sourceMapCache.sourceFinder
}

cachedPath (source, hash) {
Expand Down

0 comments on commit 2ee90a0

Please sign in to comment.