Skip to content

v1.41.5 - Usage scanner no longer stalls on crafted source files

Latest

Choose a tag to compare

@sonukapoor sonukapoor released this 18 Nov 17:12
· 81 commits to main since this release
v1.41.5

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-used and the phantom-dependency checks no longer slows down sharply on crafted source files. A file with a long run of spaces or repeated import keywords 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' and import'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