Upgrade note. This release contains one security fix and the import-scanner change it is built on, nothing else. One behaviour change: import-like text inside an ordinary string is no longer counted as an import.
Security
- The usage scanner behind
--usage,--only-usedand the phantom-dependency checks no longer slows down sharply on crafted source files. A file with a long run of spaces or repeatedimportkeywords could take seconds per file, growing four times longer each time the input doubled; it now takes milliseconds and grows in step with the input (GHSA-m79h-qgvh-vjmc).
Fixed
- The usage scanner recognises compact imports such as
import{x}from'pkg',export{x}from'pkg'andimport'pkg', and no longer counts import-like text inside strings, templates or JSX text, which could hide a real import.
Validation
- npm test
- npm run build
Contributors
- @Nachiket-Roy (reported and fixed the security issue)
- @vianmangal