Socket
Socket
Sign inDemoInstall

istanbul-lib-source-maps

Package Overview
Dependencies
4
Maintainers
4
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0 to 4.0.1

7

CHANGELOG.md

@@ -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 @@

24

lib/transformer.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc