Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glob() doesn't seem to reload changed files in Linux system #12792

Open
1 task done
ngdangtu-vn opened this issue Dec 19, 2024 · 0 comments
Open
1 task done

glob() doesn't seem to reload changed files in Linux system #12792

ngdangtu-vn opened this issue Dec 19, 2024 · 0 comments
Labels
needs triage Issue needs to be triaged

Comments

@ngdangtu-vn
Copy link

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

https://gitlab.com/ndt-deps/astro-pkg/-/blob/6a5339a304959a90a7359bcb5d601390b156a1cc/demo/src/content.config.ts

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant