Skip to content

v3.2.0

Compare
Choose a tag to compare
@gaborcsardi gaborcsardi released this 14 Feb 18:17
· 413 commits to main since this release

Breaking change

  • The cli_theme_dark option is know known as cli.theme_dark, to be
    consistent with all other cli option names (#380).

Other changes

  • The preferred names of the S3 clases ansi_string, ansi_style, boxx,
    rule and tree now have cli_ prefix: cli_ansi_string, etc. This will
    help avoiding name conflicts with other packages eventually, but for now
    the old names are kept as well, for compatibility.

  • cli_abort() has been updated to work nicely with rlang 1.0. The
    default call and backtrace soft-truncation are set to .envir
    (which itself is set to the immediate caller of cli_abort() by
    default).

    Line formatting now happens lazily at display time via
    rlang::cnd_message() (which is called by the conditionMessage()
    method for rlang errors).

  • New hash_sha256() function to calculate SHA-256 hashes. New
    hash_raw_*(), hash_obj_*() and hash_file_*() functions to calculate
    various hashes of raw vectors, R objects and files.

  • You can use the new cli.default_num_colors option to set the default
    number of ANSI colors, only if ANSI support is otherwise detected.
    See the details in the manual of num_ansi_colors().

  • You can set the new ESS_BACKGROUND_MODE environment variable to
    dark to indicate dark mode.

  • cli now handles quotes and comment characters better in the semantion
    cli_*() functions that perform glue string interpolation (#370).