diff --git a/DESCRIPTION b/DESCRIPTION index 6373f3d7..70ffdba0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,7 +28,6 @@ Depends: Imports: attempt (>= 0.3.0), config, - here, htmltools, rlang (>= 1.0.0), shiny (>= 1.5.0), diff --git a/NEWS.md b/NEWS.md index 18a2d0e5..27811516 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,8 @@ ## Breaking change +- Creating a `golem` doesn't use `set_here()` anymore. `here::here()` should be able to find its way based using `DESCRIPTION`. + - The `add_*_files` and `use_*_files` now fail when: - The directory where the user tries to add the file doesn't exist. `{golem}` used to try to create the directory but that's not the function job — use_*_file functions should only be there to add file (Singe responsabily ) - The file that the user tries to create already exists diff --git a/R/create_golem.R b/R/create_golem.R index 2cbb60b0..1f54d121 100644 --- a/R/create_golem.R +++ b/R/create_golem.R @@ -60,11 +60,6 @@ copy_golem_skeleton_and_replace_name <- function( cat_green_tick("Copied app skeleton") } -# For mocking in tests -here_set_here <- function(...) { - here::set_here(...) -} - #' Create a package for a Shiny App using `{golem}` #' #' @param path Name of the folder to create the package in. @@ -145,9 +140,6 @@ create_golem <- function( path = path_to_golem, open = FALSE ) - if (!file.exists(".here")) { - here_set_here(path_to_golem) - } cat_green_tick("Created package directory") } diff --git a/R/install_dev_deps.R b/R/install_dev_deps.R index 700afc16..2f21cdef 100644 --- a/R/install_dev_deps.R +++ b/R/install_dev_deps.R @@ -8,7 +8,6 @@ #' + {roxygen2} #' + {attachment} #' + {rstudioapi} -#' + {here} #' + {fs} #' + {desc} #' + {pkgbuild} @@ -87,7 +86,6 @@ dev_deps <- unique( "devtools", "dockerfiler", "fs", - "here", "httpuv", "pkgbuild", "pkgload", diff --git a/man/install_dev_deps.Rd b/man/install_dev_deps.Rd index afd92ae2..c06536e8 100644 --- a/man/install_dev_deps.Rd +++ b/man/install_dev_deps.Rd @@ -28,7 +28,6 @@ This function will run rlang::check_installed() on: \item {roxygen2} \item {attachment} \item {rstudioapi} -\item {here} \item {fs} \item {desc} \item {pkgbuild} diff --git a/tests/testthat/test-add_r_files.R b/tests/testthat/test-add_r_files.R index b13e29f3..e0088a91 100644 --- a/tests/testthat/test-add_r_files.R +++ b/tests/testthat/test-add_r_files.R @@ -1,7 +1,6 @@ test_that("add_fct and add_utils", { testthat::with_mocked_bindings( # This is just to bypass usethis_use_test - # setting here() usethis_use_test = function(name, ...) { file.create( file.path( diff --git a/tests/testthat/test-create_golem.R b/tests/testthat/test-create_golem.R index 4c6eb719..bde941c8 100644 --- a/tests/testthat/test-create_golem.R +++ b/tests/testthat/test-create_golem.R @@ -28,8 +28,6 @@ test_that("create_golem works", { testthat::with_mocked_bindings( usethis_create_project = function(path, open) { dir.create(path, recursive = TRUE) - }, - here_set_here = function(path) { return(TRUE) }, {