Files
pnpm/cli/default-reporter
Zoltan Kochan 6c480a4375 perf: replace node-fetch with undici (#10537)
Replace node-fetch with native undici for HTTP requests throughout pnpm.

Key changes:
- Replace node-fetch with undici's fetch() and dispatcher system
- Replace @pnpm/network.agent with a new dispatcher module in @pnpm/network.fetch
- Cache dispatchers via LRU cache keyed by connection parameters
- Handle proxies via undici ProxyAgent instead of http/https-proxy-agent
- Convert test mocking from nock to undici MockAgent where applicable
- Add minimatch@9 override to fix ESM incompatibility with brace-expansion
2026-03-29 12:44:00 +02:00
..
2025-10-21 15:30:20 +02:00

@pnpm/default-reporter

The default reporter of pnpm

Installation

pnpm add @pnpm/default-reporter

Usage

import { streamParser } from '@pnpm/logger'
import { initDefaultReporter } from '@pnpm/default-reporter'

const stopReporting = initDefaultReporter({
  context: {
    argv: [],
  },
  streamParser,
})

try {
  // calling some pnpm APIs
} finally {
  stopReporting()
}

Style Guide

  1. Never use blue or grey as font color as they are hard to read in many consoles.
    1. Use dim instead of grey
    2. Use cyan bright instead of blue
  2. Don't hide the CLI cursor. (It is easier to never hide but it is really needed only when scripts are running.)
  3. Don't use green and yellow to distinct something.

License

MIT