SingleFile CLI 2.11.0
New features
--dump-jsonwrites the metadata of the saved page to standard output as JSON: the title, the filename, the links and the HTTP request and response info. Unlike--output-jsonit leaves the page file alone, so the page is still written where it was asked for and the two outputs can be combined.--output-jsonreplaces the page with its JSON, so given an output path it wrote<output>.jsonand no page file at all. The page content itself is not included. The option is refused together with--output-json, and together with--dump-contentunless--outputis set, because both write to standard output--insert-meta-noindexinserts a<meta name=robots content=noindex>element into the saved page, so a copy served on a public host is not indexed. The option existed in single-file-core and in the extensions but had no flag here. It is ignored when the page already declaresnoindex
CLI fixes and improvements
- The help text of
--max-appended-data-lengthsays that raising the budget above 65535 silently defeats--declare-appended-data. The declaration is the length of the ZIP comment, a 16-bit field, so a longer run of appended data is written undeclared and without a warning, and a reader that rejects undeclared trailing bytes rejects the file
Fixes from single-file-core 1.5.127
- Every
@font-facerule of a composite face is kept. 1.5.126, which the previous release shipped, embedded only the last rule declared for a given family, style and weight, on the assumption that the cascade only ever uses the last one. CSS Fonts 4 says the opposite: rules with identical descriptors form a single composite face, checked in reverse declaration order for each character, so a character missing from the last rule's font falls back to an earlier one. An icon font split across two files lost every glyph only the earlier file carried, and rendered as tofu. Each rule now keeps its own sources, and a rule repeated with the same descriptors and the same source is still embedded once - A source repeated as the last entry of an
@font-facesrclist is embedded once. The comparison kept the separating comma in the text it compared, so a source declared earlier never matched the copy sitting in last position - A page copied into a multi-page archive keeps the metadata of the entry it came from. The file attributes, the creation and last access dates, the owner and group, the compression level and any extra field the entry carried were all dropped, because the copy forwarded a hand-listed subset of the entry's properties
- zip.js updated to 2.13.1. The language encoding flag is now set only on the entries whose name or comment needs it, rather than on every entry, which is what tools reading names in the legacy code page expect. Archives written by this version therefore differ byte for byte from those written by earlier ones
- The check that chooses the wrapper hiding the archive inside the page scans the bytes instead of decoding them to text. Decoding allocated a copy of the whole archive at twice its size, on every attempt, and a large archive takes more than one attempt. The check is about five times faster and allocates nothing
Co-authored by Claude (Claude Code)