This repository was archived by the owner on Jun 9, 2026. It is now read-only.
0.8.0
What's Changed
Features
-
Added framework-neutral HTTP session support in
@arkstack/http.@arkstack/http/setupregisters the Clear Router session plugin.- Route contexts now receive
session,httpSession, anderrors. - Existing non-HTTP
sessionvalues are preserved, with Arkstack’s session available ashttpSession. - Sessions support data storage plus a built-in error bag for validation and general form/request errors.
-
Added Kanun validation integration for HTTP sessions.
@arkstack/http/setupregisterskanunSessionPlugin.- Failed Kanun validators automatically fill the current request session error bag.
- Full Kanun validators, message bags, and validation exceptions normalize into session errors.
-
Added view-level session/error support.
- Views now always receive a safe
errorsobject. - Added
ViewErrorBagwith Laravel/Kanun-style helpers:first,get,has,hasAny,missing,all,keys,count,toArray, andgetMessages. - Added request-scoped view data so
session,httpSession, anderrorscan flow into Edge views.
- Views now always receive a safe
-
Added Clear Router view setup integration.
- New
@arkstack/view/setupentry. - New
clearRouterViewPluginreads request locals and exposes request session state to views rendered during the request.
- New
Fixes
- Prevented Kanun validation hooks from throwing when validation runs outside an active HTTP request session.
- Improved recursive message-bag normalization for Kanun-style
errors(),getMessages(),messagesRaw(),toArray(), andgetMessageBag()sources. - Preserved existing non-HTTP
sessioncontext values while exposing Arkstack’s HTTP session ashttpSession.
Package Updates
- Added
kanunas a peer dependency for@arkstack/http. - Added optional
clear-routerpeer dependency for@arkstack/view. - Updated Kanun peer ranges to
^1.2.0. - Updated template dependencies for
kanunand@kanun-hq/plugin-file.
Documentation
- Documented HTTP sessions, session errors, and Kanun validation integration.
- Documented view error usage and session-backed errors in Edge templates.
Tests
- Added regression tests for:
- HTTP session context binding.
- Session data and error bag behavior.
- Kanun validator normalization into session errors.
- Automatic session filling when Kanun validation fails.
- Kanun validation outside a request session.
- View-safe
errorshandling. - Request-scoped session/errors flowing into views.
Full Changelog: 0.7.20...0.8.0