loader-utils
3.3.1 · 5 Jun 2024MIT66.9M / weekRepositoryHomepagenpmAtom feed
3.3.1 is the newest release of 3.x.
In short
10 breaking1 fixed
- Breaking
Minimum supported Node.js version is
12.13.0 - Breaking
Use
xxhash64by default for[hash]/[contenthash]andgetHashDigestAPI - Breaking
emoji: Was removed without replacements, please use custom function if you need this
- Breaking
Removed
getOptionsin favorloaderContext.getOptions(loaderContextisthisinside loader function), note - special query parameters like?something=trueis not supported anymore, if you need this please do it onloaderside, but we strongly recommend avoid it, as alternative you can use?something=1and handle1astrue - Breaking
Removed
getRemainingRequestin favorloaderContext.remainingRequest(loaderContextisthisinside loader function) - Breaking
Removed
getCurrentRequestin favorloaderContext.currentRequest(loaderContextisthisinside loader function) - Breaking
Removed
parseStringin favorJSON.parse - Breaking
Removed
parseQueryin favornew URLSearchParams(loaderContext.resourceQuery.slice(1))whereloaderContextisthisin loader function
Security
2 advisories affect 3.0.0; 3.2.1 fixes them
- Highloader-utils is vulnerable to Regular Expression Denial of Service (ReDoS) via url variableGHSA-3rfm-jhwj-7488 · 14 Oct 2022Fixed in 3.2.1
- Highloader-utils is vulnerable to Regular Expression Denial of Service (ReDoS)GHSA-hhq3-ff78-jv3g · 12 Oct 2022Fixed in 3.2.1
Release note
Breaking changes
- Breaking
Minimum supported Node.js version is
12.13.0 - Breaking
Use
xxhash64by default for[hash]/[contenthash]andgetHashDigestAPI - Breaking
emoji: Was removed without replacements, please use custom function if you need this
- Breaking
Removed
getOptionsin favorloaderContext.getOptions(loaderContextisthisinside loader function), note - special query parameters like?something=trueis not supported anymore, if you need this please do it onloaderside, but we strongly recommend avoid it, as alternative you can use?something=1and handle1astrue - Breaking
Removed
getRemainingRequestin favorloaderContext.remainingRequest(loaderContextisthisinside loader function) - Breaking
Removed
getCurrentRequestin favorloaderContext.currentRequest(loaderContextisthisinside loader function) - Breaking
Removed
parseStringin favorJSON.parse - Breaking
Removed
parseQueryin favornew URLSearchParams(loaderContext.resourceQuery.slice(1))whereloaderContextisthisin loader function - Breaking
Removed
stringifyRequestin favorJSON.stringify(loaderContext.utils.contextify(this.context, request))(loaderContextisthisinside loader function), also it will be cachable and faster - Breaking
isUrlRequestignores only absolute URLs and#hashrequests,data URIand root relative request are handled as requestable due webpack v5 support them
Bug Fixes
Allowed the
interpolateNameAPI works without options
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.