Skip to content

Commit b22497c

Browse files
authored
Merge pull request #275 from datacarpentry/update/packages
Update 13 packages
2 parents 2202d7c + 6882090 commit b22497c

File tree

2 files changed

+51
-32
lines changed

2 files changed

+51
-32
lines changed

renv/activate.R

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
local({
33

44
# the requested version of renv
5-
version <- "1.0.5"
5+
version <- "1.0.7"
66
attr(version, "sha") <- NULL
77

88
# the project directory
9-
project <- getwd()
9+
project <- Sys.getenv("RENV_PROJECT")
10+
if (!nzchar(project))
11+
project <- getwd()
1012

1113
# use start-up diagnostics if enabled
1214
diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE")
@@ -129,6 +131,21 @@ local({
129131

130132
}
131133

134+
heredoc <- function(text, leave = 0) {
135+
136+
# remove leading, trailing whitespace
137+
trimmed <- gsub("^\\s*\\n|\\n\\s*$", "", text)
138+
139+
# split into lines
140+
lines <- strsplit(trimmed, "\n", fixed = TRUE)[[1L]]
141+
142+
# compute common indent
143+
indent <- regexpr("[^[:space:]]", lines)
144+
common <- min(setdiff(indent, -1L)) - leave
145+
paste(substring(lines, common), collapse = "\n")
146+
147+
}
148+
132149
startswith <- function(string, prefix) {
133150
substring(string, 1, nchar(prefix)) == prefix
134151
}
@@ -631,6 +648,9 @@ local({
631648

632649
# if the user has requested an automatic prefix, generate it
633650
auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA)
651+
if (is.na(auto) && getRversion() >= "4.4.0")
652+
auto <- "TRUE"
653+
634654
if (auto %in% c("TRUE", "True", "true", "1"))
635655
return(renv_bootstrap_platform_prefix_auto())
636656

@@ -822,24 +842,23 @@ local({
822842

823843
# the loaded version of renv doesn't match the requested version;
824844
# give the user instructions on how to proceed
825-
remote <- if (!is.null(description[["RemoteSha"]])) {
845+
dev <- identical(description[["RemoteType"]], "github")
846+
remote <- if (dev)
826847
paste("rstudio/renv", description[["RemoteSha"]], sep = "@")
827-
} else {
848+
else
828849
paste("renv", description[["Version"]], sep = "@")
829-
}
830850

831851
# display both loaded version + sha if available
832852
friendly <- renv_bootstrap_version_friendly(
833853
version = description[["Version"]],
834-
sha = description[["RemoteSha"]]
854+
sha = if (dev) description[["RemoteSha"]]
835855
)
836856

837-
fmt <- paste(
838-
"renv %1$s was loaded from project library, but this project is configured to use renv %2$s.",
839-
"- Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.",
840-
"- Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.",
841-
sep = "\n"
842-
)
857+
fmt <- heredoc("
858+
renv %1$s was loaded from project library, but this project is configured to use renv %2$s.
859+
- Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.
860+
- Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.
861+
")
843862
catf(fmt, friendly, renv_bootstrap_version_friendly(version), remote)
844863

845864
FALSE

renv/profiles/lesson-requirements/renv.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -290,14 +290,14 @@
290290
},
291291
"fs": {
292292
"Package": "fs",
293-
"Version": "1.6.3",
293+
"Version": "1.6.4",
294294
"Source": "Repository",
295295
"Repository": "CRAN",
296296
"Requirements": [
297297
"R",
298298
"methods"
299299
],
300-
"Hash": "47b5f30c720c23999b913a1a635cf0bb"
300+
"Hash": "15aeb8c27f5ea5161f9f6a641fafd93a"
301301
},
302302
"generics": {
303303
"Package": "generics",
@@ -312,7 +312,7 @@
312312
},
313313
"ggplot2": {
314314
"Package": "ggplot2",
315-
"Version": "3.5.0",
315+
"Version": "3.5.1",
316316
"Source": "Repository",
317317
"Repository": "CRAN",
318318
"Requirements": [
@@ -333,7 +333,7 @@
333333
"vctrs",
334334
"withr"
335335
],
336-
"Hash": "52ef83f93f74833007f193b2d4c159a2"
336+
"Hash": "44c6a2f8202d5b7e878ea274b1092426"
337337
},
338338
"glue": {
339339
"Package": "glue",
@@ -348,7 +348,7 @@
348348
},
349349
"gtable": {
350350
"Package": "gtable",
351-
"Version": "0.3.4",
351+
"Version": "0.3.5",
352352
"Source": "Repository",
353353
"Repository": "CRAN",
354354
"Requirements": [
@@ -359,7 +359,7 @@
359359
"lifecycle",
360360
"rlang"
361361
],
362-
"Hash": "b29cf3031f49b04ab9c852c912547eef"
362+
"Hash": "e18861963cbc65a27736e02b3cd3c4a0"
363363
},
364364
"highr": {
365365
"Package": "highr",
@@ -388,7 +388,7 @@
388388
},
389389
"htmltools": {
390390
"Package": "htmltools",
391-
"Version": "0.5.8",
391+
"Version": "0.5.8.1",
392392
"Source": "Repository",
393393
"Repository": "CRAN",
394394
"Requirements": [
@@ -400,7 +400,7 @@
400400
"rlang",
401401
"utils"
402402
],
403-
"Hash": "149431ee39aba5bdc264112c8ff94444"
403+
"Hash": "81d371a9cc60640e74e4ab6ac46dcedc"
404404
},
405405
"isoband": {
406406
"Package": "isoband",
@@ -435,7 +435,7 @@
435435
},
436436
"knitr": {
437437
"Package": "knitr",
438-
"Version": "1.45",
438+
"Version": "1.46",
439439
"Source": "Repository",
440440
"Repository": "CRAN",
441441
"Requirements": [
@@ -447,7 +447,7 @@
447447
"xfun",
448448
"yaml"
449449
],
450-
"Hash": "1ec462871063897135c1bcbe0fc8f07d"
450+
"Hash": "6e008ab1d696a5283c79765fa7b56b47"
451451
},
452452
"labeling": {
453453
"Package": "labeling",
@@ -464,7 +464,7 @@
464464
"Package": "lattice",
465465
"Version": "0.22-6",
466466
"Source": "Repository",
467-
"Repository": "CRAN",
467+
"Repository": "RSPM",
468468
"Requirements": [
469469
"R",
470470
"grDevices",
@@ -538,14 +538,14 @@
538538
},
539539
"munsell": {
540540
"Package": "munsell",
541-
"Version": "0.5.0",
541+
"Version": "0.5.1",
542542
"Source": "Repository",
543543
"Repository": "CRAN",
544544
"Requirements": [
545545
"colorspace",
546546
"methods"
547547
],
548-
"Hash": "6dfe8bf774944bd5595785e3229d8771"
548+
"Hash": "4fd8900853b746af55b81fda99da7695"
549549
},
550550
"nlme": {
551551
"Package": "nlme",
@@ -694,13 +694,13 @@
694694
},
695695
"renv": {
696696
"Package": "renv",
697-
"Version": "1.0.5",
697+
"Version": "1.0.7",
698698
"Source": "Repository",
699699
"Repository": "CRAN",
700700
"Requirements": [
701701
"utils"
702702
],
703-
"Hash": "32c3f93e8360f667ca5863272ec8ba6a"
703+
"Hash": "397b7b2a265bc5a7a06852524dabae20"
704704
},
705705
"rlang": {
706706
"Package": "rlang",
@@ -772,16 +772,16 @@
772772
},
773773
"stringi": {
774774
"Package": "stringi",
775-
"Version": "1.8.3",
775+
"Version": "1.8.4",
776776
"Source": "Repository",
777-
"Repository": "RSPM",
777+
"Repository": "carpentries",
778778
"Requirements": [
779779
"R",
780780
"stats",
781781
"tools",
782782
"utils"
783783
],
784-
"Hash": "058aebddea264f4c99401515182e656a"
784+
"Hash": "39e1144fd75428983dc3f63aa53dfa91"
785785
},
786786
"stringr": {
787787
"Package": "stringr",
@@ -860,13 +860,13 @@
860860
},
861861
"tinytex": {
862862
"Package": "tinytex",
863-
"Version": "0.50",
863+
"Version": "0.51",
864864
"Source": "Repository",
865865
"Repository": "CRAN",
866866
"Requirements": [
867867
"xfun"
868868
],
869-
"Hash": "be7a76845222ad20adb761f462eed3ea"
869+
"Hash": "d44e2fcd2e4e076f0aac540208559d1d"
870870
},
871871
"tzdb": {
872872
"Package": "tzdb",

0 commit comments

Comments
 (0)