Skip to content

use_standalone() removes minimal version for dependency #2198

@maelle

Description

@maelle

In a package where we had a minimal version for the dependency rlang, I was surprised that use_standalone() removed the mininal version.

dir <- withr::local_tempdir()
pkg <- usethis::create_package(dir)
#> ✔ Setting active project to "/tmp/Rtmp1jPDvb/file7af463fef261".
#> ✔ Creating 'R/'.
#> ✔ Writing 'DESCRIPTION'.
#> Package: file7af463fef261
#> Title: What the Package Does (One Line, Title Case)
#> Version: 0.0.0.9000
#> Authors@R (parsed):
#>     * First Last <first.last@example.com> [aut, cre]
#> Description: What the package does (one paragraph).
#> License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a
#>     license
#> Encoding: UTF-8
#> Roxygen: list(markdown = TRUE)
#> RoxygenNote: 7.3.3.9000
#> ✔ Writing 'NAMESPACE'.
#> ✔ Setting active project to "<no active project>".
usethis::local_project(pkg)
#> ✔ Setting active project to "/tmp/Rtmp1jPDvb/file7af463fef261".
usethis::use_package("rlang", min_version = "1.1.0")
#> ✔ Adding rlang to 'Imports' field in DESCRIPTION.
#> ☐ Refer to functions with `rlang::fun()`.
desc::desc_get_deps()
#>      type package  version
#> 1 Imports   rlang >= 1.1.0
usethis::use_standalone("r-lib/rlang", "standalone-purrr")
#> ✔ Writing 'R/import-standalone-purrr.R'.
desc::desc_get_deps()
#>      type package version
#> 1 Imports   rlang       *

Created on 2025-11-20 with reprex v2.1.1

use_package(import$pkg, min_version = ver)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions