Packages

fast-glob

3.3.3 · 5 Jan 2025MIT203.4M / weekRepositoryHomepagenpmAtom feed

Your version

2.2.7

18 May 2019Where it was published

In short

3 internal

Release note

Another release of bug fixes

Bug Fixes

Paths not resolved in some cases (#157)

Thanks @stevenvachon for issue reporting :tada:

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 :tada:

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 :tada:

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']