Coralite v0.38.6 Released

Coralite v0.38.6 has been released. This update resolves a key issue with imperatively created components, ensuring that getters referenced as template tokens render correctly instead of rendering as empty strings. It also introduces several stability enhancements to component metadata extraction and attribute parsing.

Fixing Imperative Getters as Template Tokens #

In previous versions, getters utilized as template tokens within imperatively initialized components could fail to resolve, resulting in empty strings. To fix this, we have enhanced the metadata extraction pipeline:

The following example displays a component definition using getters that now resolve correctly as template tokens:

javascript
Code copied!
  import { defineComponent } from 'coralite';
  
  export default defineComponent({
    properties: {
      firstName: String,
      lastName: String
    },
    getters: {
      fullName() {
        return `${this.firstName} ${this.lastName}`;
      }
    },
    template: `<div>Welcome, {{ fullName }}!</div>`
  });

Attribute Parsing Improvements #

We corrected attribute parsing in createComponentDefinition to properly support shorthand type definitions. This adjustment prevents unexpected crashes during base evaluation when processing component definitions with shorthand attributes.

The changes have been thoroughly validated with new end-to-end (E2E) test cases and verified via visual screenshot assertions.

How to Upgrade #

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

bash
Code copied!
  npm install coralite@0.38.6
bash
Code copied!
  npm install coralite-scripts@0.38.6

Related posts

More blog posts

Start Building with Coralite!

Use the scaffolding script to get jump started into your next project with Coralite

Copied commandline!