From e0de8fec58549284dd2901687aefa275ff7792f1 Mon Sep 17 00:00:00 2001 From: Joe Thorley Date: Tue, 9 Jul 2024 13:41:53 -0700 Subject: [PATCH] unofficially back to 3.6 to not break other packages --- DESCRIPTION | 2 +- NEWS.md | 2 +- R/internal.R | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f6e9ef69..04d5d6a7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -21,7 +21,7 @@ License: MIT + file LICENSE URL: https://poissonconsulting.github.io/chk/, https://github.com/poissonconsulting/chk/ BugReports: https://github.com/poissonconsulting/chk/issues/ Depends: - R (>= 4.0) + R (>= 3.6) Imports: lifecycle, methods, diff --git a/NEWS.md b/NEWS.md index 5ff75f5b..1f7fb320 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ # chk 0.9.2 -- No longer support R 3.6 as dependency `evaluate` of suggested dependency `testthat` switched to 4.0. +- No longer officially supports R 3.6 as dependency `evaluate` of suggested dependency `testthat` switched to 4.0. - `check_key()` now preserves active status of `sfc` column of `sf` object. - Fixed `vld_join(by = NULL)` with R 4.5. diff --git a/R/internal.R b/R/internal.R index 552d9b45..68ea62cd 100644 --- a/R/internal.R +++ b/R/internal.R @@ -14,3 +14,9 @@ anyDuplicated(x) } + +# remove when no longer support R < 3.6.0 +str2lang <- function(text) { + ex <- parse(text = text, keep.source = FALSE) + ex[[1L]] +}