Title: | Informative Messages About Outdated Packages |
---|---|
Description: | When a package is loaded, the source repository is checked for new versions and a message is shown in the console indicating whether the package is out of date. |
Authors: | Jacob Scott [aut, cre] |
Maintainer: | Jacob Scott <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-10 05:15:10 UTC |
Source: | https://github.com/wurli/updateme |
These functions may be useful if you find the slight delay caused by updateme looking up new package versions to be slowing down your workflow.
updateme_on() updateme_off()
updateme_on() updateme_off()
The old updateme.on
option, as returned by options()
updateme_sources_set()
to turn updateme off for individual
packages
This function is a helper for setting the "updateme.sources"
global option. It provides a user-friendly interface and validation of the
options you set.
updateme_sources_set(...)
updateme_sources_set(...)
... |
Named or unnamed arguments. Values should be either:
If arguments are named, names should indicate package which the option should apply to. If unnamed, the option will apply to all packages. See examples for more information. |
The result of setting
options(updateme.sources = <new_options>)
updateme supports packages installed from private repositories on GitHub and GitLab. To get upstream package version from either, you should only have to configure a personal access token (PAT):
For GitHub packages, updateme checks, in order:
The GITHUB_PAT
environmental variable
The GITHUB_TOKEN
environmental variable
Any personal access tokens configured using gitcreds::gitcreds_set()
For GitLab packages, updateme checks, in order:
The GITLAB_PAT
environmental variable
The GITLAB_TOKEN
environmental variable
Any personal access tokens configured using gitcreds::gitcreds_set()
updateme_on()
and updateme_off()
to disable updateme for all
packages
# If you want to check non-standard repos for new versions of packages, # you'll first have to set the repos global option. Note that each # option must be named for compatibility with updateme old_repos <- options(repos = c( # Your default CRAN mirror will likely be something like this CRAN = "https://cloud.r-project.org", # The r-lib r-universe, including dev versions of infrastructure packages # like cli, rlang, etc `r-lib` = "https://r-lib.r-universe.dev" )) # 1. New versions will first be looked up from the r-lib R universe by default # 2. If not found, they will be looked up from the usual CRAN mirror # 3. dplyr will always be first looked up from GitHub # 4. ggplot2 won't be looked up or notified about old_updateme_sources <- updateme_sources_set( "r-lib", "CRAN", dplyr = "https://github.com/tidyverse/dplyr", # Name is optional here ggplot2 = NA ) # memoise should now be looked up from the r-lib r-universe if (interactive()) { library(memoise) } # Restore old options options(old_repos) options(old_updateme_sources)
# If you want to check non-standard repos for new versions of packages, # you'll first have to set the repos global option. Note that each # option must be named for compatibility with updateme old_repos <- options(repos = c( # Your default CRAN mirror will likely be something like this CRAN = "https://cloud.r-project.org", # The r-lib r-universe, including dev versions of infrastructure packages # like cli, rlang, etc `r-lib` = "https://r-lib.r-universe.dev" )) # 1. New versions will first be looked up from the r-lib R universe by default # 2. If not found, they will be looked up from the usual CRAN mirror # 3. dplyr will always be first looked up from GitHub # 4. ggplot2 won't be looked up or notified about old_updateme_sources <- updateme_sources_set( "r-lib", "CRAN", dplyr = "https://github.com/tidyverse/dplyr", # Name is optional here ggplot2 = NA ) # memoise should now be looked up from the r-lib r-universe if (interactive()) { library(memoise) } # Restore old options options(old_repos) options(old_updateme_sources)