Skip to content

Commit

Permalink
[actions] update 17 packages
Browse files Browse the repository at this point in the history
  • Loading branch information
zkamvar authored Apr 2, 2024
1 parent 3f304af commit 074262d
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 102 deletions.
39 changes: 30 additions & 9 deletions renv/activate.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local({

# the requested version of renv
version <- "1.0.3"
version <- "1.0.5"
attr(version, "sha") <- NULL

# the project directory
Expand Down Expand Up @@ -31,6 +31,14 @@ local({
if (!is.null(override))
return(override)

# if we're being run in a context where R_LIBS is already set,
# don't load -- presumably we're being run as a sub-process and
# the parent process has already set up library paths for us
rcmd <- Sys.getenv("R_CMD", unset = NA)
rlibs <- Sys.getenv("R_LIBS", unset = NA)
if (!is.na(rlibs) && !is.na(rcmd))
return(FALSE)

# next, check environment variables
# TODO: prefer using the configuration one in the future
envvars <- c(
Expand All @@ -50,9 +58,22 @@ local({

})

if (!enabled)
# bail if we're not enabled
if (!enabled) {

# if we're not enabled, we might still need to manually load
# the user profile here
profile <- Sys.getenv("R_PROFILE_USER", unset = "~/.Rprofile")
if (file.exists(profile)) {
cfg <- Sys.getenv("RENV_CONFIG_USER_PROFILE", unset = "TRUE")
if (tolower(cfg) %in% c("true", "t", "1"))
sys.source(profile, envir = globalenv())
}

return(FALSE)

}

# avoid recursion
if (identical(getOption("renv.autoloader.running"), TRUE)) {
warning("ignoring recursive attempt to run renv autoloader")
Expand Down Expand Up @@ -1041,7 +1062,7 @@ local({
# if jsonlite is loaded, use that instead
if ("jsonlite" %in% loadedNamespaces()) {

json <- catch(renv_json_read_jsonlite(file, text))
json <- tryCatch(renv_json_read_jsonlite(file, text), error = identity)
if (!inherits(json, "error"))
return(json)

Expand All @@ -1050,7 +1071,7 @@ local({
}

# otherwise, fall back to the default JSON reader
json <- catch(renv_json_read_default(file, text))
json <- tryCatch(renv_json_read_default(file, text), error = identity)
if (!inherits(json, "error"))
return(json)

Expand All @@ -1063,14 +1084,14 @@ local({
}

renv_json_read_jsonlite <- function(file = NULL, text = NULL) {
text <- paste(text %||% read(file), collapse = "\n")
text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n")
jsonlite::fromJSON(txt = text, simplifyVector = FALSE)
}

renv_json_read_default <- function(file = NULL, text = NULL) {

# find strings in the JSON
text <- paste(text %||% read(file), collapse = "\n")
text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n")
pattern <- '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
locs <- gregexpr(pattern, text, perl = TRUE)[[1]]

Expand Down Expand Up @@ -1118,14 +1139,14 @@ local({
map <- as.list(map)

# remap strings in object
remapped <- renv_json_remap(json, map)
remapped <- renv_json_read_remap(json, map)

# evaluate
eval(remapped, envir = baseenv())

}

renv_json_remap <- function(json, map) {
renv_json_read_remap <- function(json, map) {

# fix names
if (!is.null(names(json))) {
Expand All @@ -1152,7 +1173,7 @@ local({
# recurse
if (is.recursive(json)) {
for (i in seq_along(json)) {
json[i] <- list(renv_json_remap(json[[i]], map))
json[i] <- list(renv_json_read_remap(json[[i]], map))
}
}

Expand Down
121 changes: 28 additions & 93 deletions renv/profiles/lesson-requirements/renv.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"R": {
"Version": "4.3.2",
"Version": "4.3.3",
"Repositories": [
{
"Name": "carpentries",
Expand Down Expand Up @@ -39,13 +39,14 @@
},
"bslib": {
"Package": "bslib",
"Version": "0.6.1",
"Version": "0.7.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"base64enc",
"cachem",
"fastmap",
"grDevices",
"htmltools",
"jquerylib",
Expand All @@ -56,7 +57,7 @@
"rlang",
"sass"
],
"Hash": "c0d8599494bc7fb408cd206bbdd9cab0"
"Hash": "8644cc53f43828f19133548195d7e59e"
},
"cachem": {
"Package": "cachem",
Expand All @@ -71,36 +72,25 @@
},
"cli": {
"Package": "cli",
"Version": "3.6.1",
"Version": "3.6.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"utils"
],
"Hash": "89e6d8219950eac806ae0c489052048a"
"Hash": "1216ac65ac55ec0058a6f75d7ca0fd52"
},
"digest": {
"Package": "digest",
"Version": "0.6.33",
"Version": "0.6.35",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"utils"
],
"Hash": "b18a9cf3c003977b0cc49d5e76ebe48d"
},
"ellipsis": {
"Package": "ellipsis",
"Version": "0.3.2",
"Source": "Repository",
"Repository": "RSPM",
"Requirements": [
"R",
"rlang"
],
"Hash": "bb0eec2fe32e88d9e2836c2f73ea2077"
"Hash": "698ece7ba5a4fa4559e3d537e7ec3d31"
},
"evaluate": {
"Package": "evaluate",
Expand Down Expand Up @@ -145,14 +135,14 @@
},
"glue": {
"Package": "glue",
"Version": "1.6.2",
"Version": "1.7.0",
"Source": "Repository",
"Repository": "RSPM",
"Repository": "CRAN",
"Requirements": [
"R",
"methods"
],
"Hash": "4f2596dfb05dac67b9dc558e5c6fba2e"
"Hash": "e0b3a53876554bd45879e596cdb10a52"
},
"highr": {
"Package": "highr",
Expand All @@ -167,20 +157,19 @@
},
"htmltools": {
"Package": "htmltools",
"Version": "0.5.7",
"Version": "0.5.8",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"base64enc",
"digest",
"ellipsis",
"fastmap",
"grDevices",
"rlang",
"utils"
],
"Hash": "2d7b3857980e0e0d0a1fd6f11928ab0f"
"Hash": "149431ee39aba5bdc264112c8ff94444"
},
"jquerylib": {
"Package": "jquerylib",
Expand Down Expand Up @@ -231,16 +220,6 @@
],
"Hash": "b8552d117e1b808b09a832f589b79035"
},
"magrittr": {
"Package": "magrittr",
"Version": "2.0.3",
"Source": "Repository",
"Repository": "RSPM",
"Requirements": [
"R"
],
"Hash": "7ce2733a9826b3aeb1775d56fd305472"
},
"memoise": {
"Package": "memoise",
"Version": "2.0.1",
Expand Down Expand Up @@ -274,28 +253,28 @@
},
"renv": {
"Package": "renv",
"Version": "1.0.3",
"Version": "1.0.5",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"utils"
],
"Hash": "41b847654f567341725473431dd0d5ab"
"Hash": "32c3f93e8360f667ca5863272ec8ba6a"
},
"rlang": {
"Package": "rlang",
"Version": "1.1.2",
"Version": "1.1.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"utils"
],
"Hash": "50a6dbdc522936ca35afc5e2082ea91b"
"Hash": "42548638fae05fd9a9b5f3f437fbbbe2"
},
"rmarkdown": {
"Package": "rmarkdown",
"Version": "2.25",
"Version": "2.26",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -308,18 +287,17 @@
"jsonlite",
"knitr",
"methods",
"stringr",
"tinytex",
"tools",
"utils",
"xfun",
"yaml"
],
"Hash": "d65e35823c817f09f4de424fcdfa812a"
"Hash": "9b148e7f95d33aac01f31282d49e4f44"
},
"sass": {
"Package": "sass",
"Version": "0.4.7",
"Version": "0.4.9",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -329,79 +307,36 @@
"rappdirs",
"rlang"
],
"Hash": "6bd4d33b50ff927191ec9acbf52fd056"
},
"stringi": {
"Package": "stringi",
"Version": "1.8.2",
"Source": "Repository",
"Repository": "https://carpentries.r-universe.dev",
"Requirements": [
"R",
"stats",
"tools",
"utils"
],
"Hash": "e68c45f81639001af5f1b15cd3599bbd"
},
"stringr": {
"Package": "stringr",
"Version": "1.5.1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"cli",
"glue",
"lifecycle",
"magrittr",
"rlang",
"stringi",
"vctrs"
],
"Hash": "960e2ae9e09656611e0b8214ad543207"
"Hash": "d53dbfddf695303ea4ad66f86e99b95d"
},
"tinytex": {
"Package": "tinytex",
"Version": "0.49",
"Version": "0.50",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"xfun"
],
"Hash": "5ac22900ae0f386e54f1c307eca7d843"
},
"vctrs": {
"Package": "vctrs",
"Version": "0.6.5",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"cli",
"glue",
"lifecycle",
"rlang"
],
"Hash": "c03fa420630029418f7e6da3667aac4a"
"Hash": "be7a76845222ad20adb761f462eed3ea"
},
"xfun": {
"Package": "xfun",
"Version": "0.41",
"Version": "0.43",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"grDevices",
"stats",
"tools"
],
"Hash": "460a5e0fe46a80ef87424ad216028014"
"Hash": "ab6371d8653ce5f2f9290f4ec7b42a8e"
},
"yaml": {
"Package": "yaml",
"Version": "2.3.7",
"Version": "2.3.8",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "0d0056cc5383fbc240ccd0cb584bf436"
"Hash": "29240487a071f535f5e5d5a323b7afbd"
}
}
}

0 comments on commit 074262d

Please sign in to comment.