Socket
Socket
Sign inDemoInstall

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 2.0.0-beta.4 to 2.0.0-beta.5

1

lib/ConcatSource.js

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

updateHash(hash) {
hash.update("ConcatSource");
const children = this.children;

@@ -160,0 +161,0 @@ for (let i = 0; i < children.length; i++) {

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

hash.update(this._value);
hash.update(this._name || "");
}

@@ -82,0 +83,0 @@ }

79

lib/SourceMapSource.js

@@ -26,4 +26,8 @@ /*

this._sourceMap = sourceMap;
this._sourceMapObject = undefined;
this._sourceMapString = undefined;
this._originalSource = originalSource;
this._innerSourceMap = innerSourceMap;
this._innerSourceMapObject = undefined;
this._innerSourceMapString = undefined;
this._removeOriginalSource = removeOriginalSource;

@@ -38,5 +42,9 @@ }

if (!this._innerSourceMap) {
return typeof this._sourceMap === "string"
? JSON.parse(this._sourceMap)
: this._sourceMap;
return (
this._sourceMapObject ||
(this._sourceMapObject =
typeof this._sourceMap === "string"
? JSON.parse(this._sourceMap)
: this._sourceMap)
);
}

@@ -51,5 +59,7 @@ return getMap(this, options);

map:
typeof this._sourceMap === "string"
? JSON.parse(this._sourceMap)
: this._sourceMap
this._sourceMapObject ||
(this._sourceMapObject =
typeof this._sourceMap === "string"
? JSON.parse(this._sourceMap)
: this._sourceMap)
};

@@ -61,3 +71,8 @@ }

node(options) {
const sourceMap = this._sourceMap;
const sourceMap =
this._sourceMapObject ||
(this._sourceMapObject =
typeof this._sourceMap === "string"
? JSON.parse(this._sourceMap)
: this._sourceMap);
let node = SourceNode.fromStringWithSourceMap(

@@ -68,4 +83,9 @@ this._value,

node.setSourceContent(this._name, this._originalSource);
const innerSourceMap = this._innerSourceMap;
if (innerSourceMap) {
if (this._innerSourceMap) {
const innerSourceMap =
this._innerSourceMapObject ||
(this._innerSourceMapObject =
typeof this._innerSourceMap === "string"
? JSON.parse(this._innerSourceMap)
: this._innerSourceMap);
node = applySourceMap(

@@ -85,13 +105,40 @@ node,

return new SourceListMap(this._value, this._name, this._value);
return fromStringWithSourceMap(
this._value,
typeof this._sourceMap === "string"
? JSON.parse(this._sourceMap)
: this._sourceMap
);
const sourceMap =
this._sourceMapObject ||
(this._sourceMapObject =
typeof this._sourceMap === "string"
? JSON.parse(this._sourceMap)
: this._sourceMap);
return fromStringWithSourceMap(this._value, sourceMap);
}
updateHash(hash) {
hash.update("SourceMapSource");
hash.update(this._value);
if (this._originalSource) hash.update(this._originalSource);
const sourceMap =
this._sourceMapString ||
(this._sourceMapString =
typeof this._sourceMap === "string"
? this._sourceMap
: JSON.stringify(this._sourceMap));
hash.update(sourceMap);
if (this._originalSource) {
hash.update(this._originalSource);
}
if (this._innerSourceMap) {
const innerSourceMap =
this._innerSourceMapString ||
(this._innerSourceMapString =
typeof this._innerSourceMap === "string"
? this._innerSourceMap
: JSON.stringify(this._innerSourceMap));
hash.update(innerSourceMap);
}
hash.update(this._removeOriginalSource ? "true" : "false");
}

@@ -98,0 +145,0 @@ }

{
"name": "webpack-sources",
"version": "2.0.0-beta.4",
"version": "2.0.0-beta.5",
"description": "Source code handling classes for webpack",

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

"engines": {
"node": ">=6.11.5"
"node": ">=10.13.0"
},

@@ -39,0 +39,0 @@ "repository": {

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