Release

Coralite v0.37.0 Released

Coralite v0.37.0 introduces a Three-Phase Sealed Queue architecture to power Incremental Static Regeneration, integrated client-side refs, a unified Plugin Service Registry, and substantial AST engine performance gains.

TD
Thomas David June 8, 2026

Coralite v0.37.0 has been released. This version focuses on structural maturity and core performance, introducing a strict three-phase build pipeline to support Incremental Static Regeneration (ISR), unified asynchronous plugin dependency resolution, native client-side element references, and major optimizations to AST cloning and server-side rendering.

Three-Phase Build Queue and Incremental Static Regeneration

To support reliable Incremental Static Regeneration (ISR), we have refactored the build pipeline into a strict three-phase system consisting of Staging, Invalidation, and Rendering. By sealing the build queue after Phase 1, we eliminate concurrency deadlocks while permitting virtual page generation via the onBeforeBuild hook. The new invalidation engine uses a two-tier check (file system metadata paired with xxHash64 hashing) to detect modifications and trigger atomic manifest writes, keeping builds safe and fast.

Native Client-Side Refs

The refs plugin has been integrated directly into the Coralite core. The custom ref attribute is now standardized as data-ref, and a native refs(id) helper is provided inside the component script context. This integration improves hydration performance and removes the need for external ref-tracking plugins.

html
Code copied!
  <button data-ref="submit-btn">Submit</button>
  
  <script>
    const btn = refs('submit-btn')
    btn.addEventListener('click', () => {
      // Native ref handler logic
    })
  </script>

Plugin Service Registry & Architecture Refactoring

This release introduces a new Registry class for asynchronous plugin dependency resolution. Plugins now follow a two-phase lifecycle: Phase 1 evaluates global setup and receives the registry, and Phase 2 handles component-level evaluation. To prevent pollution, plugin exports are no longer merged automatically into component contexts and must instead be imported explicitly. Furthermore, the Phase 1 signature has been simplified to accept a single pluginContext argument, using prototype delegation to safely expose configuration.

javascript
Code copied!
  export default {
    server: {
      exports: (pluginContext) => {
        const { app, registry, config } = pluginContext;
        // Parallelized initialization and secure dependency resolution
        return {
          myHelper() {
            return config.mode;
          }
        };
      }
    }
  };

Advanced Visual Error Reporting

Coralite v0.37.0 delivers redesigned error formatting in the terminal. When execution errors occur, the framework leverages Acorn to recover precise source locations (line and column numbers) from VM modules and print the relevant code snippet along with a caret indicator.

text
Code copied!
> components/alert.html:5:10: error: Unexpected token
  3 |   export default {
  4 |     render() {
  5 |       return 
; | ^

Rendering and AST Optimizations

We have implemented several performance improvements to increase local development and build speed. The renderer now parallelizes component rendering across pages and slots using Promise.all. Additionally, circular properties (such as parent, prev, next, and slots) in the AST are now stored as non-enumerable prototype getters and setters. This shift from per-instance property definitions yields a 17x speedup in AST node cloning benchmarks.

Breaking Changes

  • Async Factory Function: The Coralite class has been replaced with the createCoralite() async factory function.
  • Plugin Context Signature: Plugin Phase 1 functions now receive a single pluginContext argument instead of two separate arguments.
  • Refs Attribute: The ref attribute has been renamed to data-ref, and the external refsPlugin has been removed. Use the native refs(id) helper.
  • Virtual Flag: The physical property on HTMLData objects has been replaced by the virtual property, inverting its logic.
  • Component Context Isolation: Plugin exports are no longer automatically merged into component execution contexts, avoiding global state pollution.

How to Upgrade

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

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

Thomas David

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