diff --git a/R/init.R b/R/init.R index 132336b..8f993e5 100644 --- a/R/init.R +++ b/R/init.R @@ -62,6 +62,18 @@ vt_use_validation <- function( pkg = ".", working_dir, ...) { #' @importFrom usethis create_package vt_create_package <- function(pkg = ".", ..., fields = list(), rstudio = rstudioapi::isAvailable(), roxygen = TRUE, check_name = TRUE, open = rlang::is_interactive()) { + # This fields modification block can likely be removed once usethis > 3.0.0 is + # released on CRAN. See full note in tests/testthat/helpers.R + fields <- utils::modifyList( + fields, + list( + `Authors@R` = paste0( + "person(\"First\", \"Last\", email = \"first.last", + "@example.com\", role = c(\"aut\", \"cre\"))" + ) + ), + keep.null = TRUE + ) tryCatch({ create_package( diff --git a/tests/testthat/helper.R b/tests/testthat/helper.R index 09e607b..5f7586f 100644 --- a/tests/testthat/helper.R +++ b/tests/testthat/helper.R @@ -18,7 +18,7 @@ make_vt_test_package <- function(){ #' once usethis > 3.0.0 is released, the custom `fields` argument below should #' be able to be removed. At that time, if desired, this wrapper function could #' also just be removed and replaced with usethis::create_package() in the unit -#' tests. +#' tests. See also another instance in vt_create_package(). #' #' @param ... Passed to usethis::create_package() #'