Hasty Briefsbeta

Bilingual

Primate 0.40: Route pages, store enums, async schemas and events

a day ago
  • #Release
  • #Primate
  • #Web Framework
  • Primate 0.40 introduces collocated route pages, allowing routes to render frontend files next to them using response.page.
  • Layouts can also be collocated, with layout components receiving props and children from the route.
  • Store enums (p.enum) are now integrated into stores, providing validated, typed enums that store as plain integers.
  • Derived and async schemas are added; .derive transforms parsed values, and p.async supports async post-processing.
  • SSE cleanup is simplified with a single setup function, and an events module (primate/events) enables in-memory keyed subscriptions.
  • App imports now use a single @/* TypeScript alias, replacing previous specific aliases to avoid collisions.
  • HTML templates are moved from pages to templates directory for clarity, separating document templates from route pages.
  • Autoapplying migrations can be enabled in production, eliminating the need to manually run migration commands.