Release

Coralite v0.38.3 Released

Coralite v0.38.3 aligns tests and documentation with the 'Pages as Consumers' architecture, reorders lifecycle hooks for plugin reactivity, and fixes hydration and incremental sitemap builds.

TD
Thomas David June 21, 2026

Coralite v0.38.3 focuses on reinforcing the framework's core architectural guidelines, specifically surrounding the boundary between pages and components. This release aligns the framework's end-to-end test suite and developer documentation with the "Pages as Consumers" philosophy. Additionally, this version introduces lifecycle hook execution improvements, nested imperative component mounting fixes, and sitemap generation corrections for incremental builds.

Enforcing the 'Pages as Consumers' Architecture

To discourage page-level scripting anti-patterns and ensure robust component boundary isolation, E2E tests and fixtures have undergone a comprehensive audit. Under the "Pages as Consumers" pattern, HTML pages act strictly as consumers of components, and components govern their internal DOM operations:

  • Imperative scripts have been removed from HTML page fixtures, moving execution logic entirely into parent components.
  • Manual DOM queries (such as querySelector and getElementById) within components have been replaced by Coralite's built-in refs system.
  • Playwright E2E tests have been updated to use the namespaced instanceId__refName targeting pattern via getByTestId for robust, scoped queries of component internals.

Lifecycle Hook and Imperative Flow Adjustments

We have refined how lifecycle hooks and imperative HTML insertions are handled within the core rendering cycle:

  • The onBeforeComponentRender hook execution has been moved before attribute mapping. This allows plugins to inject reactive data into the state target prior to mapping.
  • All innerHTML assignments are now wrapped with processHTML to maintain consistent processing in imperative rendering paths.
  • Added new E2E tests specifically covering nested imperative components to guarantee correct mounting and interactivity.

Incremental Build and Hydration Fixes

This release resolves several system issues and improves developer experience:

  • Sitemap Plugin: Modified the sitemap generator to collect pages from the complete app.pages.list collection during the onAfterBuild hook. This ensures pages skipped by the incremental build system are still fully represented in the final sitemap output.
  • Hydration: Corrected the hydration sequence in CoraliteElement to correctly handle attributes overwritten by the server.
  • Typings: Upgraded the CoraliteModuleDefinitions and CoraliteModuleDefinition type definitions to properly support the page object and other complex component state.

Documentation Updates

To support these architectural best practices, our reference documentation has been updated:

  • Updated llms.txt with new anti-patterns concerning the page-component boundary.
  • Added a "Respect the Component Boundary" section to the components guide.
  • Introduced a "Pages as Consumers" section in core concepts.
  • Enhanced the DOM management guide to highlight why direct DOM querying is fragile.
  • Added a philosophy alert to the JavaScript guide advising against page-level scripts.

How to Upgrade

To upgrade to the latest version, update your project dependencies:

bash
Code copied!
  npm install coralite@0.38.3
bash
Code copied!
  npm install coralite-scripts@0.38.3
TD

Thomas David

Creator of Coralite. Writing about the intersection of native web APIs, compiler design, and AI-assisted development.