Socket
Socket
Sign inDemoInstall

webpack

Package Overview
Dependencies
290
Maintainers
4
Versions
832
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.46.0 to 4.47.0

lib/util/hash/BatchedHash.js

5

lib/optimize/SplitChunksPlugin.js

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

const crypto = require("crypto");
const SortableSet = require("../util/SortableSet");

@@ -15,2 +14,3 @@ const GraphHelpers = require("../GraphHelpers");

const contextify = require("../util/identifier").contextify;
const createHash = require("../util/createHash");

@@ -26,4 +26,3 @@ /** @typedef {import("../Compiler")} Compiler */

const hashFilename = name => {
return crypto
.createHash("md4")
return createHash("md4")
.update(name)

@@ -30,0 +29,0 @@ .digest("hex")

4

lib/SystemMainTemplatePlugin.js

@@ -34,3 +34,5 @@ /*

const onRenderWithEntry = (source, chunk, hash) => {
const externals = chunk.getModules().filter(m => m.external);
const externals = chunk
.getModules()
.filter(m => m.external && m.externalType === "system");

@@ -37,0 +39,0 @@ // The name this bundle should be registered as with System

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

exports.Hash = Hash;
/** @typedef {typeof Hash} HashConstructor */
class BulkUpdateDecorator extends Hash {

@@ -122,2 +119,12 @@ /**

/** @type {typeof import("crypto") | undefined} */
let crypto = undefined;
/** @type {typeof import("./hash/md4") | undefined} */
let createMd4 = undefined;
/** @type {typeof import("./hash/BatchedHash") | undefined} */
let BatchedHash = undefined;
/** @type {number} */
const NODE_MAJOR_VERSION = parseInt(process.versions.node, 10);
/**

@@ -132,2 +139,3 @@ * Creates a hash by name or function

}
switch (algorithm) {

@@ -137,5 +145,34 @@ // TODO add non-cryptographic algorithm here

return new DebugHash();
case "md4":
if (NODE_MAJOR_VERSION >= 18) {
if (createMd4 === undefined) {
createMd4 = require("./hash/md4");
if (BatchedHash === undefined) {
BatchedHash = require("./hash/BatchedHash");
}
}
return new /** @type {typeof import("./hash/BatchedHash")} */ (BatchedHash)(
createMd4()
);
}
// If we are on Node.js < 18, fall through to the default case
// eslint-disable-next-line no-fallthrough
case "native-md4":
if (NODE_MAJOR_VERSION >= 18) {
if (crypto === undefined) crypto = require("crypto");
return new BulkUpdateDecorator(
/** @type {typeof import("crypto")} */ (crypto).createHash("md4")
);
}
// If we are on Node.js < 18, fall through to the default case
// eslint-disable-next-line no-fallthrough
default:
return new BulkUpdateDecorator(require("crypto").createHash(algorithm));
if (crypto === undefined) crypto = require("crypto");
return new BulkUpdateDecorator(crypto.createHash(algorithm));
}
};
module.exports.Hash = Hash;
/** @typedef {typeof Hash} HashConstructor */
{
"name": "webpack",
"version": "4.46.0",
"version": "4.47.0",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc