New features:
reprex_lockfile captures the package versions, sources and R version needed to reproduce
one or more reactives as an renv lockfile, with reprex_packages exposing the detected
packages so they can be offered for selection. Packages are detected from every branch
of an if or switch, so the set may be a superset of the library() calls in the
reproduced scriptregister_reactives records reactives against the Shiny session, so reprex_lockfile
and reprex_packages can be called without arguments and still cover reactives owned by
separate modulesBug fixes:
if/else branches. Previously a branch that was a
single expression rather than a { block had its function call stripped, producing
a script containing only the call's arguments, and any package used solely in that
branch went undetectedif without an else whose condition is not met,
rather than erroring with subscript out of boundsif condition evaluates to a truthy value other
than TRUE, such as a non-zero number. Previously the condition itself was
reproduced in place of the if branchOther updates:
cli as a dependency, used for error and warning messagesrenv as a dependency, used for producing the lockfile for packages used by reactivesNew features:
switch and [[Other updates: