Commit cc4c0d8
fix: make
npm `glob@13`/`minimatch@10` ESM imports fail when used as top-level
`import` in a TypeScript namespace — Bun evaluates the namespace before
async imports resolve, leaving exported functions as `undefined`.
Fix: use synchronous `require()` for npm packages (resolves immediately),
with `Bun.Glob` as fallback when npm packages are unavailable.
This fixes 52 test failures on Linux CI where `Glob.match`,
`Glob.scan`, and `Glob.scanSync` were `undefined`.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>Glob namespace CI-resilient with require() + Bun.Glob fallback1 parent 16c38bb commit cc4c0d8
1 file changed
Lines changed: 23 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
4 | 2 | | |
5 | 3 | | |
6 | 4 | | |
| |||
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
18 | | - | |
19 | | - | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
24 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
25 | 36 | | |
26 | 37 | | |
27 | 38 | | |
28 | | - | |
| 39 | + | |
| 40 | + | |
29 | 41 | | |
30 | 42 | | |
31 | 43 | | |
32 | | - | |
| 44 | + | |
| 45 | + | |
33 | 46 | | |
34 | 47 | | |
| 48 | + | |
0 commit comments