Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9f3cf34e17b709907a2ae6bc584f4aa93cd2902a
Choose a base ref
..
head repository: nodejs/node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d4c62c059def8e202feec4c03e769b6a0d9052f0
Choose a head ref
Showing with 8 additions and 8 deletions.
  1. +4 βˆ’4 lib/internal/source_map/source_map.js
  2. +4 βˆ’4 test/parallel/test-source-map-api.js
8 changes: 4 additions & 4 deletions lib/internal/source_map/source_map.js
Original file line number Diff line number Diff line change
@@ -169,8 +169,8 @@ class SourceMap {
};

/**
* @param {number} 0-indexed line offset in compiled resource
* @param {number} 0-indexed column offset in compiled resource
* @param {number} lineOffset 0-indexed line offset in compiled resource
* @param {number} columnOffset 0-indexed column offset in compiled resource
* @return {object} representing start of range if found, or empty object
*/
findEntry(lineOffset, columnOffset) {
@@ -206,8 +206,8 @@ class SourceMap {
}

/**
* @param {number} 1-indexed line number in compiled resource call site
* @param {number} 1-indexed column number in compiled resource call site
* @param {number} lineNumber 1-indexed line number in compiled resource call site
* @param {number} columnNumber 1-indexed column number in compiled resource call site
* @return {object} representing origin call site if found, or empty object
*/
findOrigin(lineNumber, columnNumber) {
8 changes: 4 additions & 4 deletions test/parallel/test-source-map-api.js
Original file line number Diff line number Diff line change
@@ -105,10 +105,10 @@ const { readFileSync } = require('fs');
} = sourceMap.findOrigin(
callSite.getLineNumber(),
callSite.getColumnNumber()
)
assert.strictEqual(fileName, originalSource)
assert.strictEqual(lineNumber, 18)
assert.strictEqual(columnNumber, 11)
);
assert.strictEqual(fileName, originalSource);
assert.strictEqual(lineNumber, 18);
assert.strictEqual(columnNumber, 11);
}

// SourceMap can be instantiated with Source Map V3 object as payload.