We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b96d782 commit 74a4f4fCopy full SHA for 74a4f4f
tools/update_plotlyjs.R
@@ -66,8 +66,12 @@ withr::with_dir(tmpdir, {
66
Schema <- jsonlite::fromJSON("dist/plot-schema.json")
67
bundleTraceMap <-
68
paste0(readLines("tasks/util/constants.js"), collapse = "\n") |>
69
- stringr::str_extract(pattern = "(?<=\\b(const|var) partialBundleTraces = )\\{[^}]+\\}") |>
70
- yaml::read_yaml(text = _)
+ stringr::str_extract(pattern = "(?<=\\b(const|var) partialBundleTraces = )\\{[^}]+\\}")
+
71
+ if (is.na(bundleTraceMap)) {
72
+ stop("No `partialBundleTraces` variable definition found in Plotly source file `tasks/util/constants.js`. Does the regex pattern need an update?")
73
+ }
74
+ bundleTraceMap <- yaml::read_yaml(text = bundleTraceMap)
75
76
withr::with_dir(
77
pkg_dir, usethis::use_data(
0 commit comments