Skip to content

Commit 144401d

Browse files
committed
Drop the lazyeval dependency in favour of rlang.
1 parent f7acae4 commit 144401d

File tree

7 files changed

+7
-13
lines changed

7 files changed

+7
-13
lines changed

DESCRIPTION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ Imports:
4141
dplyr,
4242
vctrs,
4343
tibble,
44-
lazyeval (>= 0.2.0),
4544
rlang (>= 1.0.0),
4645
crosstalk,
4746
purrr,

NAMESPACE

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,6 @@ importFrom(httr,write_disk)
261261
importFrom(jsonlite,parse_json)
262262
importFrom(jsonlite,read_json)
263263
importFrom(jsonlite,toJSON)
264-
importFrom(lazyeval,all_dots)
265-
importFrom(lazyeval,f_eval)
266-
importFrom(lazyeval,f_new)
267-
importFrom(lazyeval,is_formula)
268-
importFrom(lazyeval,is_lang)
269264
importFrom(magrittr,"%>%")
270265
importFrom(purrr,transpose)
271266
importFrom(rlang,"!!!")

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# plotly (development version)
22

3-
3+
* Removed the dependency on the `{lazyeval}` package.
44

55

66
# plotly 4.12.0

R/ggplotly.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,13 +1161,13 @@ gg2list <- function(p, width = NULL, height = NULL,
11611161
mappingFormulas <- lapply(layers, function(x) {
11621162
mappings <- getAesMap(plot, x)
11631163
if (originalData) {
1164-
lapply(mappings, lazyeval::f_new)
1164+
lapply(mappings, function(x) rlang::new_formula(lhs = NULL, rhs = x))
11651165
} else {
11661166
nms <- names(mappings)
1167-
setNames(lapply(nms, function(x) lazyeval::f_new(as.name(x))), nms)
1167+
setNames(lapply(nms, function(x) rlang::new_formula(lhs = NULL, rhs = as.name(x))), nms)
11681168
}
11691169
})
1170-
1170+
11711171
return_dat <- if (originalData) layer_data else data
11721172

11731173
# translate group aesthetics to data attributes

R/imports.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#' @importFrom jsonlite toJSON parse_json read_json
99
#' @importFrom httr RETRY content config add_headers authenticate stop_for_status warn_for_status write_disk
1010
#' @importFrom htmlwidgets createWidget sizingPolicy saveWidget onRender prependContent
11-
#' @importFrom lazyeval f_eval is_formula all_dots is_lang f_new
1211
#' @importFrom tibble as_tibble
1312
#' @importFrom htmltools browsable tagList tags div
1413
#' @importFrom purrr transpose

R/plotly_build.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,8 @@ traceify <- function(dat, x = NULL) {
10101010

10111011

10121012
eval_attr <- function(x, data = NULL) {
1013-
if (lazyeval::is_formula(x)) lazyeval::f_eval(x, data) else x
1013+
if (rlang::is_formula(x)) rlang::eval_tidy(rlang::f_rhs(x), data = data,
1014+
env = rlang::f_env(x)) else x
10141015
}
10151016

10161017
# overwrite defaults with the user defined palette

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ verify_key_type <- function(p) {
837837
p$x$data[[i]]$`_isSimpleKey` <- TRUE
838838
p$x$data[[i]]$`_isNestedKey` <- FALSE
839839
}
840-
p$x$data[[i]]$`_isNestedKey` <- p$x$data[[i]]$`_isNestedKey` %||% !lazyeval::is_atomic(k)
840+
p$x$data[[i]]$`_isNestedKey` <- p$x$data[[i]]$`_isNestedKey` %||% !rlang::is_atomic(k)
841841
# key values should always be strings
842842
if (p$x$data[[i]]$`_isNestedKey`) {
843843
p$x$data[[i]]$key <- lapply(p$x$data[[i]]$key, function(x) I(as.character(x)))

0 commit comments

Comments
 (0)