nanocoder icon indicating copy to clipboard operation
nanocoder copied to clipboard

[Bug] `pino-pretty`, `pino-roll` and `sonic-boom` are runtime dependencies but never used (11 MB)

Open addyCooks opened this issue 1 month ago • 1 comments

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

  1. grep -rn "pino-pretty\|pino-roll\|sonic-boom" source plugins finds only source/utils/logging/config.ts:51 (target: 'pino-pretty', a config string) and knip.json:3-7.
  2. source/utils/logging/pino-logger.ts only uses pino.destination(). The comment above createProductionConfig in config.ts says target/options are never read.
  3. Walk the production dependency closure with and without the three packages.

Evidence

  • package.json:107-110 lists 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-pretty in docs/.

Proposed Change

  • Remove the three entries from dependencies and knip.json.
  • Delete the inert target/options fields from createDevelopmentConfig.
  • pino keeps its own sonic-boom; only the direct entry goes.

Expected Behavior

  • pnpm why date-fns finds nothing in the production tree.
  • pnpm run test:all passes, and with NANOCODER_LOG_LEVEL=debug a session still writes nanocoder-<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-pretty themselves; that works without a local install. Specs: source/utils/logging/*.spec.ts.

addyCooks avatar Oct 15 '26 15:10 addyCooks

@addyCooks i would like to work on this issue

Srinidhi444 avatar Oct 15 '26 16:10 Srinidhi444