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

9

lib/CachedSource.js

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

}
return (this._cachedBuffer = this._source.buffer());
if (typeof this._source.buffer === "function") {
return (this._cachedBuffer = this._source.buffer());
}
const bufferOrString = this.source();
if (Buffer.isBuffer(bufferOrString)) {
return (this._cachedBuffer = bufferOrString);
}
return (this._cachedBuffer = Buffer.from(bufferOrString, "utf-8"));
}

@@ -35,0 +42,0 @@

@@ -52,3 +52,3 @@ /*

}
} else {
} else if (typeof child.buffer === "function") {
if (currentString !== undefined) {

@@ -59,2 +59,17 @@ buffers.push(Buffer.from(currentString, "utf-8"));

buffers.push(child.buffer());
} else {
const bufferOrString = child.source();
if (Buffer.isBuffer(bufferOrString)) {
if (currentString !== undefined) {
buffers.push(Buffer.from(currentString, "utf-8"));
currentString = undefined;
}
buffers.push(bufferOrString);
} else {
if (currentString === undefined) {
currentString = bufferOrString;
} else {
currentString += bufferOrString;
}
}
}

@@ -61,0 +76,0 @@ }

2

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

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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