Skip to content

Using debug with esm renders wrong formatted output for %o / %O #744

Open
@dbo

Description

@dbo

Using debug with or without esm produces different formatted output using %o or %O:

$ DEBUG=topic node -r esm -p 'require("debug")("topic")("out: %o", { foo: "?date=2020-01-29T14%3A24%3A44.806Z" })'
  topic out: { foo: '?date=2020-01-29T14undefinedA24undefinedA44.806Z' } +0ms
undefined

whereas the following correctly renders

$ DEBUG=topic node -p 'require("debug")("topic")("out: %o", { foo: "?date=2020-01-29T14%3A24%3A44.806Z" })'
  topic out: { foo: '?date=2020-01-29T14%3A24%3A44.806Z' } +0ms
undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue identifies a malfunction

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions