Skip to content

Commit 6020b02

Browse files
committed
Move digest to suggests
Fixes #2057
1 parent 292d6c6 commit 6020b02

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Imports:
2121
callr (>= 3.7.3),
2222
cli (>= 3.6.1),
2323
desc (>= 1.4.2),
24-
digest (>= 0.6.33),
2524
evaluate (>= 1.0.1),
2625
jsonlite (>= 1.8.7),
2726
lifecycle (>= 1.0.3),
@@ -40,6 +39,7 @@ Suggests:
4039
covr,
4140
curl (>= 0.9.5),
4241
diffviewer (>= 0.1.0),
42+
digest (>= 0.6.33),
4343
knitr,
4444
rmarkdown,
4545
rstudioapi,

R/expect-known.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ expect_equal_to_reference <- function(..., update = FALSE) {
191191
#' @param hash Known hash value. Leave empty and you'll be informed what
192192
#' to use in the test output.
193193
expect_known_hash <- function(object, hash = NULL) {
194+
check_installed("digest")
194195
edition_deprecate(3, "expect_known_hash()",
195196
"Please use `expect_snapshot_value()` instead"
196197
)

R/watcher.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ safe_digest <- function(path) {
4444
if (is_directory(path)) return(NA_character_)
4545
if (!is_readable(path)) return(NA_character_)
4646

47-
digest::digest(path, file = TRUE)
47+
rlang::hash_file(path)
4848
}
4949

5050
#' Capture the state of a directory.

0 commit comments

Comments
 (0)