Skip to content

Fix suport for globstars at the start of patterns in braces#150

Open
xuanduc987 wants to merge 1 commit into
micromatch:masterfrom
xuanduc987:push-kllzuqwlkxyr
Open

Fix suport for globstars at the start of patterns in braces#150
xuanduc987 wants to merge 1 commit into
micromatch:masterfrom
xuanduc987:push-kllzuqwlkxyr

Conversation

@xuanduc987
Copy link
Copy Markdown

Fixes #115

prisis added a commit to visulima/visulima that referenced this pull request Apr 18, 2026
Ships six new exports built on tinyglobby, is-glob, glob-parent and
picomatch — all bundled as devDependencies so @visulima/fs keeps a
clean runtime dep list.

- glob / globSync: async + sync file matching
- isGlob: detect whether a string looks like a glob pattern
- globParent: extract the static parent dir of a pattern
- match / matcher: picomatch-backed path matching, with a wrapper
  that shields Array.filter callers from picomatch's returnObject
  second-arg footgun

Each helper is also exposed via a dedicated subpath
(./glob, ./glob-parent, ./is-glob, ./match) for tree-shaking.

Pinned upstream patches (patches/README.md tracks each hunk):
- picomatch: constants.UNIGNORE + onIgnore-can-rescue, plus
  open PR micromatch/picomatch#150 (brace globstars)
- tinyglobby: negated-ignore patterns, issue #188 fix
  (negated extglobs at arbitrary depth), and issue #143
  perf guard (skip fdir exclude for trivial `**` patterns)

Docs in docs/api.mdx cover signatures, options (adapted from the
tinyglobby documentation with attribution), and negated-ignore
examples. Bench in __bench__/glob.bench.ts compares against
fast-glob, globby, node-glob and node:fs.glob. 553/553 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
prisis pushed a commit to visulima/visulima that referenced this pull request Apr 21, 2026
…fs [5.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/fs@5.0.0-alpha.8...@visulima/fs@5.0.0-alpha.9) (2026-04-21)

### Features

* **fs:** add glob, isGlob, globParent, match helpers ([f0f0a2f](f0f0a2f)), closes [micromatch/picomatch#150](micromatch/picomatch#150) [#188](#188) [#143](#143)
* **fs:** add TOML, JSONC, JSON5, INI support with style preservation ([f07446c](f07446c))

### Bug Fixes

* **fs:** disable isolated declarations to unblock Windows CI ([e510ddf](e510ddf))
* **fs:** drop undefined retry fields from rm options ([c937df3](c937df3))

### Miscellaneous Chores

* bump engines.node to ^22.14.0 || >=24.10.0 ([c3d0931](c3d0931))
* fixed jsr.json ([5d85e51](5d85e51))
* **fs:** apply formatter and lint fixes ([6bd7a2d](6bd7a2d))
* **fs:** apply formatter and lint fixes ([f59a388](f59a388))
* **fs:** apply pending changes ([91490a8](91490a8))
* **fs:** apply pending lint and source updates ([9d1cf79](9d1cf79))
* **fs:** enforce curly braces and apply lint fixes ([b77fb0b](b77fb0b))
* lock update ([4c82df0](4c82df0))

### Continuous Integration

* disable isolatedDeclarationTransformer ([d5845d8](d5845d8))

### Dependencies

* **@visulima/error:** upgraded to 6.0.0-alpha.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] globstar doesn't match paths that have no leading directories when used under a brace

1 participant