`glob()` doesn't seem to reload changed files in Linux system
Closed this issue · 2 comments
Astro Info
$ astro info
Astro v5.0.9
Node v20.12.2
System Linux (x64)
Package Manager bun
Output static
Adapter none
Integrations none
Clipboard command not found!
Please manually copy the text above.
If this issue only occurs in one browser, which browser is a problem?
none
Describe the Bug
The story is I try to write a loader base on the latest version Astro 5. I use glob()
loader as a model to study. During the work, I found out that the watcher will always ignore the change for my loader. After a while, I found out that the micromatch.isMatch
in glob.js
seems to always return false
even the path supposes to be matched the pattern. (and my code copy the same so it got ignore)
From console.log(process.versions)
:
{
node: '20.12.2',
acorn: '8.11.3',
ada: '2.7.6',
ares: '1.27.0',
base64: '0.5.2',
brotli: '1.1.0',
cjs_module_lexer: '1.2.2',
cldr: '44.1',
icu: '74.2',
llhttp: '8.1.2',
modules: '115',
napi: '9',
nghttp2: '1.60.0',
nghttp3: '0.7.0',
ngtcp2: '0.8.1',
openssl: '3.0.13+quic',
simdutf: '4.0.8',
tz: '2024a',
undici: '5.28.4',
unicode: '15.1',
uv: '1.46.0',
uvwasi: '0.0.20',
v8: '11.3.244.8-node.19',
zlib: '1.3.0.1-motley-40e35a7'
}
What's the expected result?
If I have a pattern recipes/*.toml
and an incoming path recipes/001.toml
, the incoming path should be accepted not ignored.
I have a fix for my loader and I think it can be applied for the glob()
as well. So can you guy confirm if this is not your intention and need a fix, I can help with that.
Link to Minimal Reproducible Example
Participation
- I am willing to submit a pull request for this issue.
Hi. Could you provide a reproduction that shows the problem: the one you've linked is using your loader rather than the glob one. Ideally one in Stackblitz, but a repo is fine too. If you have a fix for your loader it would be helpful to know what you needed to change.
Hello @ngdangtu-vn. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro
will be closed if they have no activity within 3 days.