Defer PicoSpinner instantiation to avoid unnecessary object allocation
when the spinner will never be displayed (quiet, verbose, or stdout mode).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace log-update dependency with picospinner (from tinylibs) to reduce
transitive dependencies. picospinner provides built-in spinner functionality
(frames, symbols, succeed/fail states) that was previously manually
implemented on top of log-update, simplifying cliSpinner.ts.
This removes 12 transitive packages (ansi-escapes, cli-cursor, slice-ansi,
wrap-ansi, string-width, etc.) from the dependency tree.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implemented mandatory and recommended fixes from code review:
1. Fix timer cleanup in cliSpinner.test.ts
- Added vi.useRealTimers() to afterEach hook
- Prevents fake timers from bleeding into other test files
2. Fix isCancel mock in initAction.test.ts (3 locations)
- Changed from mockReturnValue(true) to mockImplementation
- Now properly tests only the actual cancel symbol
- More accurate test behavior for cancellation scenarios
3. Add DI pattern explanation comment in configLoad.ts
- Clarifies why dependency injection is used for jitiImport
- Documents the double instrumentation issue
- Helps future maintainers understand the design decision