Commit 5acedf0
committed
fix(ci): type-check drift — bun-only fs/promises.exists + floating resolution
The workflow failed on 'Module "fs/promises" has no exported member
"exists"' while every local run passed. Root cause chain:
1. bun install --force re-resolved dependencies in CI. Nothing pins
@types/node (no lockfile — gitignored by policy; every path to it is
a floating "*": @types/pidusage and bun-types both declare "*"),
so CI silently typechecked against whatever @types/node was
registry-latest that day. Reproduced locally: 22.20.2 fails the old
import, 26.4.1 passes — that's the local-vs-CI split.
2. With stock @types/node winning the fs/promises module declaration,
the Bun-only exists extension stopped typechecking.
Fixes, layered:
- tests/log-manager.test.ts: existsSync from node:fs — typed by both
@types/node and bun-types, identical behavior (the only fs/promises
Bun-extension import in the repo; everything else is stock Node API)
- @types/node pinned as a direct devDependency (22.20.2 — exactly what
CI was resolving): a direct dep overrides the floating "*" transitives
- workflow: bun install --frozen-lockfile — the correct CI posture;
installs exactly what exists when a lockfile is present, instead of
re-resolving daily
- devDeps pinned: @types/bun ^1.4.2, bun-types ^1.4.2 (no more floating
"latest" tag)
Verified: tsc clean under BOTH @types/node 26.4.1 and 22.20.2; the
workflow's exact bun 1.3.9 + frozen install + tsc in a pristine copy;
log-manager 10/10; full suite 597/597.1 parent c6099f0 commit 5acedf0
3 files changed
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | | - | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
| |||
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
22 | | - | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
30 | | - | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
0 commit comments