Skip to content

[Request] Merge log and stream #304

Open
@natemoo-re

Description

@natemoo-re
Member

The @clack/prompts package has both log and stream helpers, but the only difference is that stream accepts iterables and log accepts strings. Ideally these could be merged into a single API that handles both.

Activity

moved this from Needs triage to On deck in Triage Boardon Apr 18, 2025
moved this from On deck to Needs triage in Triage Boardon Apr 18, 2025
MacFJA

MacFJA commented on Apr 18, 2025

@MacFJA
Contributor

The main issue with the merge of log and stream it's there is a signature change for log.
It changes from a synchronous API to an asynchronous API

It's nothing big, but it introduces a breaking change

MacFJA

MacFJA commented on Apr 18, 2025

@MacFJA
Contributor

Another difference, log utilities assume that if message is an Array ten each element is a line (so it add \n at the end of each element).
But in stream every iteration is push to the current line (no \n is added)

linked a pull request that will close this issue on Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @MacFJA@natemoo-re

      Issue actions

        [Request] Merge `log` and `stream` · Issue #304 · bombshell-dev/clack