Commit 19872f7
committed
fix(dsn): prevent silent exit during uncached DSN auto-detection (#411)
Replace Bun.Glob.scan() async iterators with readdir() in DSN detection
paths. The async iterators don't ref-count the event loop, causing the
process to exit with code 0 and no output while scanning is still in
progress on first run (uncached).
Changes:
- bin.ts: Add setInterval keepalive cleared via .finally() to prevent
premature event loop drain (can't use top-level await due to CJS bundle)
- project-root.ts: Replace anyGlobMatches() Bun.Glob.scan() with
readdir() + synchronous Bun.Glob.match() for language marker detection
- env-file.ts: Replace Bun.Glob.scan('*') with readdir() in
detectFromMonorepoEnvFiles() for listing monorepo package directories1 parent 585b88a commit 19872f7
3 files changed
+45
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | 171 | | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
| 175 | + | |
| 176 | + | |
176 | 177 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
188 | 182 | | |
189 | 183 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | 184 | | |
194 | | - | |
| 185 | + | |
| 186 | + | |
195 | 187 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
200 | 193 | | |
| 194 | + | |
| 195 | + | |
201 | 196 | | |
202 | 197 | | |
203 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
196 | | - | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
204 | 218 | | |
| 219 | + | |
205 | 220 | | |
206 | | - | |
| 221 | + | |
207 | 222 | | |
208 | 223 | | |
209 | 224 | | |
| |||
0 commit comments