Skip to content

Releases

v2.12.3

Choose a tag to compare

@sayakmukherjee080 sayakmukherjee080 released this 08 Nov 12:53

Changed

  • Rebuilt the README and added focused docs for configuration, head metadata, hydration, output, locales and audit. No runtime changes.

Full changelog: https://github.com/sayakmukherjee080/snappy-prerender/blob/main/CHANGELOG.md

v2.12.2

Choose a tag to compare

@sayakmukherjee080 sayakmukherjee080 released this 08 Nov 11:12

Changed

  • Cleaned up changelog formatting so GitHub renders release notes without manual line breaks. No runtime changes.

Full changelog: https://github.com/sayakmukherjee080/snappy-prerender/blob/main/CHANGELOG.md

v2.12.1

Choose a tag to compare

@sayakmukherjee080 sayakmukherjee080 released this 08 Nov 10:58

Changed

  • Shortened the feature summary in the README and demo. No runtime changes.

Full changelog: https://github.com/sayakmukherjee080/snappy-prerender/blob/main/CHANGELOG.md

v2.12.0

Choose a tag to compare

@sayakmukherjee080 sayakmukherjee080 released this 08 Nov 10:46

Added

  • llmsTxt generates an llms.txt route index with sections, page titles, descriptions and links.
  • The object form accepts file, title, description, include, exclude and maxRoutes.
  • CLI flags: --llms-txt, --llms-txt-file and --llms-txt-max-routes.
  • report.llmsTxt records the file, route count, sections and listed URLs.

Changed

  • llms.txt is rebuilt on cached runs and skipped for dry runs and image output.

Full changelog: https://github.com/sayakmukherjee080/snappy-prerender/blob/main/CHANGELOG.md

v2.11.4

Choose a tag to compare

@sayakmukherjee080 sayakmukherjee080 released this 07 Nov 23:23

Changed

  • Expanded the README feature summary to cover the full 2.11 feature set: framework
    support, prerendering and routing, Playwright rendering, hydration verification, SEO
    and discovery, locales, incremental builds, output optimisation, vendor assets and
    state capture, auditing, operations and interfaces. No runtime behaviour changed.

Full changelog: https://github.com/sayakmukherjee080/snappy-prerender/blob/main/CHANGELOG.md

v2.11.3

Choose a tag to compare

@sayakmukherjee080 sayakmukherjee080 released this 07 Nov 23:05

Added

  • Incremental prerendering with incremental: true (revalidate), incremental: 'trust'
    and incremental: false. Unchanged routes are restored from a persistent cache instead
    of being rendered again.
  • Per-route dependency fingerprints for source HTML, referenced JS/CSS, local asset
    existence, output configuration and the written page hash. Cached HTML lives outside
    dist, so a normal Vite, CRA or static build can replace the output directory without
    losing reusable pages.
  • API response revalidation for recorded GET/HEAD requests. Shared endpoints are
    deduplicated, ETag/Last-Modified conditional requests are used when available, and
    a changed body hash renders only the routes that depend on it. Requests with
    Authorization, non-GET methods, oversized bodies, streaming, or failed responses are
    never replayed and always render.
  • incremental.cachePath, incremental.maxAge, incremental.lockTimeout,
    incremental.exclude, incremental.data.hosts, incremental.data.maxBytes and
    routeOverrides[].incremental.
  • A cache lock beside the cache file stops two builds from writing or pruning the same
    cache at once. The default fails fast with the owning pid; incremental.lockTimeout
    waits for a bounded time, and a lock left by a dead process is reclaimed.
  • Cache maintenance now prunes unreferenced root HTML pages, generated state and SEO
    scripts, and vendored assets and manifests, so removed routes and changed assets do
    not accumulate in the cache directory.
  • A capped crawl (maxRoutes) writes the accepted routes to the incremental cache
    instead of discarding the whole cache entry, so route priority and cache reuse work
    together.
  • Asset localization with vendorAssets: download allowlisted CSS, fonts, images and
    optionally scripts into content-hashed snappy-assets/ files and rewrite HTML, CSS
    @import, url(), srcset, style attributes and inline <style> references.
  • vendorAssets.hosts, vendorAssets.types, vendorAssets.maxBytes,
    vendorAssets.onError (warn/fail) and vendorAssets.failOnExternalAssets.
  • Vendored asset source hashes participate in incremental revalidation. Local vendor
    files, generated state scripts and SEO locale scripts are cached and restored.
  • CLI flags for incremental caching, data revalidation limits, asset localization and
    the self-contained asset gate.

Changed

  • preloadLinks now reads script hints from the final document and merges them with
    runtime-loaded chunks, so localized and dynamically imported scripts both get hints.
  • Verification skips cached routes and records whether a route was verified; intentionally
    skipped hydration routes remain reusable.

Fixed

  • Routes whose vendor download failed under vendorAssets.onError: 'warn' are not written
    to the incremental cache, so the next build retries the download instead of reusing a
    page with an external asset.
  • inlineCss: 'inline' no longer fetches cross-origin stylesheets during the render pass,
    which previously made the route uncacheable and left the localized CSS as a link. Local
    snappy-assets/ stylesheets, including localized @import rules, are inlined after
    asset localization.
  • Concurrent routes that reference the same vendored asset now share one in-flight write
    instead of racing on the same temporary file.

Security

  • Vendor downloads enforce the host allowlist, redirect re-checks, private-host rejection
    unless explicitly allowlisted, TLS validation, per-asset byte limits and content-type
    checks. A response whose content type does not match the requested CSS, script, font or
    image kind is refused instead of being written as a local asset. API response bodies and
    credentials are never written to the cache.

Full changelog: https://github.com/sayakmukherjee080/snappy-prerender/blob/main/CHANGELOG.md

v2.11.1

Choose a tag to compare

@sayakmukherjee080 sayakmukherjee080 released this 06 Nov 10:24

Added

  • drift, baselinePath and failOnDrift store a per-route baseline and report added,
    removed, moved, changed, HTML-only and status-changed routes.
  • htmlHash for the exact written file and contentHash for a normalized fingerprint of
    visible text, SEO metadata, links, images and JSON-LD. Ordinary script and style changes
    do not count as content drift.
  • report.drift with per-route driftStatus and driftReasons, plus a baseline schema in
    docs/report.md. The JSON report version is now 2.
  • sitemapLastmod adds <lastmod> from the baseline. New and content-changed routes get the
    build date; unchanged and HTML-only routes keep their previous date.
  • CLI flags --drift, --baseline, --fail-on-drift, --fail-on-drift-status and
    --sitemap-lastmod.

Changed

  • Baselines are written only after a complete, non-dry run. Incomplete builds and failed
    failOnDrift runs keep the old baseline and preserve previous sitemap dates.
  • A baseline is kept outside the output directory by default so cleanDestination cannot
    delete it.

Fixed

  • Sitemap lastmod uses the real build start instead of freezeTime, so a fixed content
    clock no longer prevents deployment dates from advancing.
  • A failed failOnDrift run keeps the previous baseline, so the next run still compares
    against the last accepted build.

Full changelog: https://github.com/sayakmukherjee080/snappy-prerender/blob/main/CHANGELOG.md

v2.8.1

Choose a tag to compare

@sayakmukherjee080 sayakmukherjee080 released this 31 Oct 07:31

Changed

  • README now includes the Product Hunt launch badge. No runtime behaviour changed.

v2.8.0

Choose a tag to compare

@sayakmukherjee080 sayakmukherjee080 released this 31 Oct 04:08

Added

  • freezeTime, timezone and randomSeed make Date/Date.now() and optional
    Math.random() deterministic across render and verification. SOURCE_DATE_EPOCH is
    honoured, and pages can read window.__SNAPPY_NOW__ / window.__SNAPPY_NOW_ISO__.
  • hydration.allowRerender and hydration.skip, plus routeOverrides[].hydration, let
    explicitly dynamic routes re-render without being reported as failures.
  • locales adds path or single locale modes with automatic <html lang>, canonical,
    og:locale, og:locale:alternate, self/alternate/x-default hreflang, sitemap
    alternates, translated route maps and hreflang audit rules.
  • seoLocale seeds a cookie or localStorage locale before render and verification, and
    optionally writes a pre-app bootstrap into the output. It supports localStorage, cookie
    or both, overwrite, navigator, forceHtmlLang, route scoping, CSP hash and strict
    externalization.
  • CLI flags for the clock, hydration policies, simple locale matrices and SEO locale.
  • Report fields for the fixed clock, locale counts, per-route locale, hydration policy,
    allowed re-renders, ignored hydration errors and generated locale scripts.
  • Head accepts tags for arbitrary script, style, noscript and base elements,
    with attribute objects, text, trusted noscript HTML and explicit keys.
  • Head accepts htmlAttributes, bodyAttributes and titleAttributes, restoring the
    document's original attributes when no Head wants them.
  • Head accepts defaultTitle, multiple images and multiple alternateLocales; repeated
    same-name extra metas can opt into duplicates. These replace the client-side surface of
    React Helmet and React Helmet Async.
  • Head accepts onChangeClientState for observing added, removed and changed entries
    after real DOM updates.
  • React 19 native <meta> and <link> tags are adopted and updated instead of
    duplicated. A correct native <title> is left to React so navigation can remove it, while
    older template titles are removed.
  • The head entry documents HeadProps, HeadTag, HeadAttributes and HeadChange with
    JSDoc types; the package remains plain JavaScript and adds no TypeScript files.

Changed

  • Final HTML processing uses one parsed document for preload injection, CSP hashes,
    page metadata and preload resources instead of reparsing after each step.
  • Render and verification use fewer Playwright round trips.
  • Route writes, audit link checks, destination copies and sitemap-index fetches run with
    bounded concurrency; route reports are merged in deterministic order.
  • Preload hints are sorted, so repeated builds do not reorder modulepreload links.
  • Inline stylesheet text and critical CSS processor state are cached within a run.
  • Relative route-source loading and browser/server startup overlap where safe.
  • The JSON report includes phase timings, and npm run benchmark measures large sites.
  • reuseVerificationContext optionally reuses one browser context per verification worker.
  • A not-found page's generated noindex replaces an existing robots directive instead of
    adding a second meta tag.

v2.7.0

Choose a tag to compare

@sayakmukherjee080 sayakmukherjee080 released this 31 Oct 04:08

Added

  • Site audit for route health, links, metadata, sitemap and CSP. Findings are report-only
    unless failOnAuditError is set; auditIgnoreLinks excludes dynamic links.
  • reportPath / --report writes a versioned JSON report with per-route records, audit,
    verification, sitemap, preload manifest, truncation and traces.
  • routesFile and routesFromSitemap seed routes from text, JSON or a sitemap. Sitemap
    indexes are followed one level, and relative paths resolve against the config file.
  • Deterministic BFS crawling when maxRoutes or routePriority is set.
    truncated.droppedRoutes lists the routes that did not fit.
  • routeOverrides for per-route timeout, wait, readiness, crawl and storage state.
  • transformHtml, sync or async, runs before preload and CSP injection.
  • Framework detection for React, Vue, Svelte and Preact, with framework-specific hydration
    messages and firstMismatch details.
  • preloadLinks for runtime chunks, fonts and the LCP image.
  • Sitemap hreflang alternates, image entries and sitemap.locs in the report.
  • Head JSON-LD, lang/dir and hreflang alternates.
  • App-declared 404 pages via <meta name="prerender-status-code" content="404">.
  • csp: 'hash' adds a meta policy with SHA-256 hashes for inline scripts and styles.
  • retries, retryDelay and traceOnError for failed renders.
  • init migration for a legacy reactSnap block.
  • CLI flags and documentation for the new options.

Changed

  • Verification reports the detected framework and uses its hydration message patterns.
  • SVG <title> elements are no longer counted as page titles.
  • Page metadata, audit findings and sitemap entries use the final HTML after transform and
    preload injection.
  • Route sources resolve relative paths against the config file. Sitemap base and origin
    handling is stricter.
  • The JSON report includes the verification summary, uses crawl acceptance order for
    order, and redacts credentials, query strings and the storage-state path.

Fixed

  • A configured notFoundRoute may return HTTP 404 and is still written as 404.html;
    verification accepts that status for the same route.
  • An explicit framework selects its hydration message patterns during verification.
  • A non-string transformHtml result fails that route with a clear error.
  • routeOverrides ignores undefined values instead of clearing base settings.
  • audit.linksChecked counts every link pair considered, and route-health findings are
    included in the audit.
  • preloadLinks does not preload scripts removed by removeScriptTags or transformHtml.
  • CSP hash mode warns when the generated policy blocks a browser request.
  • init normalises a single-string reactSnap.include.
  • The image sitemap collects srcset and <picture><source> candidates.
  • New no-op option combinations produce configuration warnings.