Releases: r-lib/usethis
usethis 3.2.1
usethis 3.2.0
Formatting
- 
use_air()is a new function to configure a project to use
 Air, an extremely fast R code formatter.
- 
use_tidy_style()is deprecated, in favor of using Air for any new, explicit
 formatting efforts (#2110).
Project-hood
- 
usethis's criteria for recognizing a project (listed in ?proj_utils) have
 expanded to include (#2133):- a .vscode/settings.jsonfile, which Positron or VS Code might create
- a _quarto.ymlfile, typical of a Quarto project
- an renv.lockfile, which renv creates
 
- a 
- 
use_course()anduse_zip()open the new folder in a new session of the
 current IDE (RStudio or Positron) in more situations and add a.herefile if
 the folder doesn't already fulfill any of usethis's criteria for a project
 root folder (#2127).
- 
create_quarto_project()is a new experimental function that combines basic
 usage ofquarto::quarto_create_project()with some of the niceties of
 usethis'screate_*()functions, such as opening the newly created project in
 your IDE (#1891, @focardozom).
Other
- 
use_package(min_version = FALSE)is treated the same as whenmin_version
 is not specified (#2117, @salim-b).
- 
use_r_universe_badge()is a new function that creates a README badge
 indicating your package is available on R-universe
 and reporting the latest version (@olivroy, #1883).
- 
Some GitHub functionality should now work for GitHub Enterprise Cloud (as 
 opposed to GitHub Enterprise Server). Specifically an HTTPS URL such as
 "https://my-cool-org.ghe.com"should now be recognized as "looks like
 GitHub" (#2098, @jameslairdsmith).
- 
Several deprecated functions have been removed: - use_rscloud_badge(), deprecated in v2.2.0; use- use_posit_cloud_badge()
 instead
- git_branch_default(), deprecated in v2.1.0; use- git_default_branch()
 instead
- use_tidy_eval(), deprecated in v2.2.0; no longer necessary
- use_github_actions()and- use_github_action_check_release(), deprecated
 in v.2.2.0; use- use_github_action('check-release')instead
- use_github_action_check_standard(), deprecated in v2.2.0; use
 - use_github_action('check-standard')instead
- use_github_action_pr_commands(), deprecated in v2.2.0
- use_github_action_check_full(), deprecated in v2.1.0
 
usethis 3.1.0
- 
use_vignette()anduse_article()support Quarto. Thenameof the new
 vignette or article can optionally include a file extension to signal whether
 .Rmdor.qmdis desired, with.Rmdremaining the default for now. Thanks
 to @olivroy for getting the ball rolling (#1997).
- 
use_data()defaults to serialization version 3 (@laurabrianna, #2044).
- 
use_package()can lower a minimum version requirement
 (@jplecavalier, #1957).
- 
use_release_issue()only suggests doing reverse dependency checks if there
 are, in fact, reverse dependencies (#1817, @seankross).
- 
use_tidy_upkeep_issue()records the year it is being run in the
 Config/usethis/upkeepfield in DESCRIPTION. If this value exists, it is
 used to filter the checklist when making the issue.
usethis 3.0.0
Transition to cli package for UI
- The ui_*()functions have been marked as
 superseded.
 External users of these functions are encouraged to use the
 cli package instead.
 The cli package did not have the required functionality when the
 usethis::ui_*()functions were first created, but it does now and it's the
 superior option.
 There is a cli vignette about how to make this transition:
 vignette("usethis-ui", package = "cli").
 usethis no longer uses theui_*()functions internally, in favor of new
 cli-based helpers that are not exported.
Deprecated function and argument removal
We are removing functions and arguments that were deprecated as of usethis
v2.0.0, which was released in December 2020.
These changes have been in place for a long time now:
- Switch from git2r to gert (+ credentials).
- Use of git config and the gh package to infer, e.g., the target repo spec.
- Pivot towards GitHub Actions and away from Travis and AppVeyor.
Functions that are removed and, where applicable, what to use instead:
- git_credentials()
- use_git_credentials()
- browse_github_token()(do- create_github_token())
- browse_github_pat()(do- create_github_token())
- github_token()(do- gh_token_help()or- gh::gh_token())
- pr_pull_upstream()(do- pr_merge_main())
- pr_sync()(do- pr_merge_main(); pr_push())
- use_appveyor()
- use_appveyor_badge()
- use_travis()
- use_travis_badge()
- browse_travis()
- use_pkgdown_travis()
- use_tidy_ci()deprecated in v2.1.0 (do- use_tidy_github_actions())
- use_tidy_labels()deprecated in v2.1.0 (do- use_tidy_github_labels())
Function arguments that are removed:
- create_from_github(auth_token =, credentials =)
- use_github(auth_token =, credentials =)
- use_github_labels(repo_spec =, host =, auth_token =)
- use_github_links(auth_token =, host =)
- use_github_release(host =, auth_token =)
Other changes
- 
use_zip()anduse_course()are equipped to handle a ZIP where the parent
 folder is implicit (@burnsal, #1961).
- 
use_test_helper()is a new function to create a test helper file
 (@olivroy, #1822).
- 
use_cpp11()makes it easier to updateNAMESPACE(@pachadotdev, #1921).
- 
pr_merge_main()now offers the choice to not open the files with merge
 conflicts (@olivroy, #1720).
- 
edit_rstudio_snippets()now accepts yaml snippets (@olivroy, #1941).
- 
use_standalone()inserts an improved header that includes the code needed to
 update the standalone file (@krlmlr, #1903).
- 
use_release_issue()anduse_upkeep()behave better when the user has a
 fork. The user is asked just once to choose betweenoriginandupstreamas
 the target repo (#2023).
- 
The README templates now recommend pak instead of 
 devtools for package installation (@olivroy, #1723).
- 
use_github()now knows that you can reuse the name of an earlier repo that
 has since been renamed (@ateucher, #1893).
- 
use_git()no longer asks if you want to restart RStudio when using Positron.
- 
use_test()anduse_r()now work when you are in
 tests/testthat/_snaps/{foo}.md(@olivroy, #1988).
- 
The URLs baked into the badge generated by use_coverage(type = "codecov")
 are updated and no longer specify a branch(#2008).
- 
usethis::use_version()now tolerates empty lines preceding the
 first section title in the package NEWS file. (#1976)
usethis 2.2.3
- Patch release with changes to .Rdfiles requested by CRAN.
usethis 2.2.2
- Implicit usage of numeric_version()via comparison now always provides
 character input. This is in response to a request from CRAN to anticipate
 future solutions to https://bugs.r-project.org/show_bug.cgi?id=18548.
usethis 2.2.1
- 
Internal helper cran_version(), used in functions such as
 use_release_checklist()anduse_news_md(), is more resilient to situations
 where no CRAN mirror has been set (#1857).
- 
Internal usage of numeric_version()now always provides character input,
 rather than relying on implicitas.character()coercion. This is in response
 to a request from CRAN to anticipate future solutions to
 https://bugs.r-project.org/show_bug.cgi?id=18548 (#1869).
usethis 2.2.0
New functions
- 
use_author()is a new function to introduce a new person into the
 Authors@Rfield of DESCRIPTION (@avalcarcel9, #833).
- 
use_rstudio_preferences()lets you set RStudio preferences programmatically
 (#1518)
- 
use_standalone()is a new function that makes it easier to use standalone
 files provided by various low-level tidyverse packages, like rlang (#1654).
- 
use_upkeep_issue()is a new function to facilitate regular maintenance of
 your package. Similar touse_release_issue(), it opens an issue in your repo
 with a checklist of maintenance tasks. It will include additional bullets
 if your package includes anupkeep_bullets()function that returns a
 character vector (#1794).
Package development
- 
Although nested projects are discouraged, they can be useful in development 
 contexts.create_package()now sets the correct package name and returns
 the correct package path for a package nested inside a project (#1647).
- 
use_article()no longer adds the rmarkdown package toSuggests. Instead,
 if rmarkdown is not already a dependency, it's added to
 Config/Needs/website. This means that a package that only uses articles
 (vs. vignettes) won't gain an unnecessary dependency on rmarkdown (#1700).
- 
use_data()now sets the appropriate minimal R version inDESCRIPTION,
 depending on which serialization formatversionyou choose (@dpprdan, #1672).
- 
use_github_links()by default now appends the GitHub url to existing urls in
 in theURLfield of DESCRIPTION, rather than replacing existing urls (#1805).
- 
use_latest_dependencies()no longer affectsSuggestssince those
 dependencies are not enforced (#1749).
- 
use_news_md()now places "(development version)" in the header ofNEWS.md
 if there is a development version number inDESCRIPTION. It also sets the
 first bullet to "Initial CRAN submission" when it looks like a "new" package
 (#1708).
- 
use_coverage()no longer adds covr toSuggests, since thetest-coverage
 GitHub Actions workflow takes care of installing covr (@Bisaloo, #1851).
Package release
- 
use_release_issue()will now remind you to runuse_github_links()if
 necessary (@Bisaloo, #1754)
- 
use_release_issue()now encourages the creation ofNEWS.mdprior to
 submission, instead of after (#1755).
- 
use_github_release()now automatically pushes to GitHub (if safe) and
 automatically publishes the release, rather than requiring you to edit and
 publish the draft (#1385).
- 
use_github_release()no longer fails in the absence ofNEWS.md(#1755).
- 
use_release_issue()will now remind you to check/close the milestone
 corresponding to the release, if it exists (#1642).
- 
use_version()anduse_dev_version()gain apushargument to optionally
 push the result after committing. This is used to eliminate a manual step from
 theuse_release_issue()checklist (#1385).
- 
use_revdep()no longer places an email template, because these days we are
 more likely to communicate with other maintainers about breaking changes via
 GitHub issues and pull requests (#1769).
Package file management
- 
rename_files()now also affects files insrc/(#1585).
- 
use_r()anduse_test()now work with all active files inR/,src/,
 andtests/testthat/(#1566).
- 
use_r()anduse_test()now work with files containing.(#1690).
- 
use_rcpp(),use_c()and friends now work the same way asuse_r()and
 use_test(): they'll take the default file name from the file you currently
 have open in RStudio (#1730).
Git and GitHub
- 
create_from_github()will now use an existing.Rprojfile if it exists
 anywhere in the repo, not just the root directory. This is useful if you're
 working with repos that contain tools for multiple languages (#1680).
- 
git_sitrep()gains two arguments:toolandscope, which enables
 you to limit the report to, for example,tool = "git"orscope = "user".
 The default remains to provide a full report. Also, provides more
 feedback if git user's information is not set, and checks global git-email
 against user-level GitHub PAT (@ijlyttle, #1732, #1714, #1706).
- 
git_vaccinated()now treats a path configured ascore.excludesFilelike
 other user-supplied paths; in particular, any use of the~/home directory
 shortcut is expanded via
 fs::path_expand()
 (@dpprdan, #1560).
- 
use_github_action()now suggests possible actions when called without
 arguments (#1724).
- 
use_github_actions(),use_github_action_check_standard(),
 use_github_action_check_release(), anduse_github_action_pr_commands()
 have been deprecated in favour of the new interactive powers of
 use_github_action()(#1724).
Minor improvements and fixes
- 
Links to the R Packages book have been updated to the second edition of 
 the book (#1689).
- 
The SVG badges placed by use_lifecycle()have improved accessibility
 features, i.e. they advertise the lifecycle stage via thearia-label
 attribute (#1554, r-lib/lifecycle#117).
- 
use_rscloud_badge()has been deprecated in favour of
 use_posit_cloud_badge(), and both functions now accept the updated url
 format of Posit Cloud projects (#1670).
- 
use_rstudio()gains areformatargument which omits.Rprojsettings
 that enforce file formatting conventions, e.g. around whitespace.
 create_from_github()uses this option when it introduces an.Rprojto a
 project that lacks one, making it easier to follow the project's existing
 conventions (#1679).
- 
write_over()anduse_github_file()gain an overwrite argument (#1748).
Tidyverse-related
- 
use_release_issue()now uses internalrelease_extra_revdeps()to
 add extra revdep sources. Currently only use for internal Posit tooling,
 but we hope to extend to all users in the future (#1610).
- 
use_tidy_logo()is a new function that callsuse_logo()on the appropriate
 hex sticker PNG file at https://github.com/rstudio/hex-stickers (#1871).
Defunct functions
- 
use_tidy_eval()is now defunct because it imports and re-exports a large
 number of functions that are no longer needed in order to do tidy
 evaluation (#1656).
- 
use_travis(),use_pkgdown_travis(),browse_travis(), anduse_appveyor()
 are now defunct because we no longer recommend Travis or Appveyor. We
 recommend GitHub actions instead (#1517).
usethis 2.1.6
GitHub-related
use_github_action() and friends gain a ref argument, which defaults to the tag of the latest release in https://github.com/r-lib/actions (#1541).
use_github_actions_badge() now uses the same URLs as GitHub does via the "Create status badge" helper in the browser (#1525). This changes the significance of the name argument; now it really must be the name of the workflow configuration file.
All functions error more clearly when the requested operation is not supported for the "theirs" remote configuration (#1588).
Other changes
use_roxygen_md() gains an overwrite argument (#1599).
use_rscloud_badge() is a new function that creates a README badge indicating the repository can be launched in an RStudio Cloud project (@gvelasq, #1584).
use_data() gains an ascii argument, which is passed along to save() (@JosiahParry, #1625).
use_code_of_conduct() has been updated to version 2.1 of the Contributor Covenant (@batpigandme, #1591).
usethis 2.1.5
pkgdown-related functions no longer automatically strip a trailing slash from the pkgdown site URL, in order to play more nicely with CRAN's URL checks (#1526).
edit_pkgdown_config() is a new function that opens the pkgdown YAML configuration file for the current Project, if such a file exists.
The error thrown when reporting an unsupported GitHub configuration has been fixed for forward compatibility with a future version of rlang, i.e. what is anticipated to be rlang v1.0.0.
Version 2.1.4 was never released. Version was advanced from 2.1.4 to 2.1.5 strictly for CRAN (re-)submission purposes.