diff --git a/patches/babel-loader+8.2.3.patch b/patches/babel-loader+8.2.3.patch new file mode 100644 index 0000000..361c877 --- /dev/null +++ b/patches/babel-loader+8.2.3.patch @@ -0,0 +1,21 @@ +diff --git a/node_modules/babel-loader/lib/cache.js b/node_modules/babel-loader/lib/cache.js +index fced210..6b0c137 100644 +--- a/node_modules/babel-loader/lib/cache.js ++++ b/node_modules/babel-loader/lib/cache.js +@@ -91,15 +91,7 @@ const write = /*#__PURE__*/function () { + + + const filename = function (source, identifier, options) { +- // md4 hashing is not supported starting with node v17.0.0 +- const majorNodeVersion = parseInt(process.versions.node.split(".")[0], 10); +- let hashType = "md4"; +- +- if (majorNodeVersion >= 17) { +- hashType = "md5"; +- } +- +- const hash = crypto.createHash(hashType); ++ const hash = crypto.createHash("sha256"); + const contents = JSON.stringify({ + source, + options, diff --git a/patches/copy-webpack-plugin+5.1.2.patch b/patches/copy-webpack-plugin+5.1.2.patch new file mode 100644 index 0000000..63c558f --- /dev/null +++ b/patches/copy-webpack-plugin+5.1.2.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/copy-webpack-plugin/dist/postProcessPattern.js b/node_modules/copy-webpack-plugin/dist/postProcessPattern.js +index 8354f00..9bdf6ed 100644 +--- a/node_modules/copy-webpack-plugin/dist/postProcessPattern.js ++++ b/node_modules/copy-webpack-plugin/dist/postProcessPattern.js +@@ -69,7 +69,7 @@ function postProcessPattern(globalRef, pattern, file) { + name: _package.name, + version: _package.version, + pattern, +- hash: _crypto.default.createHash('md4').update(content).digest('hex') ++ hash: _crypto.default.createHash('sha256').update(content).digest('hex') + }); + return _cacache.default.get(globalRef.cacheDir, cacheKey).then(result => { + logger.debug(`getting cached transformation for '${file.absoluteFrom}'`); diff --git a/patches/terser-webpack-plugin+1.4.5.patch b/patches/terser-webpack-plugin+1.4.5.patch new file mode 100644 index 0000000..43b6a4a --- /dev/null +++ b/patches/terser-webpack-plugin+1.4.5.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/terser-webpack-plugin/dist/index.js b/node_modules/terser-webpack-plugin/dist/index.js +index 6268f6b..1cb8f2c 100644 +--- a/node_modules/terser-webpack-plugin/dist/index.js ++++ b/node_modules/terser-webpack-plugin/dist/index.js +@@ -214,7 +214,7 @@ class TerserPlugin { + // eslint-disable-next-line global-require + 'terser-webpack-plugin': require('../package.json').version, + 'terser-webpack-plugin-options': this.options, +- hash: _crypto.default.createHash('md4').update(input).digest('hex') ++ hash: _crypto.default.createHash('sha256').update(input).digest('hex') + }; + task.cacheKeys = this.options.cacheKeys(defaultCacheKeys, file); + } diff --git a/patches/webpack+4.46.0.patch b/patches/webpack+4.46.0.patch new file mode 100644 index 0000000..ed5c107 --- /dev/null +++ b/patches/webpack+4.46.0.patch @@ -0,0 +1,26 @@ +diff --git a/node_modules/webpack/lib/optimize/SplitChunksPlugin.js b/node_modules/webpack/lib/optimize/SplitChunksPlugin.js +index e7d560b..94a8401 100644 +--- a/node_modules/webpack/lib/optimize/SplitChunksPlugin.js ++++ b/node_modules/webpack/lib/optimize/SplitChunksPlugin.js +@@ -22,7 +22,7 @@ const deterministicGroupingForModules = /** @type {function(DeterministicGroupin + + const hashFilename = name => { + return crypto +- .createHash("md4") ++ .createHash("sha256") + .update(name) + .digest("hex") + .slice(0, 8); +diff --git a/node_modules/webpack/lib/util/createHash.js b/node_modules/webpack/lib/util/createHash.js +index 64de510..4cc3fc9 100644 +--- a/node_modules/webpack/lib/util/createHash.js ++++ b/node_modules/webpack/lib/util/createHash.js +@@ -131,6 +131,8 @@ module.exports = algorithm => { + // TODO add non-cryptographic algorithm here + case "debug": + return new DebugHash(); ++ case 'md4': ++ algorithm = "sha256"; + default: + return new BulkUpdateDecorator(require("crypto").createHash(algorithm)); + }