Commit c873725
authored
fix(cli): replace createRequire with static import for teammate.js (Gitlawb#1026) (Gitlawb#1033)
In commit 1f66d32, require() was changed to createRequire(). While this
likely fixed an ESM warning in tests, createRequire bypasses the Bun bundler.
As a result, teammate.js was no longer inlined into dist/cli.mjs.
At runtime in the published npm package, this resolves to <root>/utils/teammate.js,
but utils/ is not included in the npm files array, causing a crash on startup.
Replaced with a static import. The original comment regarding a circular
dependency is stale, as teammate.ts only relies on an import type from
AppState.ts which gets erased at compile time.1 parent 00263c5 commit c873725
1 file changed
Lines changed: 2 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | 460 | | |
467 | | - | |
| 461 | + | |
468 | 462 | | |
469 | 463 | | |
470 | 464 | | |
| |||
0 commit comments