Skip to content

[Bug] Unintended Stripping of Periods from Messages #226

@Karibash

Description

@Karibash

Environment

  • OS: macOS
  • Node Version: v22.12.0
  • Package: @clack/prompts
  • Package Version: v0.9.0

Describe the bug

The parseMessage function is currently removing all trailing period characters (.) from the input message. This behavior is problematic because if a message is meant to end with a period, it's being incorrectly stripped, leading to an unintended alteration of the message.

To Reproduce

https://stackblitz.com/edit/node-v6ivn9er?file=index.js

Steps to reproduce the behavior:

  • Run npm run start.

Expected behavior

Messages that end with a single period should retain this period upon completion of the asynchronous process. Only the periods added for loading indicators should be removed without affecting the original message content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions