Socket
Socket
Sign inDemoInstall

source-list-map

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

source-list-map - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

test/fixtures/from-to-tests/babel-source.js

0

lib/base64-vlq.js

@@ -0,0 +0,0 @@ /* -*- Mode: js; js-indent-level: 2; -*- */

@@ -32,2 +32,10 @@ /*

});
if(mappings.length < lines.length) {
var idx = mappings.length;
while(!lines[idx].trim() && idx < lines.length-1) {
addCode(lines[idx] + "\n");
idx++;
}
addCode(lines.slice(idx).join("\n"));
}
return new SourceListMap(nodes);

@@ -34,0 +42,0 @@ function processMapping(mapping, line, ignore) {

2

package.json
{
"name": "source-list-map",
"version": "0.1.4",
"version": "0.1.5",
"description": "Fast line to line SourceMap generator.",

@@ -5,0 +5,0 @@ "author": "Tobias Koppers @sokra",

@@ -20,4 +20,19 @@ var should = require("should");

});
if(result.map.mappings !== EXPECTED_MAP.mappings) {
fs.writeFileSync(path.resolve(__dirname, "fixtures/from-to-tests/" +
name.replace(/\.input\.map$/, ".output.map")), JSON.stringify(result.map, null, 2), "utf-8");
}
JSON.parse(JSON.stringify(result.map)).should.be.eql(EXPECTED_MAP);
if(result.source !== GENERATED_CODE) {
fs.writeFileSync(path.resolve(__dirname, "fixtures/from-to-tests/" +
path.basename(MAP.file, path.extname(MAP.file)) + ".output" + path.extname(MAP.file)), result.source, "utf-8");
}
result.source.should.be.eql(GENERATED_CODE);
slm = fromStringWithSourceMap(GENERATED_CODE, EXPECTED_MAP);
result = slm.toStringWithSourceMap({
file: MAP.file
});
result.source.should.be.eql(GENERATED_CODE);
JSON.parse(JSON.stringify(result.map)).should.be.eql(EXPECTED_MAP);
});

@@ -24,0 +39,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc