nanocoder
nanocoder copied to clipboard
[Bug] `pino-pretty`, `pino-roll` and `sonic-boom` are runtime dependencies but never used (11 MB)
Description
Three logging packages are listed in dependencies, are never imported, and are silenced in knip.json. pino-roll alone pulls in date-fns (10.4 MB). Every user downloads and unpacks them for nothing.
Environment
- OS: Windows 11 (10.0.26300)
- Node version: 22.22.3
- Nanocoder version: 1.31.0 (main at 5c2e6935)
Steps to Reproduce
grep -rn "pino-pretty\|pino-roll\|sonic-boom" source pluginsfinds onlysource/utils/logging/config.ts:51(target: 'pino-pretty', a config string) andknip.json:3-7.source/utils/logging/pino-logger.tsonly usespino.destination(). The comment abovecreateProductionConfiginconfig.tssaystarget/optionsare never read.- Walk the production dependency closure with and without the three packages.
Evidence
package.json:107-110lists them.- Production closure: 337 packages, 217.8 MB. Without the three: 322 packages, 206.6 MB (-11.2 MB, -15 packages).
- No mention of
pino-prettyindocs/.
Proposed Change
- Remove the three entries from
dependenciesandknip.json. - Delete the inert
target/optionsfields fromcreateDevelopmentConfig. pinokeeps its ownsonic-boom; only the direct entry goes.
Expected Behavior
pnpm why date-fnsfinds nothing in the production tree.pnpm run test:allpasses, and withNANOCODER_LOG_LEVEL=debuga session still writesnanocoder-<date>.log.
Additional Context
- Effort: S. Start with
package.json,knip.json,source/utils/logging/config.ts. - Risk: someone may pipe logs through
npx pino-prettythemselves; that works without a local install. Specs:source/utils/logging/*.spec.ts.
@addyCooks i would like to work on this issue