Skip to content

Releases: bmatcuk/doublestar

Small Performance Change

26 Jul 11:58
v4.9.1
8b690af

Choose a tag to compare

This release contains a small change that gives a slight performance increase. Thanks to @jbedard for the PR!

What's Changed

  • perf: reduce string construction in isZeroLengthPattern by @jbedard in #107

New Contributors

Full Changelog: v4.9.0...v4.9.1

Added WithCaseInsensitive option

12 Jul 19:16
v4.9.0
06f110a

Choose a tag to compare

Added a WithCaseInsensitive option to ignore alphabetic case when globbing. Thanks @braydonk for the PR!

What's Changed

New Contributors

Full Changelog: v4.8.1...v4.9.0

Small Performance Improvement for MatchUnvalidated

25 Jan 13:41
v4.8.1

Choose a tag to compare

Skip some additional validation checks in MatchUnvalidated. Thanks to @lukemassa for the PR!

Additional documentation improvements from @timo-reymann. Thanks!

What's Changed

New Contributors

Full Changelog: v4.8.0...v4.8.1

Fixed Escaped Meta in the "Base" of the Pattern

13 Jan 22:28
v4.8.0
29e67f4

Choose a tag to compare

If the "base" of a pattern (ie, everything up to the first path slash before any meta characters) contains an escaped meta character, doublestar would fail to glob any files.

Thanks to @tdurieux for finding and fixing this bug!

Breaking-ish Change

I've updated SplitPattern to unescape meta characters in the first returned string. I suspect this shouldn't cause issues for anyone because, if anyone was using this function, they've probably either never passed a pattern with escaped meta characters, or hand-rolled an unescape method to fix the bug - which will now be a no-op for them.

What's Changed

New Contributors

Full Changelog: v4.7.1...v4.8.0

Fixed FilepathGlob("")

11 Oct 13:53
v4.7.1
1e20c6d

Choose a tag to compare

To be consistent with filepath.Glob, FilepathGlob("") returns nil.

Added MatchUnvalidated, PathMatchUnvalidated

11 Oct 13:07
v4.7.0
2832f67

Choose a tag to compare

These functions provide a small performance improvement in cases where you don't care about whether or not the pattern is valid (maybe because you already ran ValidatePattern).

Fixed Match bug with patterns like `a/**/`

21 Oct 15:00
v4.6.1
180028b

Choose a tag to compare

Thanks @mmxmb for submitting the bug and opening a PR in #89!

Added WithNoFollow

05 Jan 16:01
v4.6.0
465a339

Choose a tag to compare

Added a WithNoFollow option for Glob, GlobWalk, and FilepathGlob that will cause doublestar to not follow symlinks. However, note that there is a caveat due to io/fs limitations: if the pattern mentions a symlink before any meta characters, those symlinks will be followed. For example: path/to/symlink/* will follow the symlink, assuming it is valid and links to a directory. path/** and path/*/symlink/* will not follow the symlink.

Added WithFilesOnly

04 Jan 17:58
v4.5.0
3c85a19

Choose a tag to compare

Added a new option for Glob, GlobWalk, and FilepathGlob called WithFilesOnly that will cause these functions to only return files. For example, a pattern such as folder/* will only return the files inside the folder, and not any directories. Note that symlinks to directories are considered directories for this purpose.

Added WithFailOnPatternNotExist

07 Nov 14:12
v4.4.0
65c0f86

Choose a tag to compare

Added the option WithFailOnPatternNotExist to Glob, GlobWalk, and FilepathGlob. This option will cause doublestar to abort if the pattern references a path that does not exist, for example, nonexistent/path/*.