Skip to content

Commit a75da73

Browse files
committed
add option to bump severity
1 parent 55c6acc commit a75da73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/utilities.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -785,18 +785,18 @@ as_cli <- function(..., env = caller_env()) {
785785
}
786786

787787
deprecate <- function(when, ..., id = NULL, always = FALSE, user_env = NULL,
788-
escalate = FALSE) {
788+
escalate = NULL) {
789789

790790
defunct <- "3.0.0"
791791
full <- "3.4.0"
792792
soft <- packageVersion("ggplot2")
793793

794794
version <- as.package_version(when)
795-
if (version < defunct) {
795+
if (version < defunct || identical(escalate, "abort")) {
796796
lifecycle::deprecate_stop(when, ...)
797797
}
798798
user_env <- user_env %||% getOption("ggplot2_plot_env") %||% caller_env(2)
799-
if (version <= full) {
799+
if (version <= full || identical(escalate, "warn")) {
800800
lifecycle::deprecate_warn(when, ..., id = id, always = always, user_env = user_env)
801801
} else if (version <= soft) {
802802
lifecycle::deprecate_soft(when, ..., id = id, user_env = user_env)

0 commit comments

Comments
 (0)