Skip to content

2.2.7

Compare
Choose a tag to compare
@mrmlnc mrmlnc released this 18 May 11:26

Another release of bug fixes

πŸ“– Documentation

  • Added description of how to work with UNC paths (#89)
  • The ignore option takes an array (#184 β€” thanks @lukeis for contributing)
  • Clarify description of the case option.

πŸ› Bug Fixes

Paths not resolved in some cases (#157)

Thanks @stevenvachon for issue reporting πŸŽ‰

If the user has passed a . or .. and the absolute option is enabled, the paths of the found entries were not absolute (they contained . or `..).

before

fg.sync('/project/temp/../*.js', { absolute: true }); // β†’ ['/project/temp/../something.js']

after

fg.sync('/project/temp/../*.js', { absolute: true }); // β†’ ['/project/something.js']

The case option not work with static patterns (#172)

Thanks @davidmerfield for issue reporting πŸŽ‰

For performance reasons with fast-glob@2.1.0 we introduce static patterns (patterns without glob magic).

Unfortunately, then we forgot about supporting the case (nocase) option. Now the case option works fine with static patterns too. We also improved the documentation for this option.

directory/
  - file.txt
  - File.txt

before

fg.sync('file.txt', { case: false }) // β†’ ['file.txt']

after

fg.sync('file.txt', { case: false }) // β†’ ['file.txt', 'File.txt']

Question mark is not recognized as dynamic glob and fails to find files (#174)

Thanks @vladshcherbin for issue reporting and contributing πŸŽ‰

This is also related to static patterns.

Previously we mark patterns like assets/?ss.css to static and tried to find such file on file system. Now it will works fine.

before

fg.sync('assets/?ss.css'); // β†’ []

after

fg.sync('assets/?ss.css'); // β†’ ['asserts/css.css']