Skip to content

0.3.0

Compare
Choose a tag to compare
@github-actions github-actions released this 06 Feb 18:25
16d9c94

Added

  • Added a new global stdio which replaces console

  • Added stdio.write which writes a string directly to stdout, without any newlines

  • Added stdio.ewrite which writes a string directly to stderr, without any newlines

  • Added stdio.prompt which will prompt the user for different kinds of input

    Example usage:

    local text = stdio.prompt()
    
    local text2 = stdio.prompt("text", "Please write some text")
    
    local didConfirm = stdio.prompt("confirm", "Please confirm this action")
    
    local optionIndex = stdio.prompt("select", "Please select an option", { "one", "two", "three" })
    
    local optionIndices = stdio.prompt(
        "multiselect",
        "Please select one or more options",
        { "one", "two", "three", "four", "five" }
    )

Changed

  • Migrated console.setColor/resetColor and console.setStyle/resetStyle to stdio.color and stdio.style to allow for more flexibility in custom printing using ANSI color codes. Check the documentation for new usage and behavior.
  • Migrated the pretty-printing and formatting behavior of console.log/info/warn/error to the standard Luau printing functions.

Removed

  • Removed printing functions console.log/info/warn/error in favor of regular global functions for printing.

Fixed

  • Fixed scripts hanging indefinitely on error