Skip to content

pnpm get config on properties with object values returns [object Object] #9797

@askoufis

Description

@askoufis

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

10.13.1

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

  1. Create a directory
  2. Run pnpm init
  3. Run pnpm add --config @pnpm/plugin-better-defaults
  4. Run pnpm config get configDependencies

Describe the Bug

The output of pnpm config get configDependencies is [object Object]. The reproduction doesn't test it but I've experience the same issue when running pnpm config get patchedDependencies. It seems to affect any config keys whose values are objects.

Expected Behavior

I would expect some serialized form of the configDependencies YAML object below (minus the configDependencies key of course):

configDependencies:
  '@pnpm/plugin-better-defaults': 0.1.0+sha512-aWj7Jv9NcNs/OoazrxP6QspLgKRZ2PHj6wPris6ZCEqmXw+Z8zK59KLzl9NBFGRCO4PNA9pwDWLu+8N3NiqUAQ==

If this isn't a desired feature of the pnpm config CLI then it should be documented as such.

Which Node.js version are you using?

22.17.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions