@jridgewell/trace-mapping
Advanced tools
Comparing version 0.3.14 to 0.3.15
@@ -352,5 +352,2 @@ (function (global, factory) { | ||
constructor(map, mapUrl) { | ||
this._decodedMemo = memoizedState(); | ||
this._bySources = undefined; | ||
this._bySourceMemos = undefined; | ||
const isString = typeof map === 'string'; | ||
@@ -378,2 +375,5 @@ if (!isString && map._decodedMemo) | ||
} | ||
this._decodedMemo = memoizedState(); | ||
this._bySources = undefined; | ||
this._bySourceMemos = undefined; | ||
} | ||
@@ -479,5 +479,3 @@ } | ||
exports.presortedDecodedMap = (map, mapUrl) => { | ||
const clone = Object.assign({}, map); | ||
clone.mappings = []; | ||
const tracer = new TraceMap(clone, mapUrl); | ||
const tracer = new TraceMap(clone(map, []), mapUrl); | ||
tracer._decoded = map.mappings; | ||
@@ -487,24 +485,19 @@ return tracer; | ||
exports.decodedMap = (map) => { | ||
return { | ||
version: 3, | ||
file: map.file, | ||
names: map.names, | ||
sourceRoot: map.sourceRoot, | ||
sources: map.sources, | ||
sourcesContent: map.sourcesContent, | ||
mappings: exports.decodedMappings(map), | ||
}; | ||
return clone(map, exports.decodedMappings(map)); | ||
}; | ||
exports.encodedMap = (map) => { | ||
return { | ||
version: 3, | ||
file: map.file, | ||
names: map.names, | ||
sourceRoot: map.sourceRoot, | ||
sources: map.sources, | ||
sourcesContent: map.sourcesContent, | ||
mappings: exports.encodedMappings(map), | ||
}; | ||
return clone(map, exports.encodedMappings(map)); | ||
}; | ||
})(); | ||
function clone(map, mappings) { | ||
return { | ||
version: map.version, | ||
file: map.file, | ||
names: map.names, | ||
sourceRoot: map.sourceRoot, | ||
sources: map.sources, | ||
sourcesContent: map.sourcesContent, | ||
mappings, | ||
}; | ||
} | ||
function OMapping(source, line, column, name) { | ||
@@ -511,0 +504,0 @@ return { source, line, column, name }; |
{ | ||
"name": "@jridgewell/trace-mapping", | ||
"version": "0.3.14", | ||
"version": "0.3.15", | ||
"description": "Trace the original position through a source map", | ||
@@ -13,4 +13,3 @@ "keywords": [ | ||
"files": [ | ||
"dist", | ||
"src" | ||
"dist" | ||
], | ||
@@ -17,0 +16,0 @@ "exports": { |
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
150913
16
1243