loader-utils
Advanced tools
Comparing version 1.4.0 to 2.0.0
@@ -1,5 +0,14 @@ | ||
# Change Log | ||
# Changelog | ||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
## [2.0.0](https://github.com/webpack/loader-utils/compare/v1.4.0...v2.0.0) (2020-03-17) | ||
### ⚠ BREAKING CHANGES | ||
* minimum required `Node.js` version is `8.9.0` ([#166](https://github.com/webpack/loader-utils/issues/166)) ([c937e8c](https://github.com/webpack/loader-utils/commit/c937e8c77231b42018be616b784a6b45eac86f8a)) | ||
* the `getOptions` method returns empty object on empty query ([#167](https://github.com/webpack/loader-utils/issues/167)) ([b595cfb](https://github.com/webpack/loader-utils/commit/b595cfba022d3f04f3d310dd570b0253e461605b)) | ||
* Use `md4` by default | ||
<a name="1.4.0"></a> | ||
@@ -6,0 +15,0 @@ # [1.4.0](https://github.com/webpack/loader-utils/compare/v1.3.0...v1.4.0) (2020-02-19) |
@@ -43,3 +43,3 @@ 'use strict'; | ||
function getHashDigest(buffer, hashType, digestType, maxLength) { | ||
hashType = hashType || 'md5'; | ||
hashType = hashType || 'md4'; | ||
maxLength = maxLength || 9999; | ||
@@ -46,0 +46,0 @@ |
@@ -14,3 +14,3 @@ 'use strict'; | ||
// Not object-like queries are not supported. | ||
return null; | ||
return {}; | ||
} | ||
@@ -17,0 +17,0 @@ |
@@ -38,2 +38,3 @@ 'use strict'; | ||
// eslint-disable-next-line no-prototype-builtins | ||
if (specialValues.hasOwnProperty(value)) { | ||
@@ -40,0 +41,0 @@ value = specialValues[value]; |
{ | ||
"name": "loader-utils", | ||
"version": "1.4.0", | ||
"version": "2.0.0", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -9,3 +9,3 @@ "description": "utils for webpack loaders", | ||
"emojis-list": "^3.0.0", | ||
"json5": "^1.0.1" | ||
"json5": "^2.1.2" | ||
}, | ||
@@ -25,12 +25,12 @@ "scripts": { | ||
"engines": { | ||
"node": ">=4.0.0" | ||
"node": ">=8.9.0" | ||
}, | ||
"devDependencies": { | ||
"coveralls": "^3.0.2", | ||
"eslint": "^5.11.0", | ||
"eslint-plugin-node": "^8.0.0", | ||
"eslint-plugin-prettier": "^3.0.0", | ||
"jest": "^21.2.1", | ||
"coveralls": "^3.0.9", | ||
"eslint": "^6.8.0", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"jest": "^25.1.0", | ||
"prettier": "^1.19.1", | ||
"standard-version": "^4.0.0" | ||
"standard-version": "^7.1.0" | ||
}, | ||
@@ -37,0 +37,0 @@ "main": "lib/index.js", |
@@ -183,10 +183,10 @@ # loader-utils | ||
* `[emoji:<length>]` same as above, but with a customizable number of emojis | ||
* `[contenthash]` the hash of `options.content` (Buffer) (by default it's the hex digest of the md5 hash) | ||
* `[contenthash]` the hash of `options.content` (Buffer) (by default it's the hex digest of the md4 hash) | ||
* `[<hashType>:contenthash:<digestType>:<length>]` optionally one can configure | ||
* other `hashType`s, i. e. `sha1`, `md5`, `sha256`, `sha512` | ||
* other `hashType`s, i. e. `sha1`, `md4`, `md5`, `sha256`, `sha512` | ||
* other `digestType`s, i. e. `hex`, `base26`, `base32`, `base36`, `base49`, `base52`, `base58`, `base62`, `base64` | ||
* and `length` the length in chars | ||
* `[hash]` the hash of `options.content` (Buffer) (by default it's the hex digest of the md5 hash) | ||
* `[hash]` the hash of `options.content` (Buffer) (by default it's the hex digest of the md4 hash) | ||
* `[<hashType>:hash:<digestType>:<length>]` optionally one can configure | ||
* other `hashType`s, i. e. `sha1`, `md5`, `sha256`, `sha512` | ||
* other `hashType`s, i. e. `sha1`, `md4`, `md5`, `sha256`, `sha512` | ||
* other `digestType`s, i. e. `hex`, `base26`, `base32`, `base36`, `base49`, `base52`, `base58`, `base62`, `base64` | ||
@@ -233,3 +233,3 @@ * and `length` the length in chars | ||
// => 2BKDTjl.png | ||
// use sha512 hash instead of md5 and with only 7 chars of base64 | ||
// use sha512 hash instead of md4 and with only 7 chars of base64 | ||
@@ -271,3 +271,3 @@ // loaderContext.resourcePath = "/absolute/path/to/app/img/myself.png" | ||
* `buffer` the content that should be hashed | ||
* `hashType` one of `sha1`, `md5`, `sha256`, `sha512` or any other node.js supported hash type | ||
* `hashType` one of `sha1`, `md4`, `md5`, `sha256`, `sha512` or any other node.js supported hash type | ||
* `digestType` one of `hex`, `base26`, `base32`, `base36`, `base49`, `base52`, `base58`, `base62`, `base64` | ||
@@ -274,0 +274,0 @@ * `maxLength` the maximum length in chars |
29542
423
+ Addedjson5@2.2.3(transitive)
- Removedjson5@1.0.2(transitive)
- Removedminimist@1.2.8(transitive)
Updatedjson5@^2.1.2