Files
Rpacman/R/snapshot_history.R
2023-09-28 09:44:06 +01:00

13 lines
304 B
R

#' Load the existing snapshot history of the project
#'
#' @return A list containing the previous snapshots
#' @import jsonlite
#' @export
snapshot_history <- function() {
if (!file.exists("pacman.lock")) {
return(list())
}
state <- jsonlite::read_json("pacman.lock")
return(state$history)
}