Releases: jridgewell/gen-mapping
Releases · jridgewell/gen-mapping
v0.3.5
v0.3.4
Full Changelog: v0.3.3...v0.3.4
v0.3.3
Full Changelog: v0.3.2...v0.3.3
v0.3.2
Internal
- [meta] fix "exports" for node 13.0-13.6 by @ljharb in #4
- Fix built sources paths
New Contributors
Full Changelog: v0.3.1...v0.3.2
v0.3.1
What's Changed
Full Changelog: v0.3.0...v0.3.1
v0.3.0
Breaking Changes
-
Segments are no longer sorted by
sourcesIndex
/sourceLine
/sourceColumn
/namesIndex
when insertingSegments are still ordered by
genColumn
, since this affects the binary search algorithm when tracing. For the other fields, it's not clear that we should sort them. Instead, they're sorted in the order they were added to the map. This allows themaybeAdd*
APIs to work.
New Features
- Add
maybeAdd*
APIs by @jridgewell in #1
Full Changelog: v0.2.0...v0.3.0
v0.2.0
v0.1.1
v0.1.0
import { GenMapping, addMapping, setSourceContent, encodedMap } from '@jridgewell/gen-mapping';
const map = new GenMapping({
file: 'output.js',
sourceRoot: 'https://example.com/',
});
setSourceContent(map, 'input.js', `function foo() {}`);
addMapping(map, {
// Lines start at line 1, columns at column 0.
generated: { line: 1, column: 0 },
source: 'input.js',
original: { line: 1, column: 0 },
});
addMapping(map, {
generated: { line: 1, column: 9 },
source: 'input.js',
original: { line: 1, column: 9 },
name: 'foo',
});
assert.deepEqual(encodedMap(map), {
version: 3,
file: 'output.js',
names: ['foo'],
sourceRoot: 'https://example.com/',
sources: ['input.js'],
sourcesContent: ['function foo() {}'],
mappings: 'AAAA,SAASA',
});
Full Changelog: https://github.com/jridgewell/gen-mapping/commits/v0.1.0