You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@jridgewell/source-map

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jridgewell/source-map - npm Package Compare versions

Comparing version

to
0.3.6

dist/source-map.cjs

927

dist/source-map.umd.js

@@ -11,11 +11,11 @@ (function (global, factory) {

const intToChar = new Uint8Array(64); // 64 possible chars.
const charToInteger = new Uint8Array(128); // z is 122 in ASCII
const charToInt = new Uint8Array(128); // z is 122 in ASCII
for (let i = 0; i < chars.length; i++) {
const c = chars.charCodeAt(i);
charToInteger[c] = i;
intToChar[i] = c;
charToInt[c] = i;
}
// Provide a fallback for older environments.
const td = typeof TextDecoder !== 'undefined'
? new TextDecoder()
? /* #__PURE__ */ new TextDecoder()
: typeof Buffer !== 'undefined'

@@ -40,21 +40,12 @@ ? {

const decoded = [];
let line = [];
let sorted = true;
let lastCol = 0;
for (let i = 0; i < mappings.length;) {
const c = mappings.charCodeAt(i);
if (c === comma) {
i++;
}
else if (c === semicolon) {
state[0] = lastCol = 0;
if (!sorted)
sort(line);
sorted = true;
decoded.push(line);
line = [];
i++;
}
else {
i = decodeInteger(mappings, i, state, 0); // generatedCodeColumn
let index = 0;
do {
const semi = indexOf(mappings, index);
const line = [];
let sorted = true;
let lastCol = 0;
state[0] = 0;
for (let i = index; i < semi; i++) {
let seg;
i = decodeInteger(mappings, i, state, 0); // genColumn
const col = state[0];

@@ -64,22 +55,30 @@ if (col < lastCol)

lastCol = col;
if (!hasMoreSegments(mappings, i)) {
line.push([col]);
continue;
if (hasMoreVlq(mappings, i, semi)) {
i = decodeInteger(mappings, i, state, 1); // sourcesIndex
i = decodeInteger(mappings, i, state, 2); // sourceLine
i = decodeInteger(mappings, i, state, 3); // sourceColumn
if (hasMoreVlq(mappings, i, semi)) {
i = decodeInteger(mappings, i, state, 4); // namesIndex
seg = [col, state[1], state[2], state[3], state[4]];
}
else {
seg = [col, state[1], state[2], state[3]];
}
}
i = decodeInteger(mappings, i, state, 1); // sourceFileIndex
i = decodeInteger(mappings, i, state, 2); // sourceCodeLine
i = decodeInteger(mappings, i, state, 3); // sourceCodeColumn
if (!hasMoreSegments(mappings, i)) {
line.push([col, state[1], state[2], state[3]]);
continue;
else {
seg = [col];
}
i = decodeInteger(mappings, i, state, 4); // nameIndex
line.push([col, state[1], state[2], state[3], state[4]]);
line.push(seg);
}
}
if (!sorted)
sort(line);
decoded.push(line);
if (!sorted)
sort(line);
decoded.push(line);
index = semi + 1;
} while (index <= mappings.length);
return decoded;
}
function indexOf(mappings, index) {
const idx = mappings.indexOf(';', index);
return idx === -1 ? mappings.length : idx;
}
function decodeInteger(mappings, pos, state, j) {

@@ -91,3 +90,3 @@ let value = 0;

const c = mappings.charCodeAt(pos++);
integer = charToInteger[c];
integer = charToInt[c];
value |= (integer & 31) << shift;

@@ -104,9 +103,6 @@ shift += 5;

}
function hasMoreSegments(mappings, i) {
if (i >= mappings.length)
function hasMoreVlq(mappings, i, length) {
if (i >= length)
return false;
const c = mappings.charCodeAt(i);
if (c === comma || c === semicolon)
return false;
return true;
return mappings.charCodeAt(i) !== comma;
}

@@ -121,8 +117,15 @@ function sort(line) {

const state = new Int32Array(5);
let buf = new Uint8Array(1024);
const bufLength = 1024 * 16;
const subLength = bufLength - 36;
const buf = new Uint8Array(bufLength);
const sub = buf.subarray(0, subLength);
let pos = 0;
let out = '';
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
if (i > 0) {
buf = reserve(buf, pos, 1);
if (pos === bufLength) {
out += td.decode(buf);
pos = 0;
}
buf[pos++] = semicolon;

@@ -137,25 +140,22 @@ }

// may push a comma.
buf = reserve(buf, pos, 36);
if (pos > subLength) {
out += td.decode(sub);
buf.copyWithin(0, subLength, pos);
pos -= subLength;
}
if (j > 0)
buf[pos++] = comma;
pos = encodeInteger(buf, pos, state, segment, 0); // generatedCodeColumn
pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
if (segment.length === 1)
continue;
pos = encodeInteger(buf, pos, state, segment, 1); // sourceFileIndex
pos = encodeInteger(buf, pos, state, segment, 2); // sourceCodeLine
pos = encodeInteger(buf, pos, state, segment, 3); // sourceCodeColumn
pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
if (segment.length === 4)
continue;
pos = encodeInteger(buf, pos, state, segment, 4); // nameIndex
pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
}
}
return td.decode(buf.subarray(0, pos));
return out + td.decode(buf.subarray(0, pos));
}
function reserve(buf, pos, count) {
if (buf.length > pos + count)
return buf;
const swap = new Uint8Array(buf.length * 2);
swap.set(buf);
return swap;
}
function encodeInteger(buf, pos, state, segment, j) {

@@ -185,4 +185,6 @@ const next = segment[j];

* 5. Path, including "/", optional.
* 6. Query, including "?", optional.
* 7. Hash, including "#", optional.
*/
const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?/;
const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
/**

@@ -193,5 +195,7 @@ * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start

* 1. Host, optional.
* 2. Path, which may inclue "/", guaranteed.
* 2. Path, which may include "/", guaranteed.
* 3. Query, including "?", optional.
* 4. Hash, including "#", optional.
*/
const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/]*)?)?(\/?.*)/i;
const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
function isAbsoluteUrl(input) {

@@ -209,5 +213,8 @@ return schemeRegex.test(input);

}
function isRelative(input) {
return /^[.?#]/.test(input);
}
function parseAbsoluteUrl(input) {
const match = urlRegex.exec(input);
return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/');
return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');
}

@@ -217,5 +224,5 @@ function parseFileUrl(input) {

const path = match[2];
return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path);
return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');
}
function makeUrl(scheme, user, host, port, path) {
function makeUrl(scheme, user, host, port, path, query, hash) {
return {

@@ -227,3 +234,5 @@ scheme,

path,
relativePath: false,
query,
hash,
type: 7 /* Absolute */,
};

@@ -235,2 +244,3 @@ }

url.scheme = '';
url.type = 6 /* SchemeRelative */;
return url;

@@ -242,2 +252,3 @@ }

url.host = '';
url.type = 5 /* AbsolutePath */;
return url;

@@ -252,3 +263,9 @@ }

url.host = '';
url.relativePath = true;
url.type = input
? input.startsWith('?')
? 3 /* Query */
: input.startsWith('#')
? 2 /* Hash */
: 4 /* RelativePath */
: 1 /* Empty */;
return url;

@@ -265,6 +282,3 @@ }

function mergePaths(url, base) {
// If we're not a relative path, then we're an absolute path, and it doesn't matter what base is.
if (!url.relativePath)
return;
normalizePath(base);
normalizePath(base, base.type);
// If the path is just a "/", then it was an empty path to begin with (remember, we're a relative

@@ -279,4 +293,2 @@ // path).

}
// If the base path is absolute, then our path is now absolute too.
url.relativePath = base.relativePath;
}

@@ -287,4 +299,4 @@ /**

*/
function normalizePath(url) {
const { relativePath } = url;
function normalizePath(url, type) {
const rel = type <= 4 /* RelativePath */;
const pieces = url.path.split('/');

@@ -321,3 +333,3 @@ // We need to preserve the first piece always, so that we output a leading slash. The item at

}
else if (relativePath) {
else if (rel) {
// If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute

@@ -350,33 +362,56 @@ // URL, protocol relative URL, or an absolute path, we don't need to keep excess.

const url = parseUrl(input);
// If we have a base, and the input isn't already an absolute URL, then we need to merge.
if (base && !url.scheme) {
let inputType = url.type;
if (base && inputType !== 7 /* Absolute */) {
const baseUrl = parseUrl(base);
url.scheme = baseUrl.scheme;
// If there's no host, then we were just a path.
if (!url.host) {
// The host, user, and port are joined, you can't copy one without the others.
url.user = baseUrl.user;
url.host = baseUrl.host;
url.port = baseUrl.port;
const baseType = baseUrl.type;
switch (inputType) {
case 1 /* Empty */:
url.hash = baseUrl.hash;
// fall through
case 2 /* Hash */:
url.query = baseUrl.query;
// fall through
case 3 /* Query */:
case 4 /* RelativePath */:
mergePaths(url, baseUrl);
// fall through
case 5 /* AbsolutePath */:
// The host, user, and port are joined, you can't copy one without the others.
url.user = baseUrl.user;
url.host = baseUrl.host;
url.port = baseUrl.port;
// fall through
case 6 /* SchemeRelative */:
// The input doesn't have a schema at least, so we need to copy at least that over.
url.scheme = baseUrl.scheme;
}
mergePaths(url, baseUrl);
if (baseType > inputType)
inputType = baseType;
}
normalizePath(url);
// If the input (and base, if there was one) are both relative, then we need to output a relative.
if (url.relativePath) {
// The first char is always a "/".
const path = url.path.slice(1);
if (!path)
return '.';
// If base started with a leading ".", or there is no base and input started with a ".", then we
// need to ensure that the relative path starts with a ".". We don't know if relative starts
// with a "..", though, so check before prepending.
const keepRelative = (base || input).startsWith('.');
return !keepRelative || path.startsWith('.') ? path : './' + path;
normalizePath(url, inputType);
const queryHash = url.query + url.hash;
switch (inputType) {
// This is impossible, because of the empty checks at the start of the function.
// case UrlType.Empty:
case 2 /* Hash */:
case 3 /* Query */:
return queryHash;
case 4 /* RelativePath */: {
// The first char is always a "/", and we need it to be relative.
const path = url.path.slice(1);
if (!path)
return queryHash || '.';
if (isRelative(base || input) && !isRelative(path)) {
// If base started with a leading ".", or there is no base and input started with a ".",
// then we need to ensure that the relative path starts with a ".". We don't know if
// relative starts with a "..", though, so check before prepending.
return './' + path + queryHash;
}
return path + queryHash;
}
case 5 /* AbsolutePath */:
return url.path + queryHash;
default:
return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;
}
// If there's no host (and no scheme/user/port), then we need to output an absolute path.
if (!url.scheme && !url.host)
return url.path;
// We're outputting either an absolute URL, or a protocol relative one.
return `${url.scheme}//${url.user}${url.host}${url.port}${url.path}`;
}

@@ -408,2 +443,4 @@

const NAMES_INDEX$1 = 4;
const REV_GENERATED_LINE = 1;
const REV_GENERATED_COLUMN = 2;

@@ -483,3 +520,3 @@ function maybeSort(mappings, owned) {

function upperBound(haystack, needle, index) {
for (let i = index + 1; i < haystack.length; i++, index++) {
for (let i = index + 1; i < haystack.length; index = i++) {
if (haystack[i][COLUMN$1] !== needle)

@@ -491,3 +528,3 @@ break;

function lowerBound(haystack, needle, index) {
for (let i = index - 1; i >= 0; i--, index--) {
for (let i = index - 1; i >= 0; index = i--) {
if (haystack[i][COLUMN$1] !== needle)

@@ -531,6 +568,49 @@ break;

// Rebuilds the original source files, with mappings that are ordered by source line/column instead
// of generated line/column.
function buildBySources(decoded, memos) {
const sources = memos.map(buildNullArray);
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
if (seg.length === 1)
continue;
const sourceIndex = seg[SOURCES_INDEX$1];
const sourceLine = seg[SOURCE_LINE$1];
const sourceColumn = seg[SOURCE_COLUMN$1];
const originalSource = sources[sourceIndex];
const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = []));
const memo = memos[sourceIndex];
// The binary search either found a match, or it found the left-index just before where the
// segment should go. Either way, we want to insert after that. And there may be multiple
// generated segments associated with an original location, so there may need to move several
// indexes before we find where we need to insert.
let index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine));
memo.lastIndex = ++index;
insert$1(originalLine, index, [sourceColumn, i, seg[COLUMN$1]]);
}
}
return sources;
}
function insert$1(array, index, value) {
for (let i = array.length; i > index; i--) {
array[i] = array[i - 1];
}
array[index] = value;
}
// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like
// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.
// Numeric properties on objects are magically sorted in ascending order by the engine regardless of
// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending
// order when iterating with for-in.
function buildNullArray() {
return { __proto__: null };
}
const AnyMap = function (map, mapUrl) {
const parsed = typeof map === 'string' ? JSON.parse(map) : map;
if (!('sections' in parsed))
const parsed = parse(map);
if (!('sections' in parsed)) {
return new TraceMap(parsed, mapUrl);
}
const mappings = [];

@@ -540,11 +620,4 @@ const sources = [];

const names = [];
const { sections } = parsed;
let i = 0;
for (; i < sections.length - 1; i++) {
const no = sections[i + 1].offset;
addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column);
}
if (sections.length > 0) {
addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity);
}
const ignoreList = [];
recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, ignoreList, 0, 0, Infinity, Infinity);
const joined = {

@@ -557,31 +630,62 @@ version: 3,

mappings,
ignoreList,
};
return presortedDecodedMap(joined);
};
function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) {
const map = AnyMap(section.map, mapUrl);
const { line: lineOffset, column: columnOffset } = section.offset;
function parse(map) {
return typeof map === 'string' ? JSON.parse(map) : map;
}
function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
const { sections } = input;
for (let i = 0; i < sections.length; i++) {
const { map, offset } = sections[i];
let sl = stopLine;
let sc = stopColumn;
if (i + 1 < sections.length) {
const nextOffset = sections[i + 1].offset;
sl = Math.min(stopLine, lineOffset + nextOffset.line);
if (sl === stopLine) {
sc = Math.min(stopColumn, columnOffset + nextOffset.column);
}
else if (sl < stopLine) {
sc = columnOffset + nextOffset.column;
}
}
addSection(map, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset + offset.line, columnOffset + offset.column, sl, sc);
}
}
function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
const parsed = parse(input);
if ('sections' in parsed)
return recurse(...arguments);
const map = new TraceMap(parsed, mapUrl);
const sourcesOffset = sources.length;
const namesOffset = names.length;
const decoded = decodedMappings(map);
const { resolvedSources } = map;
const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;
append(sources, resolvedSources);
append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length));
append(names, map.names);
// If this section jumps forwards several lines, we need to add lines to the output mappings catch up.
for (let i = mappings.length; i <= lineOffset; i++)
mappings.push([]);
// We can only add so many lines before we step into the range that the next section's map
// controls. When we get to the last line, then we'll start checking the segments to see if
// they've crossed into the column range.
const stopI = stopLine - lineOffset;
const len = Math.min(decoded.length, stopI + 1);
for (let i = 0; i < len; i++) {
const line = decoded[i];
// On the 0th loop, the line will already exist due to a previous section, or the line catch up
// loop above.
const out = i === 0 ? mappings[lineOffset] : (mappings[lineOffset + i] = []);
if (contents)
append(sourcesContent, contents);
else
for (let i = 0; i < resolvedSources.length; i++)
sourcesContent.push(null);
if (ignores)
for (let i = 0; i < ignores.length; i++)
ignoreList.push(ignores[i] + sourcesOffset);
for (let i = 0; i < decoded.length; i++) {
const lineI = lineOffset + i;
// We can only add so many lines before we step into the range that the next section's map
// controls. When we get to the last line, then we'll start checking the segments to see if
// they've crossed into the column range. But it may not have any columns that overstep, so we
// still need to check that we don't overstep lines, too.
if (lineI > stopLine)
return;
// The out line may already exist in mappings (if we're continuing the line started by a
// previous section). Or, we may have jumped ahead several lines to start this section.
const out = getLine$1(mappings, lineI);
// On the 0th loop, the section's column offset shifts us forward. On all other lines (since the
// map can be multiple lines), it doesn't.
const cOffset = i === 0 ? columnOffset : 0;
const line = decoded[i];
for (let j = 0; j < line.length; j++) {

@@ -592,4 +696,4 @@ const seg = line[j];

// to stop early.
if (i === stopI && column >= stopColumn)
break;
if (lineI === stopLine && column >= stopColumn)
return;
if (seg.length === 1) {

@@ -602,7 +706,5 @@ out.push([column]);

const sourceColumn = seg[SOURCE_COLUMN$1];
if (seg.length === 4) {
out.push([column, sourcesIndex, sourceLine, sourceColumn]);
continue;
}
out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX$1]]);
out.push(seg.length === 4
? [column, sourcesIndex, sourceLine, sourceColumn]
: [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX$1]]);
}

@@ -615,23 +717,8 @@ }

}
// Sourcemaps don't need to have sourcesContent, and if they don't, we need to create an array of
// equal length to the sources. This is because the sources and sourcesContent are paired arrays,
// where `sourcesContent[i]` is the content of the `sources[i]` file. If we didn't, then joined
// sourcemap would desynchronize the sources/contents.
function fillSourcesContent(len) {
const sourcesContent = [];
for (let i = 0; i < len; i++)
sourcesContent[i] = null;
return sourcesContent;
function getLine$1(arr, index) {
for (let i = arr.length; i <= index; i++)
arr[i] = [];
return arr[index];
}
const INVALID_ORIGINAL_MAPPING = Object.freeze({
source: null,
line: null,
column: null,
name: null,
});
Object.freeze({
line: null,
column: null,
});
const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';

@@ -641,24 +728,6 @@ const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';

const GREATEST_LOWER_BOUND = 1;
/**
* Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
*/
let decodedMappings;
/**
* A higher-level API to find the source/line/column associated with a generated line/column
* (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
* `source-map` library.
*/
let originalPositionFor;
/**
* A helper that skips sorting of the input map's mappings array, which can be expensive for larger
* maps.
*/
let presortedDecodedMap;
class TraceMap {
constructor(map, mapUrl) {
this._decodedMemo = memoizedState();
this._bySources = undefined;
this._bySourceMemos = undefined;
const isString = typeof map === 'string';
if (!isString && map.constructor === TraceMap)
if (!isString && map._decodedMemo)
return map;

@@ -669,13 +738,9 @@ const parsed = (isString ? JSON.parse(map) : map);

this.file = file;
this.names = names;
this.names = names || [];
this.sourceRoot = sourceRoot;
this.sources = sources;
this.sourcesContent = sourcesContent;
if (sourceRoot || mapUrl) {
const from = resolve(sourceRoot || '', stripFilename(mapUrl));
this.resolvedSources = sources.map((s) => resolve(s || '', from));
}
else {
this.resolvedSources = sources.map((s) => s || '');
}
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined;
const from = resolve(sourceRoot || '', stripFilename(mapUrl));
this.resolvedSources = sources.map((s) => resolve(s || '', from));
const { mappings } = parsed;

@@ -690,40 +755,149 @@ if (typeof mappings === 'string') {

}
this._decodedMemo = memoizedState();
this._bySources = undefined;
this._bySourceMemos = undefined;
}
}
(() => {
decodedMappings = (map) => {
return (map._decoded || (map._decoded = decode(map._encoded)));
/**
* Typescript doesn't allow friend access to private fields, so this just casts the map into a type
* with public access modifiers.
*/
function cast$2(map) {
return map;
}
/**
* Returns the encoded (VLQ string) form of the SourceMap's mappings field.
*/
function encodedMappings(map) {
var _a;
var _b;
return ((_a = (_b = cast$2(map))._encoded) !== null && _a !== void 0 ? _a : (_b._encoded = encode(cast$2(map)._decoded)));
}
/**
* Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
*/
function decodedMappings(map) {
var _a;
return ((_a = cast$2(map))._decoded || (_a._decoded = decode(cast$2(map)._encoded)));
}
/**
* A higher-level API to find the source/line/column associated with a generated line/column
* (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
* `source-map` library.
*/
function originalPositionFor(map, needle) {
let { line, column, bias } = needle;
line--;
if (line < 0)
throw new Error(LINE_GTR_ZERO);
if (column < 0)
throw new Error(COL_GTR_EQ_ZERO);
const decoded = decodedMappings(map);
// It's common for parent source maps to have pointers to lines that have no
// mapping (like a "//# sourceMappingURL=") at the end of the child file.
if (line >= decoded.length)
return OMapping(null, null, null, null);
const segments = decoded[line];
const index = traceSegmentInternal(segments, cast$2(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
if (index === -1)
return OMapping(null, null, null, null);
const segment = segments[index];
if (segment.length === 1)
return OMapping(null, null, null, null);
const { names, resolvedSources } = map;
return OMapping(resolvedSources[segment[SOURCES_INDEX$1]], segment[SOURCE_LINE$1] + 1, segment[SOURCE_COLUMN$1], segment.length === 5 ? names[segment[NAMES_INDEX$1]] : null);
}
/**
* Finds the generated line/column position of the provided source/line/column source position.
*/
function generatedPositionFor(map, needle) {
const { source, line, column, bias } = needle;
return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
}
/**
* Finds all generated line/column positions of the provided source/line/column source position.
*/
function allGeneratedPositionsFor(map, needle) {
const { source, line, column, bias } = needle;
// SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.
return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
}
/**
* Iterates each mapping in generated position order.
*/
function eachMapping(map, cb) {
const decoded = decodedMappings(map);
const { names, resolvedSources } = map;
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
const generatedLine = i + 1;
const generatedColumn = seg[0];
let source = null;
let originalLine = null;
let originalColumn = null;
let name = null;
if (seg.length !== 1) {
source = resolvedSources[seg[1]];
originalLine = seg[2] + 1;
originalColumn = seg[3];
}
if (seg.length === 5)
name = names[seg[4]];
cb({
generatedLine,
generatedColumn,
source,
originalLine,
originalColumn,
name,
});
}
}
}
function sourceIndex(map, source) {
const { sources, resolvedSources } = map;
let index = sources.indexOf(source);
if (index === -1)
index = resolvedSources.indexOf(source);
return index;
}
/**
* Retrieves the source content for a particular source, if its found. Returns null if not.
*/
function sourceContentFor(map, source) {
const { sourcesContent } = map;
if (sourcesContent == null)
return null;
const index = sourceIndex(map, source);
return index === -1 ? null : sourcesContent[index];
}
/**
* A helper that skips sorting of the input map's mappings array, which can be expensive for larger
* maps.
*/
function presortedDecodedMap(map, mapUrl) {
const tracer = new TraceMap(clone(map, []), mapUrl);
cast$2(tracer)._decoded = map.mappings;
return tracer;
}
function clone(map, mappings) {
return {
version: map.version,
file: map.file,
names: map.names,
sourceRoot: map.sourceRoot,
sources: map.sources,
sourcesContent: map.sourcesContent,
mappings,
ignoreList: map.ignoreList || map.x_google_ignoreList,
};
originalPositionFor = (map, { line, column, bias }) => {
line--;
if (line < 0)
throw new Error(LINE_GTR_ZERO);
if (column < 0)
throw new Error(COL_GTR_EQ_ZERO);
const decoded = decodedMappings(map);
// It's common for parent source maps to have pointers to lines that have no
// mapping (like a "//# sourceMappingURL=") at the end of the child file.
if (line >= decoded.length)
return INVALID_ORIGINAL_MAPPING;
const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
if (segment == null)
return INVALID_ORIGINAL_MAPPING;
if (segment.length == 1)
return INVALID_ORIGINAL_MAPPING;
const { names, resolvedSources } = map;
return {
source: resolvedSources[segment[SOURCES_INDEX$1]],
line: segment[SOURCE_LINE$1] + 1,
column: segment[SOURCE_COLUMN$1],
name: segment.length === 5 ? names[segment[NAMES_INDEX$1]] : null,
};
};
presortedDecodedMap = (map, mapUrl) => {
const clone = Object.assign({}, map);
clone.mappings = [];
const tracer = new TraceMap(clone, mapUrl);
tracer._decoded = map.mappings;
return tracer;
};
})();
}
function OMapping(source, line, column, name) {
return { source, line, column, name };
}
function GMapping(line, column) {
return { line, column };
}
function traceSegmentInternal(segments, memo, line, column, bias) {

@@ -737,16 +911,60 @@ let index = memoizedBinarySearch(segments, column, memo, line);

if (index === -1 || index === segments.length)
return null;
return segments[index];
return -1;
return index;
}
function sliceGeneratedPositions(segments, memo, line, column, bias) {
let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
// We ignored the bias when tracing the segment so that we're guarnateed to find the first (in
// insertion order) segment that matched. Even if we did respect the bias when tracing, we would
// still need to call `lowerBound()` to find the first segment, which is slower than just looking
// for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the
// binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to
// match LEAST_UPPER_BOUND.
if (!found && bias === LEAST_UPPER_BOUND)
min++;
if (min === -1 || min === segments.length)
return [];
// We may have found the segment that started at an earlier column. If this is the case, then we
// need to slice all generated segments that match _that_ column, because all such segments span
// to our desired column.
const matchedColumn = found ? column : segments[min][COLUMN$1];
// The binary search is not guaranteed to find the lower bound when a match wasn't found.
if (!found)
min = lowerBound(segments, matchedColumn, min);
const max = upperBound(segments, matchedColumn, min);
const result = [];
for (; min <= max; min++) {
const segment = segments[min];
result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
}
return result;
}
function generatedPosition(map, source, line, column, bias, all) {
var _a;
line--;
if (line < 0)
throw new Error(LINE_GTR_ZERO);
if (column < 0)
throw new Error(COL_GTR_EQ_ZERO);
const { sources, resolvedSources } = map;
let sourceIndex = sources.indexOf(source);
if (sourceIndex === -1)
sourceIndex = resolvedSources.indexOf(source);
if (sourceIndex === -1)
return all ? [] : GMapping(null, null);
const generated = ((_a = cast$2(map))._bySources || (_a._bySources = buildBySources(decodedMappings(map), (cast$2(map)._bySourceMemos = sources.map(memoizedState)))));
const segments = generated[sourceIndex][line];
if (segments == null)
return all ? [] : GMapping(null, null);
const memo = cast$2(map)._bySourceMemos[sourceIndex];
if (all)
return sliceGeneratedPositions(segments, memo, line, column, bias);
const index = traceSegmentInternal(segments, memo, line, column, bias);
if (index === -1)
return GMapping(null, null);
const segment = segments[index];
return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
}
/**
* Gets the index associated with `key` in the backing array, if it is already present.
*/
let get;
/**
* Puts `key` into the backing array, if it is not already present. Returns
* the index of the `key` in the backing array.
*/
let put;
/**
* SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the

@@ -765,13 +983,28 @@ * index of the `key` in the backing array.

}
(() => {
get = (strarr, key) => strarr._indexes[key];
put = (strarr, key) => {
// The key may or may not be present. If it is present, it's a number.
const index = get(strarr, key);
if (index !== undefined)
return index;
const { array, _indexes: indexes } = strarr;
return (indexes[key] = array.push(key) - 1);
};
})();
/**
* Typescript doesn't allow friend access to private fields, so this just casts the set into a type
* with public access modifiers.
*/
function cast$1(set) {
return set;
}
/**
* Gets the index associated with `key` in the backing array, if it is already present.
*/
function get(setarr, key) {
return cast$1(setarr)._indexes[key];
}
/**
* Puts `key` into the backing array, if it is not already present. Returns
* the index of the `key` in the backing array.
*/
function put(setarr, key) {
// The key may or may not be present. If it is present, it's a number.
const index = get(setarr, key);
if (index !== undefined)
return index;
const { array, _indexes: indexes } = cast$1(setarr);
const length = array.push(key);
return (indexes[key] = length - 1);
}

@@ -786,2 +1019,23 @@ const COLUMN = 0;

/**
* Provides the state to generate a sourcemap.
*/
class GenMapping {
constructor({ file, sourceRoot } = {}) {
this._names = new SetArray();
this._sources = new SetArray();
this._sourcesContent = [];
this._mappings = [];
this.file = file;
this.sourceRoot = sourceRoot;
this._ignoreList = new SetArray();
}
}
/**
* Typescript doesn't allow friend access to private fields, so this just casts the map into a type
* with public access modifiers.
*/
function cast(map) {
return map;
}
/**
* Same as `addMapping`, but will only add the mapping if it generates useful information in the

@@ -791,7 +1045,13 @@ * resulting map. This only works correctly if mappings are added **in order**, meaning you should

*/
let maybeAddMapping;
const maybeAddMapping = (map, mapping) => {
return addMappingInternal(true, map, mapping);
};
/**
* Adds/removes the content of the source file to the source map.
*/
let setSourceContent;
function setSourceContent(map, source, content) {
const { _sources: sources, _sourcesContent: sourcesContent } = cast(map);
const index = put(sources, source);
sourcesContent[index] = content;
}
/**

@@ -801,3 +1061,16 @@ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects

*/
let toDecodedMap;
function toDecodedMap(map) {
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList, } = cast(map);
removeEmptyFinalLines(mappings);
return {
version: 3,
file: map.file || undefined,
names: names.array,
sourceRoot: map.sourceRoot || undefined,
sources: sources.array,
sourcesContent,
mappings,
ignoreList: ignoreList.array,
};
}
/**

@@ -807,65 +1080,41 @@ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects

*/
let toEncodedMap;
// This split declaration is only so that terser can elminiate the static initialization block.
let addSegmentInternal;
function toEncodedMap(map) {
const decoded = toDecodedMap(map);
return Object.assign(Object.assign({}, decoded), { mappings: encode(decoded.mappings) });
}
/**
* Provides the state to generate a sourcemap.
* Constructs a new GenMapping, using the already present mappings of the input.
*/
class GenMapping {
constructor({ file, sourceRoot } = {}) {
this._names = new SetArray();
this._sources = new SetArray();
this._sourcesContent = [];
this._mappings = [];
this.file = file;
this.sourceRoot = sourceRoot;
function fromMap(input) {
const map = new TraceMap(input);
const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
putAll(cast(gen)._names, map.names);
putAll(cast(gen)._sources, map.sources);
cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);
cast(gen)._mappings = decodedMappings(map);
if (map.ignoreList)
putAll(cast(gen)._ignoreList, map.ignoreList);
return gen;
}
// This split declaration is only so that terser can elminiate the static initialization block.
function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = cast(map);
const line = getLine(mappings, genLine);
const index = getColumnIndex(line, genColumn);
if (!source) {
if (skipable && skipSourceless(line, index))
return;
return insert(line, index, [genColumn]);
}
const sourcesIndex = put(sources, source);
const namesIndex = name ? put(names, name) : NO_NAME;
if (sourcesIndex === sourcesContent.length)
sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null;
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
return;
}
return insert(line, index, name
? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
: [genColumn, sourcesIndex, sourceLine, sourceColumn]);
}
(() => {
maybeAddMapping = (map, mapping) => {
return addMappingInternal(true, map, mapping);
};
setSourceContent = (map, source, content) => {
const { _sources: sources, _sourcesContent: sourcesContent } = map;
sourcesContent[put(sources, source)] = content;
};
toDecodedMap = (map) => {
const { file, sourceRoot, _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;
removeEmptyFinalLines(mappings);
return {
version: 3,
file: file || undefined,
names: names.array,
sourceRoot: sourceRoot || undefined,
sources: sources.array,
sourcesContent,
mappings,
};
};
toEncodedMap = (map) => {
const decoded = toDecodedMap(map);
return Object.assign(Object.assign({}, decoded), { mappings: encode(decoded.mappings) });
};
// Internal helpers
addSegmentInternal = (skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name) => {
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;
const line = getLine(mappings, genLine);
const index = getColumnIndex(line, genColumn);
if (!source) {
if (skipable && skipSourceless(line, index))
return;
return insert(line, index, [genColumn]);
}
const sourcesIndex = put(sources, source);
const namesIndex = name ? put(names, name) : NO_NAME;
if (sourcesIndex === sourcesContent.length)
sourcesContent[sourcesIndex] = null;
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
return;
}
return insert(line, index, name
? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
: [genColumn, sourcesIndex, sourceLine, sourceColumn]);
};
})();
function getLine(mappings, index) {

@@ -902,2 +1151,6 @@ for (let i = mappings.length; i <= index; i++) {

}
function putAll(setarr, array) {
for (let i = 0; i < array.length; i++)
put(setarr, array[i]);
}
function skipSourceless(line, index) {

@@ -930,8 +1183,7 @@ // The start of a line is already sourceless, so adding a sourceless segment to the beginning

function addMappingInternal(skipable, map, mapping) {
const { generated, source, original, name } = mapping;
const { generated, source, original, name, content } = mapping;
if (!source) {
return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null);
return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null);
}
const s = source;
return addSegmentInternal(skipable, map, generated.line - 1, generated.column, s, original.line - 1, original.column, name);
return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content);
}

@@ -947,6 +1199,50 @@

this.sourcesContent = trace.sourcesContent;
this.version = trace.version;
}
static fromSourceMap(map, mapUrl) {
// This is more performant if we receive
// a @jridgewell/source-map SourceMapGenerator
if (map.toDecodedMap) {
return new SourceMapConsumer(map.toDecodedMap(), mapUrl);
}
// This is a fallback for `source-map` and `source-map-js`
return new SourceMapConsumer(map.toJSON(), mapUrl);
}
get mappings() {
return encodedMappings(this._map);
}
originalPositionFor(needle) {
return originalPositionFor(this._map, needle);
}
generatedPositionFor(originalPosition) {
return generatedPositionFor(this._map, originalPosition);
}
allGeneratedPositionsFor(originalPosition) {
return allGeneratedPositionsFor(this._map, originalPosition);
}
hasContentsOfAllSources() {
if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) {
return false;
}
for (const content of this.sourcesContent) {
if (content == null) {
return false;
}
}
return true;
}
sourceContentFor(source, nullOnMissing) {
const sourceContent = sourceContentFor(this._map, source);
if (sourceContent != null) {
return sourceContent;
}
if (nullOnMissing) {
return null;
}
throw new Error(`"${source}" is not in the SourceMap.`);
}
eachMapping(callback, context /*, order?: number*/) {
// order is ignored as @jridgewell/trace-map doesn't implement it
eachMapping(this._map, context ? callback.bind(context) : callback);
}
destroy() {

@@ -958,4 +1254,8 @@ // noop.

constructor(opts) {
this._map = new GenMapping(opts);
// TODO :: should this be duck-typed ?
this._map = opts instanceof GenMapping ? opts : new GenMapping(opts);
}
static fromSourceMap(consumer) {
return new SourceMapGenerator(fromMap(consumer));
}
addMapping(mapping) {

@@ -970,2 +1270,5 @@ maybeAddMapping(this._map, mapping);

}
toString() {
return JSON.stringify(this.toJSON());
}
toDecodedMap() {

@@ -972,0 +1275,0 @@ return toDecodedMap(this._map);

@@ -1,7 +0,7 @@

import { AnyMap, originalPositionFor } from '@jridgewell/trace-mapping';
import { AnyMap, originalPositionFor, generatedPositionFor, eachMapping } from '@jridgewell/trace-mapping';
import { GenMapping, maybeAddMapping, toDecodedMap, toEncodedMap, setSourceContent } from '@jridgewell/gen-mapping';
import type { TraceMap, SectionedSourceMapInput } from '@jridgewell/trace-mapping';
export type { TraceMap, SectionedSourceMapInput };
import type { Mapping, EncodedSourceMap, DecodedSourceMap } from '@jridgewell/gen-mapping';
export type { Mapping, EncodedSourceMap, DecodedSourceMap };
import type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap } from '@jridgewell/trace-mapping';
export type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap };
import type { Mapping, EncodedSourceMap } from '@jridgewell/gen-mapping';
export type { Mapping, EncodedSourceMap };
export declare class SourceMapConsumer {

@@ -14,4 +14,12 @@ private _map;

sourcesContent: TraceMap['sourcesContent'];
version: TraceMap['version'];
constructor(map: ConstructorParameters<typeof AnyMap>[0], mapUrl: Parameters<typeof AnyMap>[1]);
static fromSourceMap(map: SourceMapGenerator, mapUrl: Parameters<typeof AnyMap>[1]): SourceMapConsumer;
get mappings(): string;
originalPositionFor(needle: Parameters<typeof originalPositionFor>[1]): ReturnType<typeof originalPositionFor>;
generatedPositionFor(originalPosition: Parameters<typeof generatedPositionFor>[1]): ReturnType<typeof generatedPositionFor>;
allGeneratedPositionsFor(originalPosition: Parameters<typeof generatedPositionFor>[1]): ReturnType<typeof generatedPositionFor>[];
hasContentsOfAllSources(): boolean;
sourceContentFor(source: string, nullOnMissing?: boolean): string | null;
eachMapping(callback: Parameters<typeof eachMapping>[1], context?: any): void;
destroy(): void;

@@ -21,7 +29,9 @@ }

private _map;
constructor(opts: ConstructorParameters<typeof GenMapping>[0]);
constructor(opts: ConstructorParameters<typeof GenMapping>[0] | GenMapping);
static fromSourceMap(consumer: SourceMapConsumer): SourceMapGenerator;
addMapping(mapping: Parameters<typeof maybeAddMapping>[1]): ReturnType<typeof maybeAddMapping>;
setSourceContent(source: Parameters<typeof setSourceContent>[1], content: Parameters<typeof setSourceContent>[2]): ReturnType<typeof setSourceContent>;
toJSON(): ReturnType<typeof toEncodedMap>;
toString(): string;
toDecodedMap(): ReturnType<typeof toDecodedMap>;
}
{
"name": "@jridgewell/source-map",
"version": "0.3.5",
"version": "0.3.6",
"description": "Packages @jridgewell/trace-mapping and @jridgewell/gen-mapping into the familiar source-map API",

@@ -13,3 +13,3 @@ "keywords": [

"repository": "https://github.com/jridgewell/source-map",
"main": "dist/source-map.umd.js",
"main": "dist/source-map.cjs",
"module": "dist/source-map.mjs",

@@ -22,6 +22,6 @@ "types": "dist/types/source-map.d.ts",

"browser": "./dist/source-map.umd.js",
"require": "./dist/source-map.umd.js",
"require": "./dist/source-map.cjs",
"import": "./dist/source-map.mjs"
},
"./dist/source-map.umd.js"
"./dist/source-map.cjs"
],

@@ -41,11 +41,10 @@ "./package.json": "./package.json"

"lint:ts": "npm run test:lint:ts -- --fix",
"pretest": "run-s build:rollup",
"test": "run-s -n test:lint test:only",
"test:debug": "mocha --inspect-brk",
"test:debug": "ts-mocha --inspect-brk",
"test:lint": "run-s -n test:lint:*",
"test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
"test:lint:ts": "eslint '{src,test}/**/*.ts'",
"test:only": "mocha",
"test:coverage": "c8 mocha",
"test:watch": "mocha --watch",
"test:only": "ts-mocha",
"test:coverage": "c8 --reporter text --reporter html ts-mocha",
"test:watch": "ts-mocha --watch",
"prepublishOnly": "npm run preversion",

@@ -64,12 +63,13 @@ "preversion": "run-s test build"

"eslint-config-prettier": "8.3.0",
"mocha": "9.2.0",
"mocha": "10.0.0",
"npm-run-all": "4.1.5",
"prettier": "2.5.1",
"rollup": "2.66.0",
"ts-mocha": "10.0.0",
"typescript": "4.5.5"
},
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.0",
"@jridgewell/trace-mapping": "^0.3.9"
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.25"
}
}

@@ -31,2 +31,13 @@ # @jridgewell/source-map

#### SourceMapConsumer.fromSourceMap(mapGenerator[, mapUrl])
Transforms a `SourceMapGenerator` into a `SourceMapConsumer`.
```typescript
const smg = new SourceMapGenerator();
const smc = SourceMapConsumer.fromSourceMap(map);
smc.originalPositionFor({ line: 1, column: 0 });
```
#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)

@@ -39,2 +50,64 @@

#### SourceMapConsumer.prototype.mappings
```typescript
const smc = new SourceMapConsumer(map);
smc.mappings; // AAAA
```
#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
```typescript
const smc = new SourceMapConsumer(map);
smc.allGeneratedpositionsfor({ line: 1, column: 5, source: "baz.ts" });
// [
// { line: 2, column: 8 }
// ]
```
#### SourceMapConsumer.prototype.eachMapping(callback[, context[, order]])
> This implementation currently does not support the "order" parameter.
> This function can only iterate in Generated order.
```typescript
const smc = new SourceMapConsumer(map);
smc.eachMapping((mapping) => {
// { source: 'baz.ts',
// generatedLine: 4,
// generatedColumn: 5,
// originalLine: 4,
// originalColumn: 5,
// name: null }
});
```
#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
```typescript
const smc = new SourceMapConsumer(map);
smc.generatedPositionFor({ line: 1, column: 5, source: "baz.ts" });
// { line: 2, column: 8 }
```
#### SourceMapConsumer.prototype.hasContentsOfAllSources()
```typescript
const smc = new SourceMapConsumer(map);
smc.hasContentsOfAllSources();
// true
```
#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])
```typescript
const smc = new SourceMapConsumer(map);
smc.generatedPositionFor("baz.ts");
// "export default ..."
```
#### SourceMapConsumer.prototype.version
Returns the source map's version
### SourceMapGenerator

@@ -50,2 +123,15 @@

#### SourceMapGenerator.fromSourceMap(map)
Transform a `SourceMapConsumer` into a `SourceMapGenerator`.
```typescript
const smc = new SourceMapConsumer();
const smg = SourceMapGenerator.fromSourceMap(smc);
```
#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])
> This method is not implemented yet
#### SourceMapGenerator.prototype.addMapping(mapping)

@@ -77,2 +163,9 @@

#### SourceMapGenerator.prototype.toString()
```typescript
const smg = new SourceMapGenerator();
smg.toJSON(); // "{version:3,names:[],sources:[],mappings:''}"
```
#### SourceMapGenerator.prototype.toDecodedMap()

@@ -85,3 +178,12 @@

## Known differences with other implementations
This implementation has some differences with `source-map` and `source-map-js`.
- `SourceMapConsumer.prototype.eachMapping()`
- Does not support the `order` argument
- `SourceMapGenerator.prototype.applySourceMap()`
- Not implemented
[trace-mapping]: https://github.com/jridgewell/trace-mapping/
[gen-mapping]: https://github.com/jridgewell/gen-mapping/

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet