Socket
Socket
Sign inDemoInstall

istanbul-lib-source-maps

Package Overview
Dependencies
6
Maintainers
4
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.0 to 5.0.4

28

CHANGELOG.md

@@ -100,2 +100,30 @@ # Change Log

## [5.0.4](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps-v5.0.3...istanbul-lib-source-maps-v5.0.4) (2024-02-26)
### Bug Fixes
* handle missing source map ([1c2017d](https://github.com/istanbuljs/istanbuljs/commit/1c2017d5a3e20ef5725b77a8e4d76eff84b9a62f))
## [5.0.3](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps-v5.0.2...istanbul-lib-source-maps-v5.0.3) (2024-02-26)
### Bug Fixes
* correct CI check to properly release 5.0.1 ([a39fdfe](https://github.com/istanbuljs/istanbuljs/commit/a39fdfe3a2082ba82ef4243840bcffe10737a40f))
## [5.0.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps-v5.0.1...istanbul-lib-source-maps-v5.0.2) (2024-02-26)
### Bug Fixes
* correct CI badge in source-maps readme ([78aa783](https://github.com/istanbuljs/istanbuljs/commit/78aa783a54760b79d7e6d0f6e0d8c6c481b690d7))
## [5.0.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps-v5.0.0...istanbul-lib-source-maps-v5.0.1) (2024-02-26)
### Bug Fixes
* use `allGeneratedPositionsFor` for more accurate source map transforms ([#771](https://github.com/istanbuljs/istanbuljs/issues/771)) ([dde947c](https://github.com/istanbuljs/istanbuljs/commit/dde947c6ee808b54ebf1ba4faea1f89c43ef3df6))
## [5.0.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps-v4.0.1...istanbul-lib-source-maps-v5.0.0) (2024-02-26)

@@ -102,0 +130,0 @@

38

lib/get-mapping.js

@@ -10,3 +10,3 @@ /*

originalPositionFor,
generatedPositionFor,
allGeneratedPositionsFor,
GREATEST_LOWER_BOUND,

@@ -54,3 +54,3 @@ LEAST_UPPER_BOUND

// beforeEndMapping mapping.
const afterEndMapping = generatedPositionFor(sourceMap, {
const afterEndMappings = allGeneratedPositionsFor(sourceMap, {
source: beforeEndMapping.source,

@@ -61,21 +61,21 @@ line: beforeEndMapping.line,

});
if (
// If this is null, it means that we've hit the end of the file,
// so we can use Infinity as the end column.
afterEndMapping.line === null ||
// If these don't match, it means that the call to
// 'generatedPositionFor' didn't find any other original mappings on
// the line we gave, so consider the binding to extend to infinity.
originalPositionFor(sourceMap, afterEndMapping).line !==
beforeEndMapping.line
) {
return {
source: beforeEndMapping.source,
line: beforeEndMapping.line,
column: Infinity
};
for (let i = 0; i < afterEndMappings.length; i++) {
const afterEndMapping = afterEndMappings[i];
if (afterEndMapping.line === null) continue;
const original = originalPositionFor(sourceMap, afterEndMapping);
// If the lines match, it means that something comes after our mapping,
// so it must end where this one begins.
if (original.line === beforeEndMapping.line) return original;
}
// Convert the end mapping into the real original position.
return originalPositionFor(sourceMap, afterEndMapping);
// If a generated mapping wasn't found (or all that were found were not on
// the same line), then there's nothing after this range and we can
// consider it to extend to infinity.
return {
source: beforeEndMapping.source,
line: beforeEndMapping.line,
column: Infinity
};
}

@@ -82,0 +82,0 @@

@@ -195,9 +195,11 @@ /*

smc.sources.forEach(s => {
const content = sourceContentFor(smc, s);
if (content) {
const sourceFilePath = pathutils.relativeTo(
s,
filePath
);
this.sourceStore.set(sourceFilePath, content);
if (s) {
const content = sourceContentFor(smc, s);
if (content) {
const sourceFilePath = pathutils.relativeTo(
s,
filePath
);
this.sourceStore.set(sourceFilePath, content);
}
}

@@ -204,0 +206,0 @@ });

{
"name": "istanbul-lib-source-maps",
"version": "5.0.0",
"version": "5.0.4",
"description": "Source maps support for istanbul",

@@ -5,0 +5,0 @@ "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>",

# istanbul-lib-source-maps
[![Build Status](https://travis-ci.org/istanbuljs/istanbuljs.svg?branch=main)](https://travis-ci.org/istanbuljs/istanbuljs)
[![Build Status](https://img.shields.io/github/actions/workflow/status/istanbuljs/istanbuljs/ci.yml?label=CI&logo=GitHub)](https://github.com/istanbuljs/istanbuljs/actions/workflows/ci.yml)

@@ -9,4 +9,3 @@ Source map support for istanbuljs.

_istanbul-lib-source-maps_ uses the [debug](https://www.npmjs.com/package/debug) module.
Run your application with the environment variable `DEBUG=istanbuljs`, to receive debug
`istanbul-lib-source-maps` uses the [debug](https://www.npmjs.com/package/debug) module. Run your application with the environment variable `DEBUG=istanbuljs`, to receive debug
output.
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