v6.2.0
Bug Fixes
fileExtensionswhitespace handling: Entries are now trimmed and blank-only arrays are rejected. A leading/trailing space produced a glob like**/*. scsswhich matched nothing. (f64f809)fusv-disableblock comments: Usenode.textinstead ofnode.raws.textfor fusv directives.node.raws.textis undefined for block-style/* fusv-disable */comments, causing disable/enable directives to be silently ignored. (565794c)fusvEnabledstate leak betweenparse()calls:fusvEnabledwas module-level state never reset between calls. If a file ended with an activefusv-disableand no matchingfusv-enable, every subsequentparse()call in the same process would silently drop all variables. (7ea166b)- Symlinked directories: Use
fs.promises.statinstead oflstatinsanitizeDirAsync.lstatdoes not follow symlinks, so passing a symlinked directory path would incorrectly throwNot a valid directory!. (949cd6f) filterVariablesnull guard: Guard against null return frommatch()to prevent a potential crash. (929f032)
Refactoring
- Replace private
postcss/libimports with publicnode.typechecks ('decl','comment'), making the code resilient to PostCSS internals changing. (4858ef4) - Replace
VariableParserclass with pure functions inlib/parse-variable.js. (a31b9bc) - Use explicit key picking in
parseOptionsinstead of object spread. (0e3a909) - Use explicit
extensions[0]instead of implicit array coercion. (c9480ed) - General clean-up of
index.jsand CLI (bin/cli.js). (ffd08d2, 0e32875)
Performance
- Use
push()instead of spread inmakeResultsloop to avoid O(n²) allocations. (7d11471)
Tests
Full Changelog: v6.1.1...v6.2.0