Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webpack-sources

Package Overview
Dependencies
Maintainers
5
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-sources - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

14

lib/helpers/createMappingsSerializer.js

@@ -163,8 +163,10 @@ /*

str += "A";
lastWrittenLine = currentLine;
writeValue(sourceIndex - currentSourceIndex);
currentSourceIndex = sourceIndex;
writeValue(originalLine - currentOriginalLine);
currentOriginalLine = originalLine;
str += "A";
if (sourceIndex >= 0) {
lastWrittenLine = currentLine;
writeValue(sourceIndex - currentSourceIndex);
currentSourceIndex = sourceIndex;
writeValue(originalLine - currentOriginalLine);
currentOriginalLine = originalLine;
str += "A";
}
return str;

@@ -171,0 +173,0 @@ };

@@ -59,3 +59,3 @@ /*

);
this._replacements.push(new Replacement(start, end + 1, newValue, name));
this._replacements.push(new Replacement(start, end, newValue, name));
this._isSorted = false;

@@ -72,3 +72,3 @@ }

);
this._replacements.push(new Replacement(pos, pos, newValue, name));
this._replacements.push(new Replacement(pos, pos - 1, newValue, name));
this._isSorted = false;

@@ -88,3 +88,3 @@ }

const start = Math.floor(replacement.start);
const end = Math.floor(replacement.end);
const end = Math.floor(replacement.end + 1);
if (pos < start) {

@@ -274,3 +274,3 @@ const offset = start - pos;

let replacementNameIndex = nameIndex;
if (name) {
if (sourceIndex >= 0 && name) {
let globalIndex = nameMapping.get(name);

@@ -319,3 +319,6 @@ if (globalIndex === undefined) {

// Remove replaced content by settings this variable
replacmentEnd = Math.max(replacmentEnd, Math.floor(repls[i].end));
replacmentEnd = Math.max(
replacmentEnd,
Math.floor(repls[i].end + 1)
);

@@ -465,7 +468,3 @@ // Move to next replacment

for (const repl of this._replacements) {
hash.update(`${repl.start}`);
hash.update(`${repl.end}`);
hash.update(`${repl.content}`);
hash.update(`${repl.insertIndex}`);
hash.update(`${repl.name}`);
hash.update(`${repl.start}${repl.end}${repl.content}${repl.name}`);
}

@@ -472,0 +471,0 @@ }

{
"name": "webpack-sources",
"version": "3.0.2",
"version": "3.0.3",
"description": "Source code handling classes for webpack",

@@ -28,3 +28,4 @@ "main": "./lib/index.js",

"files": [
"lib/"
"lib/",
"!lib/helpers/__mocks__"
],

@@ -31,0 +32,0 @@ "engines": {

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