Changelog
All notable changes to Bosia are documented in this file.
The format is based on Keep a Changelog.
[0.1.1] - 2026-03-26
Section titled “[0.1.1] - 2026-03-26”- Component registry — 9 Svelte 5 UI components (avatar, badge, button, card, data-table, dropdown-menu, icon, input, separator) in
registry/components/ bosia add --localflag for installing components from the local registry during developmentbosia addnow auto-createssrc/lib/utils.ts(cn utility) if it doesn’t exist- Components documentation page with usage examples and prop tables for all 9 components
[0.1.0] - 2026-03-26
Section titled “[0.1.0] - 2026-03-26”Changed
Section titled “Changed”- Rename framework from
bosbuntobosia— package name, CLI binary, virtual modules (bosia:routes), generated directory (.bosia/), internal endpoints (/__bosia/), window globals (__BOSIA_*), CSS classes, data attributes, documentation site, and all references bosia createtemplate picker now uses arrow-key selection instead of typed input (powered by@clack/prompts)
[0.0.8] - 2026-03-26
Section titled “[0.0.8] - 2026-03-26”Changed
Section titled “Changed”- Rename
bosbun:envvirtual module to$env— SvelteKit-style import path (import { VAR } from "$env")
- Dev server auto-restart — app process is automatically restarted when it crashes unexpectedly; stops after 3 rapid crashes within 5s to prevent crash loops
- Documentation site built with Astro Starlight — 14 pages covering getting started, routing, server loaders, API routes, form actions, middleware hooks, environment variables, styling, security, CLI reference, API reference, deployment, and SvelteKit differences
- GitHub Actions workflow for auto-deploying docs to GitHub Pages on push to
main - Indonesian (Bahasa Indonesia) documentation — full translation of all 15 doc pages with Starlight i18n, language switcher, and
/id/URL prefix
Removed
Section titled “Removed”- Remove unused
renderSSRfunction fromrenderer.ts(fully replaced byrenderSSRStream) - Remove unused
buildHtmlShellfunction and_shellcache fromhtml.ts - Remove dead
buildHtmlShellimport fromrenderer.ts - Un-export
STATIC_EXTS,DEFAULT_CSRF_CONFIG, andmatchPattern— internal-only, not part of public API
Changed
Section titled “Changed”- Use
splitCsvEnvhelper for CSRF/CORS origin parsing inserver.ts— eliminates duplicate.split(",").map().filter()pattern
- Route PUT/PATCH/DELETE through
handleRequest()— these methods now get CSRF, CORS, security headers, cookie handling, and user hooks applied consistently (previously returned bare 404 responses) - Fix
withTimeouttimer leak —setTimeoutis now cleared via.finally()when the main promise resolves, preventing dangling timers under load - Remove duplicate static file serving — removed
@elysiajs/staticplugin; all static files now served throughresolve()with consistent path traversal protection, CSRF, CORS, security headers, and user hooks - Fix
_shellOpenand_shellcaching in dev — hoistcacheBustto module level so it’s computed once at startup (stable within a process, fresh after dev server restart on rebuild) - Fix client-side navigation with query strings/hashes —
currentRoutenow initialized with full path (including search + hash) for consistent deduplication;findMatchin bothrouter.navigate()andApp.sveltenow receives only the pathname, so query-driven patterns like pagination work via client-side navigation instead of falling back to full page reloads
[0.0.7] - 2026-03-25
Section titled “[0.0.7] - 2026-03-25”- Multi-template support for
bosbun create: interactive template picker when no--templateflag is given; includesdefault(minimal starter) anddemo(full-featured with hooks, API routes, blog, form actions, catch-all routes) - GitHub Actions workflow for auto-publishing to npm on push to
main— only publishes whenpackage.jsonversion is greater than the currently published version; prereleases tagged asnext, stable aslatest
Updated
Section titled “Updated”- Package description and README to better reflect the framework’s identity — emphasizes file-based routing, no Node.js/Vite/adapters philosophy, and full feature set
Changed
Section titled “Changed”- Replaced 🐰 emoji branding with new block-style SVG logo across all UI templates, CLI output, and favicon; favicon now served as
/favicon.svginstead of blankdata:,URI
bosbun createnow pins bosbun to the current version (^x.y.z) instead of*, ensuring new projects use the same version as the CLI that created them- Tailwind CSS binary resolution: handle bun’s flat dependency hoisting —
tailwindcssbinary is now found whether deps are nested (node_modules/bosbun/node_modules/) or hoisted (node_modules/); same fix applied toNODE_PATHin dev, build, start, and prerender - Client hydration crash (“Cannot read properties of undefined (reading ‘call’)”): when bosbun is installed via npm (not workspace symlink),
hydrate.tsresolved"svelte"from the framework’s location while compiled components resolved"svelte/internal/client"from the app’snode_modules— two separate Svelte runtime copies with independent hydration state; fixed by forcing allsvelteimports to resolve from the app’s directory viaonResolvein the build plugin NODE_PATHresolution for Tailwind CSS: hoistednode_modulespath was incorrectly included in workspace setups, confusing the Tailwind CLI resolver; now only adds the parentnode_modulestoNODE_PATHwhen bosbun is actually installed as a dependency (detected vianode_modules/bosbun/path)
[0.0.6] - 2026-03-25
Section titled “[0.0.6] - 2026-03-25”Changed
Section titled “Changed”- Renamed framework from
buniatobosbun— package name, CLI binary, virtual modules (bosbun:routes,bosbun:env), generated directory (.bosbun/), internal endpoints (/__bosbun/), window globals (__BOSBUN_*), CSS classes, and all documentation
[0.0.5] - 2026-03-24
Section titled “[0.0.5] - 2026-03-24”- Link prefetching:
data-bosbun-preload="hover"prefetches on mouseenter,data-bosbun-preload="viewport"prefetches when link scrolls into view; attribute can be placed on ancestor elements (e.g.<nav>) to apply to all links inside; 5s TTL cache eliminates the network request on click
[0.0.4] - 2026-03-23
Section titled “[0.0.4] - 2026-03-23”- Request timeouts:
LOAD_TIMEOUT(default 5s) andMETADATA_TIMEOUT(default 3s) env vars abort slowload()andmetadata()functions; set to0orInfinityto disable - Prerender fetch timeout:
PRERENDER_TIMEOUTenv var (default 5s) aborts slow route fetches during build — prevents infinite build hangs
- Security:
PUBLIC_*env vars injected into client HTML are now scoped to keys declared in.envfiles only — system env vars that happen to start withPUBLIC_are no longer leaked to the browser - Streaming SSR: metadata errors now return proper error responses (correct status codes) instead of broken partial HTML; post-stream errors produce valid HTML structure; XSS-safe error message encoding via
safeJsonStringify safeJsonStringifyno longer crashes on circular references — falls back tonullwith a console error- Security: path traversal protection on all static file serving (
/public,/dist/client, prerendered pages) — resolved paths are validated to stay within allowed directories - Cookie parsing no longer crashes on malformed percent-encoding (e.g.
%ZZ) — falls back to raw value - Cookie
set()now validatesdomainandpath(rejects;,\r,\n) and whitelistssameSitetoStrict/Lax/None— prevents header injection
Changed
Section titled “Changed”- Route matching: routes are now sorted by priority at build time (exact → dynamic → catch-all, then segment depth);
findMatch()does a single pass instead of 3 passes — O(n) best-case with early exit
[0.0.3] - 2026-03-21
Section titled “[0.0.3] - 2026-03-21”- Streaming SSR metadata:
metadata()export in+page.server.tssends<title>,<meta>tags in the initial HTML head beforeload()completes; 3-chunk streaming flow (head open → metadata + spinner → rendered content);MetadataEventandMetadatatypes exported frombosbun; SEO-friendly — crawlers see metadata without JS execution;metadata()can returndataobject that gets passed toload()viaevent.metadatato avoid duplicate queries - Form actions (SvelteKit-style):
actionsexport in+page.server.tsfor handling form POST submissions;fail()helper andActionFailureclass for returning validation errors;ActionDatatype auto-generated in$types.d.ts;formprop passed to page components; named actions viaaction="?/name"attribute; re-runsload()after action; proper status codes (400 for failures, 200 for success, 303 for redirects)
[0.0.2] - 2026-03-20
Section titled “[0.0.2] - 2026-03-20”.envfile support withbosbun:envvirtual module: prefix-based classification (PUBLIC_STATIC_*,PUBLIC_*,STATIC_*, private); load order.env→.env.local→.env.[mode]→.env.[mode].local; build-time codegen of.bosbun/env.server.ts,.bosbun/env.client.ts,.bosbun/types/env.d.ts;window.__BOSBUN_ENV__injected at SSR for dynamic public vars; CLI loads env before spawning subprocesses- Graceful shutdown: SIGTERM/SIGINT handlers call
app.stop()thenprocess.exit(0); force-exit after 10s if stop hangs - Request body size limits:
BODY_SIZE_LIMITenv var (512K,1M,Infinity, or bytes); defaults to512K; wired into Elysia/Bun server config for 413 enforcement before handlers run - CSRF protection: Origin/Referer header validation on all non-safe requests (POST/PUT/PATCH/DELETE); blocked requests return 403 with a descriptive message; exports
CsrfConfigtype frombosbun - CORS configuration:
CORS_ALLOWED_ORIGINSenv var (comma-separated);getCorsHeaders()addsAccess-Control-Allow-Origin+Vary: Originfor matching origins; OPTIONS preflight returns 204 withAccess-Control-Allow-Methods/Headers/Max-Age; exportsCorsConfigtype frombosbun - Strip stack traces in production:
handleRequestwrapped in try/catch; Elysia.onError()safety net; allconsole.errorcalls log full error in dev and message-only in prod
Removed
Section titled “Removed”- Duplicate
PageLoadEventandLayoutLoadEventinterfaces from templateapp.d.ts; useimport type { LoadEvent } from "bosbun"instead
- XSS: escape
<,>,&, U+2028, U+2029 in JSON embedded in SSR<script>tags (safeJsonStringify) - SSRF: validate
pathquery param on/__bosbun/data— reject non-root-relative paths, double-slash URLs, and traversal sequences
[0.0.1] - 2026-03-19
Section titled “[0.0.1] - 2026-03-19”Core Framework
Section titled “Core Framework”- SSR + Svelte 5 Runes — Server-side rendering with full Svelte 5 Runes support (
$props,$state, etc.) - File-based routing — Automatic route discovery via
src/routes/directory structure (+page.svelte,+page.server.ts,+layout.svelte,+layout.server.ts,+server.ts) - Dynamic routes —
[param]segments with typed params - Catch-all routes —
[...catchall]segments for wildcard matching - Route groups —
(group)directory syntax for layout grouping without URL segments - API routes —
+server.tsfiles for REST endpoints (GET, POST, etc.) - Error pages —
+error.sveltefor custom error handling with HTTP status codes
Data Loading
Section titled “Data Loading”load()function — Plainexport async function load({ params, cookies })pattern (no wrapper needed)$typescodegen — Auto-generated.bosbun/types/src/routes/**/$types.d.tsper route directoryPageData,PagePropsfor pagesLayoutData,LayoutPropsfor layoutsimport type { PageData } from './$types'resolves transparently viatsconfig.jsonrootDirs
Server
Section titled “Server”- ElysiaJS server — Runs on port 3001 (dev) / 3000 (prod)
- Gzip compression — Automatic response compression
- Static file caching — Cache-Control headers for assets
/_healthendpoint — Returns{ status: "ok", timestamp }for health checks- Cookie support —
Cookiesinterface onRequestEventandLoadEventcookies.get(name)/cookies.set(name, value, options)/cookies.delete(name)Set-Cookieheaders applied automatically in response
Client
Section titled “Client”- Client-side hydration — Full hydration of SSR-rendered pages
- Client-side router — SPA navigation without full page reloads
- Navigation progress bar — Visual loading indicator during page transitions
- HMR — Hot module replacement in development
- CSR opt-out — Per-page option to disable client-side rendering (
export const csr = false)
- Bun build pipeline — Fast bundling via Bun with Svelte plugin
- Client bundle — Output to
dist/client/ - Server bundle — Output to
dist/server/index.js - Manifest —
dist/manifest.jsonfor route/asset mapping - Static prerendering — Opt-in prerendering of routes at build time (
export const prerender = true) - Tailwind CSS v4 — Integrated via
@tailwindcss/cli $libalias —$lib/*maps tosrc/lib/*bosbun:routesvirtual module — Auto-generated route registry at build time
bosbun dev— Start dev server with file watching and HMRbosbun build— Production buildbosbun start— Start production server fromdist/server/index.jsbosbun create— Scaffold a new project from the default template
hooks.server.ts—Handlemiddleware interface withsequence()helperRequestEvent—request,params,url,cookies,localsLoadEvent—params,url,cookies,locals
Developer Experience
Section titled “Developer Experience”- Default project template —
packages/bosbun/templates/default/forbosbun create - Dockerfile — Multi-stage Docker build for the demo app
- TypeScript — Full type coverage;
tsconfig.jsonauto-patched on first build - README — Monorepo, framework, demo app, and template READMEs
[0.0.0] - 2026-03-19
Section titled “[0.0.0] - 2026-03-19”- Initial framework scaffolding:
matcher.ts,scanner.ts,types.ts - Core SSR server (
server.ts) and client router (App.svelte,router.svelte.ts) - Client-side hydration with HMR support (
hydrate.ts) - Dev server with proxy and file watcher (
dev.ts) - CLI entry point with
dev,build,start,createcommands - Demo application (
apps/demo/)