SwoffSwoff

Changelog

Release history for Swoff.

Changelog

All releases are tracked on GitHub. View the full release history →


@swoff/cli@0.4.7 (2026-07-08)

  • fix: versioned precache cache name precache-{hash} — cache only wiped when asset list hash changes, no empty window between old and new SW
  • fix: TDZ crash (Cannot access 'ASSETS_TO_CACHE' before initialization) — hoist declarations before background precache section
  • fix: HTTP errors (404, 5xx) now advance checkpoint; network errors (offline, timeout) keep checkpoint for retry — fetch() + cache.put() replaces cache.add()
  • fix: legacy unversioned "precache" cache cleaned up on activation alongside versioned precache-*
  • fix: add RESUME_PRECACHE listeners (visibilitychange + online) to IIFE client-injector bundle (was ESM-only)
  • refactor: move precaching design rationale from guides to architecture docs
  • feat: replace navCacheOnly config with strategy.patterns + "network-only" — reuse existing mechanism for Tier 2/3 co-existence

@swoff/cli@0.4.6 (2026-07-06)

  • refactor: eliminate duplicated feature-section logic in swoff-api-bundle by using stripModuleWrappers() to embed runtime generators directly (958 lines removed, 71 added)
  • refactor: extract shared sw-build-utils.mjs to eliminate duplicated asset-scanning logic between CLI generator and no-bundler template
  • refactor: content-type-aware fallback dispatch — only navigation requests get HTML fallback chain; images, scripts, API calls (etc.) return 502 instead of incorrectly serving HTML
  • refactor: SSR-only pushState prefetch for SPA navigation
  • feat: remove build.swFilename config option, hardcode swoff.sw.js as the service worker filename
  • feat: wipe precache cache in ensurePrecacheVersion during SW activation instead of in activation handler
  • fix: auto-enable feature dependencies (auth, push-notifications, pwa, mutation-queue) in buildMinimalConfig
  • fix: inline prefetchCache utility and gate message handlers on feature flags to avoid unused code in bundles
  • fix: warn when irrelevant flags are passed to CLI commands (--framework on generate, --yes on validate, etc.)
  • fix: remove dead defaultInitConfig export

@swoff/cli@0.4.5 (2026-07-04)

  • fix: strip redirected flag from cached responses returned by fallback() to prevent browser rejecting event.respondWith() with a NetworkError
  • feat: add precacheDirs defaults for vue, svelte, sveltekit init presets
  • feat: rename react-spareact framework name (backward-compat alias kept for existing configs)
  • feat: add vike framework detection and init preset (SSR, dist/client output, Vue adapters)
  • docs: add advanced precaching guide with checkpoint resume, progress, reset design
  • docs: add missing build config page and fix precaching cross-links
  • docs: move real-time (SSE/WS) comparison from GraphQL to Caching & Data Fetching
  • docs: add cross-query GQL invalidation docs with honest tradeoff comparison vs normalized caches
  • chore: consolidate all changelogs into root CHANGELOG.md (single source)

@swoff/cli@0.4.4 (2026-07-04)

  • feat: Vue adapters — 14 composable templates (TS + JS) for Vue, Nuxt, Quasar, VitePress
  • feat: Svelte adapters — 14 store templates (TS + JS) for Svelte and SvelteKit
  • feat: rename all React adapters use*useSwoff* to avoid naming conflicts
  • feat: add Quasar, VitePress to auto-detected frameworks
  • feat: adapter generator supports .ts/.js templates (no JSX required)
  • feat: remove status from usePrecacheProgress — only progress remains
  • feat: make storage threshold configurable via features.serviceWorker.strategy.storageThreshold (default 80%)
  • feat: auto-strip X-SW-* headers in SW fetch handler to prevent leaking to external servers
  • fix: use op-name derived tags for GQL mutation invalidation instead of URL-based tags (cross-query entity updates still need explicit tags)
  • chore: consolidate all changelogs into root CHANGELOG.md (single source)

@swoff/cli@0.4.3 (2026-07-02)

  • feat: expand framework detection to 10 new frontend frameworks (Qwik, Preact, Angular, Solid, Lit, Alpine, Marko, Stimulus, jQuery, HTMX)
  • feat: start precaching immediately on SW activation instead of waiting for first fetch
  • fix: remove / _serverFn/*=network-only from tanstack-start-react preset
  • fix: expand react-spa detection to cover react-router, @tanstack/react-location, wouter, @reach/router
  • fix: no-bundler backend flavors default to navMode "default" instead of "ssr"

@swoff/cli@0.4.1 (2026-07-02)

  • feat: reliable precaching with asset version tracking and fetch-based resume
  • fix: batchFailed flag prevents checkpoint advance on partial failures
  • fix: wrap background precache in event.waitUntil to prevent SW termination

@swoff/cli@0.4.0 (2026-07-01)

  • refactor: rename config.build.outputDir to swOutput, add swoffPath field
  • refactor: change SW generator extension from .js to .mjs
  • feat: add CACHE_NAME placeholder to no-bundler SW template (fixes ReferenceError)
  • feat: add excludeDirs/excludeFiles to PrecacheDirConfig for fine-grained precache control
  • feat: add build.swUrl to allow custom service worker registration URL

@swoff/cli@0.3.15 (2026-06-29)

  • ci: automate npm publishing via GitHub Actions with Trusted Publisher

@swoff/cli@0.3.14 (2026-06-22)

  • Fixed laravel and django framework detection
  • Added tanstack-start-react framework preset
  • Schema validation improvements

@swoff/cli@0.3.13 (2026-06-04)

  • Initial public release
  • Core features: service worker generation, 6 caching strategies, auth adapters, mutation queue, GraphQL, tag invalidation, server push, push notifications
  • @swoff/assets PWA icon generator
  • Framework adapters (React hooks)

@swoff/assets@0.1.2 (2026-06-29)

  • ci: automate npm publishing via GitHub Actions with Trusted Publisher

On this page