Skip to content

pnpm -g ls --json does not output JSON in pnpm 11 (regression from pnpm 10) #11440

@onemen

Description

@onemen

Last pnpm version that worked

10.33.2

pnpm version

11.0.3

Code to reproduce the issue

pnpm -g ls --json

Expected behavior

The command should output valid JSON (array, object, or NDJSON), consistent with the documented behavior of --json and with pnpm 10.x behavior.

Actual behavior

pnpm 11 prints plain text instead of JSON, for example:

@eslint/config-inspector@2.0.0
@github/copilot@1.0.39
vite@8.0.10

This is not valid JSON and cannot be parsed.
The same command in pnpm 10 returned proper JSON.

Additional information

  • This regression affects tools that rely on pnpm ls --json for global package inspection (e.g., npm‑check‑updates).
  • The non‑global command pnpm ls --json still outputs JSON correctly.
  • The regression appears primarily on Windows (PowerShell), but may affect other environments.

Node.js version

24.15.0

Operating System

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions