...
 
Commits (6)
# sourcemap-codec changelog
## 1.4.4
* Use Uint32Array, yikes ([#77](https://github.com/Rich-Harris/sourcemap-codec/pull/77))
## 1.4.3
* Use Uint16Array to prevent overflow ([#75](https://github.com/Rich-Harris/sourcemap-codec/pull/75))
......
node-sourcemap-codec (1.4.4-1) unstable; urgency=medium
* Unbreak Vcs-* fields.
* New upstream release.
* Run upstream test suite in autopkgtest.
-- Julien Puydt <jpuydt@debian.org> Fri, 23 Nov 2018 23:19:15 +0100
node-sourcemap-codec (1.4.3-1) unstable; urgency=medium
* New upstream release.
......
......@@ -6,8 +6,8 @@ Uploaders: Julien Puydt <jpuydt@debian.org>
Build-Depends: debhelper (>= 11), nodejs, node-es6-module-transpiler, node-typescript, node-vlq
Standards-Version: 4.2.1
Homepage: https://github.com/Rich-Harris/sourcemap-codec
Vcs-Git: https://salsa.debian.org/git/js-team/node-sourcemap-codec.git
Vcs-Browser: https://salsa.debian.org/cgit/js-team/node-sourcemap-codec
Vcs-Git: https://salsa.debian.org/js-team/node-sourcemap-codec.git
Vcs-Browser: https://salsa.debian.org/js-team/node-sourcemap-codec
Package: node-sourcemap-codec
Architecture: all
......
Tests: require
Depends: node-sourcemap-codec
Depends: @
Tests: upstreamtestsuite
Depends: @, mocha, node-console-group
#!/bin/sh
set -e
sed test/test.js -e "s|('../')|('sourcemap-codec')|g" > test.js
mocha test.js
{
"name": "sourcemap-codec",
"version": "1.4.3",
"version": "1.4.4",
"description": "Encode/decode sourcemap mappings",
"main": "dist/sourcemap-codec.umd.js",
"module": "dist/sourcemap-codec.es.js",
......
......@@ -27,12 +27,12 @@ export function decode(mappings: string): SourceMapMappings {
const c = mappings.charCodeAt(i);
if (c === 44) { // ","
if (segment.length) line.push(new Int16Array(segment) as any);
if (segment.length) line.push(new Int32Array(segment) as any);
segment = [];
j = 0;
} else if (c === 59) { // ";"
if (segment.length) line.push(new Int16Array(segment) as any);
if (segment.length) line.push(new Int32Array(segment) as any);
segment = [];
j = 0;
decoded.push(line);
......@@ -85,7 +85,7 @@ export function decode(mappings: string): SourceMapMappings {
}
}
if (segment.length) line.push(new Int16Array(segment) as any);
if (segment.length) line.push(new Int32Array(segment) as any);
decoded.push(line);
return decoded;
......
......@@ -133,6 +133,18 @@ describe('sourcemap-codec', () => {
[282, 0, 13, 34]
]
]
},
{
// Make sure Int16 isn't being used
encoded: "gw+BAAAA,w+BAAAA,w+BAAAA,w+BAAAA",
decoded: [
[
[32000,0,0,0,0],
[33000,0,0,0,0],
[34000,0,0,0,0],
[35000,0,0,0,0]
]
]
}
];
......