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.2 to 0.1.3

test/fixtures/from-to-tests/empty-lines.expected.map

5

lib/fromStringWithSourceMap.js

@@ -51,3 +51,3 @@ /*

if(!ignore) {
addSource(line, sources[sourceIdx], sourcesContent[sourceIdx], linePosition)
addSource(line, sources ? sources[sourceIdx] : null, sourcesContent ? sourcesContent[sourceIdx] : null, linePosition)
return true;

@@ -59,2 +59,5 @@ }

currentNode.addGeneratedCode(generatedCode);
} else if(currentNode && currentNode instanceof SourceNode && !generatedCode.trim()) {
currentNode.generatedCode += generatedCode;
currentSourceNodeLine++;
} else {

@@ -61,0 +64,0 @@ currentNode = new CodeNode(generatedCode);

3

lib/MappingsContext.js

@@ -8,2 +8,3 @@ /*

this.sourcesContent = [];
this.hasSourceContent = false;
this.currentOriginalLine = 1;

@@ -21,3 +22,5 @@ this.currentSource = 0;

this.sourcesContent.push(originalSource);
if(typeof originalSource === "string")
this.hasSourceContent = true;
return idx;
};

@@ -86,3 +86,3 @@ /*

sources: mappingsContext.sources,
sourcesContent: mappingsContext.sourcesContent,
sourcesContent: mappingsContext.hasSourceContent ? mappingsContext.sourcesContent : undefined,
mappings: mappings

@@ -89,0 +89,0 @@ }

{
"name": "source-list-map",
"version": "0.1.2",
"version": "0.1.3",
"description": "Fast line to line SourceMap generator.",

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

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

});
result.map.should.be.eql(EXPECTED_MAP);
JSON.parse(JSON.stringify(result.map)).should.be.eql(EXPECTED_MAP);
result.source.should.be.eql(GENERATED_CODE);

@@ -23,0 +23,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