xfun
Collection of miscellaneous helper functions used across R packages
Yihui's utility grab-bag is quietly growing a web server and a headless browser.
◆Recent moves
- 1mo ago
browser_dom() added; Windows silently truncated self-contained HTML
Adds browser_dom() to run JavaScript on a page and return the rendered DOM, and fixes a Windows bug where read_utf8() silently truncated any file containing a Ctrl+Z byte — which includes self-contained HTML embedding a PNG signature. The truncation fix matters more than it reads: bookdown output was losing content without an error.
View source ↗ - 1mo ago
post_release() automates post-CRAN chores; nested math fixed
Adds post_release() to automate tagging, version bumping and GitHub release creation after a CRAN submission, fixes nested LaTeX environment handling in protect_math(), and makes system3() error on non-zero exit codes. The release-automation half is tooling for the maintainer's own workflow rather than for users of the package.
View source ↗ - 2mo ago
new_app() moves to a proxy; serve_dir() and random_port() added
⚡ SPARKRearchitects new_app() around a lightweight proxy in front of R's internal httpd and adds serve_dir() and random_port(). This is the release where xfun's local-serving story stops being an accident of the help server and becomes deliberate infrastructure.
View source ↗ - 4mo ago
Literal JavaScript in tojson(); record() bottleneck fixed
Adds js() to mark strings as literal JavaScript so tojson() leaves them unquoted, tab_content() for building tabset panels, and a sync argument to submit_cran(). Also fixes a record() bottleneck on very large output, reported from the Quarto side.
View source ↗ - 6mo ago
Deprecated attr() and qs support removed; parallel rev_check
Removes the deprecated xfun::attr() and drops qs support across the caching functions because qs was removed from CRAN, while adding parallel downloads to rev_check(). A cleanup release whose agenda was set by CRAN, not by the package.
View source ↗ - 8mo ago
browser_print() opens the headless-browser path
Adds browser_print() to drive a headless browser and print a page to PDF, PNG or JPEG — the first piece of what becomes the browser toolkit — plus qs2 caching support and cleaner error capture in record().
View source ↗