istanbul-lib-source-maps
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -100,2 +100,9 @@ # Change Log | ||
### [4.0.1](https://www.github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps-v4.0.0...istanbul-lib-source-maps-v4.0.1) (2021-10-12) | ||
### Bug Fixes | ||
* source mapping for branch statements ([#518](https://www.github.com/istanbuljs/istanbuljs/issues/518)) ([3833708](https://www.github.com/istanbuljs/istanbuljs/commit/38337081d97baa6295707d569dee9c4abc3f7da7)) | ||
## [3.0.6](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps@3.0.5...istanbul-lib-source-maps@3.0.6) (2019-04-24) | ||
@@ -102,0 +109,0 @@ |
@@ -17,2 +17,3 @@ /* | ||
this.baseDir = opts.baseDir || process.cwd(); | ||
this.resolveMapping = opts.getMapping || getMapping; | ||
} | ||
@@ -25,3 +26,3 @@ | ||
const hits = fc.s[s]; | ||
const mapping = getMapping(sourceMap, loc, fc.path); | ||
const mapping = this.resolveMapping(sourceMap, loc, fc.path); | ||
@@ -37,5 +38,14 @@ if (mapping) { | ||
const hits = fc.f[f]; | ||
const mapping = getMapping(sourceMap, fnMeta.decl, fc.path); | ||
const spanMapping = getMapping(sourceMap, fnMeta.loc, fc.path); | ||
const mapping = this.resolveMapping( | ||
sourceMap, | ||
fnMeta.decl, | ||
fc.path | ||
); | ||
const spanMapping = this.resolveMapping( | ||
sourceMap, | ||
fnMeta.loc, | ||
fc.path | ||
); | ||
if ( | ||
@@ -65,3 +75,3 @@ mapping && | ||
branchMeta.locations.forEach((loc, i) => { | ||
const mapping = getMapping(sourceMap, loc, fc.path); | ||
const mapping = this.resolveMapping(sourceMap, loc, fc.path); | ||
if (mapping) { | ||
@@ -81,2 +91,6 @@ if (!source) { | ||
const locMapping = branchMeta.loc | ||
? this.resolveMapping(sourceMap, branchMeta.loc, fc.path) | ||
: null; | ||
if (!skip && locs.length > 0) { | ||
@@ -87,3 +101,3 @@ changes += 1; | ||
branchMeta.type, | ||
locs[0] /* XXX */, | ||
locMapping ? locMapping.loc : locs[0], | ||
locs, | ||
@@ -90,0 +104,0 @@ mappedHits |
{ | ||
"name": "istanbul-lib-source-maps", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Source maps support for istanbul", | ||
@@ -12,3 +12,3 @@ "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>", | ||
"scripts": { | ||
"test": "nyc --nycrc-path=../../monorepo-per-package-nycrc.json mocha" | ||
"test": "nyc mocha" | ||
}, | ||
@@ -44,5 +44,4 @@ "dependencies": { | ||
"engines": { | ||
"node": ">=8" | ||
}, | ||
"gitHead": "5319df684b508ff6fb19fe8b9a6147a3c5924e4b" | ||
"node": ">=10" | ||
} | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
34127
640
1