Skip to content

xfun 0.60

Latest

Choose a tag to compare

@yihui yihui released this 09 Jul 14:00
  • read_utf8() gained a new argument binary (defaulting to FALSE). On Windows, readLines() on a text-mode connection treats a Ctrl+Z byte (\x1a) as end-of-file and silently truncates files that contain this byte (e.g., self-contained HTML files that embed the PNG signature \x89PNG\r\n\x1a\n in JavaScript). Setting binary = TRUE reads the file via a binary-mode connection, which reads the whole file regardless of Ctrl+Z bytes (thanks, @dmurdoch, rstudio/bookdown#1523).

  • tojson() now serializes Inf/-Inf as Infinity/-Infinity (valid JavaScript literals) instead of the bare R tokens Inf/-Inf which are invalid in both JSON and JS.

  • Added a new function browser_dom() to execute JavaScript on an HTML page via a headless browser and return (or save) the rendered DOM as HTML.

  • Fixed a bug in browser_print() where proxy bypass lists containing semicolons were not properly quoted, causing shell interpretation errors. Also added --user-data-dir to avoid profile lock conflicts with running browser instances.

  • The reverse-proxy process started by new_app(name = '') now self-terminates when its backend httpd becomes unreachable (e.g., the parent R process exits), preventing orphaned background processes (thanks, @remlapmot, #122).

  • post_release() now also accepts version numbers in the X.Y.0 format. The NEWS.md header format is auto-detected from the existing file, so packages using formats other than # CHANGES IN PKG VERSION X.Y (e.g., # PKG X.Y) are handled correctly.