loader-utils
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [2.0.1](https://github.com/webpack/loader-utils/compare/v2.0.0...v2.0.1) (2021-10-29) | ||
### Bug Fixes | ||
* md4 support on Node.js v17 ([#193](https://github.com/webpack/loader-utils/issues/193)) ([1069f61](https://github.com/webpack/loader-utils/commit/1069f61284a571614ee4acdde6e6087174be118a)) | ||
## [2.0.0](https://github.com/webpack/loader-utils/compare/v1.4.0...v2.0.0) (2020-03-17) | ||
@@ -7,0 +14,0 @@ |
@@ -42,2 +42,4 @@ 'use strict'; | ||
let createMd4 = undefined; | ||
function getHashDigest(buffer, hashType, digestType, maxLength) { | ||
@@ -47,4 +49,20 @@ hashType = hashType || 'md4'; | ||
const hash = require('crypto').createHash(hashType); | ||
let hash; | ||
try { | ||
hash = require('crypto').createHash(hashType); | ||
} catch (error) { | ||
if (error.code === 'ERR_OSSL_EVP_UNSUPPORTED' && hashType === 'md4') { | ||
if (createMd4 === undefined) { | ||
createMd4 = require('./hash/md4'); | ||
} | ||
hash = createMd4(); | ||
} | ||
if (!hash) { | ||
throw error; | ||
} | ||
} | ||
hash.update(buffer); | ||
@@ -51,0 +69,0 @@ |
{ | ||
"name": "loader-utils", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "utils for webpack loaders", |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
38474
17
626
1