Skip to content

Releases: haltcase/glob

v0.6.0

07 Jun 01:28
Compare
Choose a tag to compare
v0.6.0 Pre-release
Pre-release

This release has the potential to greatly improve performance. glob will no longer traverse into directories or over files that have no hope of matching the given pattern. A simple example is that a shallow pattern like *.nim can only match files with a .nim extension in the current directory — so glob should never enter a subdirectory or consider files with any other extension. This is now the case!

TL;DR when using shallow patterns in roots of huge directory structures, users should see huge performance gains.

PERFORMANCE

v0.5.0

30 May 19:18
Compare
Choose a tag to compare
v0.5.0 Pre-release
Pre-release

This release brings a number of API improvements, the most significant of which is that procs/iterators like listGlob that previously only accepted string patterns now also accept pre-constructed Glob objects:

import glob
const matcher = glob("src/**/*.nim")

# the following are now equivalent:
listGlob(matcher)
listGlob("src/**/*.nim")

This makes globs more reusable and can reduce the number of created objects.

An internal proc named splitPattern is now exposed publicly:

import glob

echo splitPattern("src/dir/**/*.{png,svg}")
# -> (base: "src/dir", magic: "**/*.{png.svg}")

The full feature update list is below, and all of these have been documented on the full docs site.

FEATURES
  • walkGlobKinds, walkGlob, & listGlob now also accept
    a preconstructed Glob object instead of a string
  • the internal splitPattern proc is now publicly exported,
    which allows users to split string glob patterns into their
    "magic" & "non-magic" (base) parts
  • Glob objects now contain their base & magic path segments
  • hasMagic now checks for extended glob features like pattern
    matches

v0.4.0

24 May 02:18
Compare
Choose a tag to compare
v0.4.0 Pre-release
Pre-release

While it's a fairly small release, almost the entire glob parser was actually rewritten for this release to make supporting extended pattern matches easier and to generally make it simpler. 🎉

FEATURES
  • add extended pattern matching (a7cf070)

v0.3.1

22 May 22:40
Compare
Choose a tag to compare
v0.3.1 Pre-release
Pre-release
BUG FIXES
  • correctly handle patterns in cwd (ee12839)

v0.3.0

22 May 18:07
Compare
Choose a tag to compare
v0.3.0 Pre-release
Pre-release
FEATURES
  • allow matching ] in character class (991553b)
BUG FIXES
  • error correctly on invalid character escapes (2ae42eb)

v0.2.0

22 May 13:30
Compare
Choose a tag to compare
v0.2.0 Pre-release
Pre-release
FEATURES
  • support posix character classes (a8a8fc6)

v0.1.0

21 May 04:54
Compare
Choose a tag to compare
v0.1.0 Pre-release
Pre-release

Initial release.