github gildas-lormeau/single-file-cli v2.7.0

latest releases: v2.7.2, v2.7.1
6 hours ago

SingleFile CLI 2.7.0

CLI fixes and improvements

  • a page that does not reach the state set by --browser-wait-until before --browser-load-max-time expires is captured as it is, once it has reached DOMContentLoaded. The page loading is stopped and a warning on stderr names the state it had reached. Previously the CLI reloaded the page silently with the next less strict state, once per timeout, so a page kept busy by a tracking script that never stopped requesting took over a minute to save and was captured from a reload. Set --browser-wait-until-fallback=false to get a load timeout error instead
  • the browser is closed and its temporary profile deleted when the CLI process is killed before it exits, on macOS and Linux. A killed process left the browser running
  • the help of --declare-appended-data says that it has no effect when the extra data is relocated ahead of the compressed data

Core

Updated to single-file-core 1.5.120, which brings:

  • the screen size is restored before the resize event that ends the lazy-loading pass. Pages that size their blocks from the viewport in a script were saved with enormous headers (#1603)
  • the lazy-loading pass stays open while the page inserts stylesheets
  • zero-height observer targets are no longer reported as visible
  • page text can no longer close the provenance comment. A --> coming from an infobar template broke out of it
  • the charset declaration stays inside the 1024-byte scan window when the doctype is long
  • the canonical link and the viewport meta are escaped in self-extracting pages
  • the recovery payload of universal self-extracting pages is written and read little-endian whatever the host byte order
  • the unassigned newline code is rejected when extracting a universal self-extracting page
  • the whole document is searched for the zip data comment when extracting
  • the language encoding flag is set on the page.pdf records
  • both prescan windows are measured from the start of the file under the PNG face
  • the entries of a self-extracting page are compressed once. The passes that change its layout copy them instead of compressing them again
  • the reservation of relocated extra data is sized from the measured payload shift, which avoided a third pass in one build out of four
  • a self-extracting page whose extra data is relocated ends at the end of central directory record, so ZIP readers rejecting trailing bytes open it

Co-authored by Claude (Claude Code)

Don't miss a new single-file-cli release

NewReleases is sending notifications on new releases.