Comments (3)
Hello, @jonschlinkert,
First, thanks to a great tip. Yeap, it's a good idea, but this does not apply to the current problem.
Unfortunately, this problem also related to issue #80. We exclude directories from reading even if we don't want this. This is related to deep
filter:
fast-glob/src/providers/filters/deep.ts
Line 46 in e09f2d8
Here we try to exclude the directory from reading using negative patterns. For example, when we provide the *
pattern as negative pattern – he will be match to packages
directory. Then we never read packages
directory.
I also added more than 300 smoke tests. For more details see #81.
I want to close this issue in favour of #80.
from fast-glob.
I'm not sure that is a bug...
from fast-glob.
I'm not sure if this is related, but I just found an inconsistency in how node-glob matches paths versus how minimatch matches paths. In node-glob, when a pattern ends with /**
, it treats the pattern like {,/**}
. But minimatch (and micromatch, and I believe bash) do not follow that behavior.
However, it does seem to make more sense in the context of globbing, since the glob is typically matching against the relative part of a (longer) file path.
Maybe try doing something lik this on the pattern before passing it to micromatch.
if (pattern.slice(-3) === '/**') {
pattern = pattern.slice(0, -3) + '{,/**}';
}
It might also be worthwhile comparing some tests to output from node-glob. Not that node-glob is always correct, but it might be informative.
from fast-glob.
Related Issues (20)
- `glob` method errors in the latest release HOT 1
- TypeError: patterns.reduce is not a function HOT 10
- Breaking changes in v3.3.0 HOT 1
- Type definitions erroneously disallow passing an explicitly readonly array of strings HOT 1
- Use `os.availableParallelism` instead of `os.cpus().length` when available HOT 1
- Merging DEFAULT_FILE_SYSTEM_ADAPTER to fs HOT 4
- Regression in v3.3.1 HOT 3
- Case sensitive file paths are returned as potentially the wrong case when using WSL with window's paths HOT 1
- Inconsistent File Format Handling Between Windows and POSIX in fast-glob HOT 7
- Unable to match correctly HOT 1
- fast glob ramdisk issue
- [doc] what is the behaviour of passing an array of patterns?
- Allow abort glob progress
- In Node.js v20.11.0, it's not possible to match directories containing emojis.
- Directory globs with and without trailing slash in ignore patterns have different results
- No results returned if the file is a socket HOT 1
- [QUESTION] - Awilix.fast-glob Fails to Autoload Modules in Tests with TypeScript Setup
- Inconsistent file count HOT 1
- Ignore patterns are applied to the absolute path instead of relative to the working directory HOT 4
- New fast-glob version required due to dependency CVE in micromatch HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-glob.