Coralite v0.36.3 Released
Coralite v0.36.3 is now available. This release centers on standardizing the plugin execution lifecycle with explicit context objects, improving developer ergonomics via cleaner JSDoc type definitions, resolving path alias issues for IDEs, and updating the installation documentation.
Standardized Plugin Hook Contexts #
To improve predictability and maintainability across plugins, the framework has standardized server-side plugin hooks. Calls to _triggerPluginHook now wrap payloads for component and page deletion in consistent context objects (specifically, { component } and { data } structures) rather than emitting raw parameters. Additionally, app instance injection has been standardized inside _triggerPluginAggregateHook, making the active Coralite instance reliably accessible across all server-side hook invocations.
import { definePlugin } from 'coralite';
export default definePlugin({
name: 'example-plugin',
build(context) {
const { app, options } = context;
// 'app' instance is consistently available across server-side hooks
app.logger.info('Building application with configured options');
}
});
Refined Type Definitions and IDE Resolution #
Developer tooling has been enhanced in this release. JSDocs in types/plugin.js have been updated to use dedicated context objects for all server-side hooks. Type definitions now use flat intersection types (such as CoraliteModule & CoraliteApp) to accurately mirror the runtime behavior where initial data is spread and the app instance is added. Furthermore, legacy imports using the #lib path alias have been replaced with relative paths inside type files, resolving outstanding IDE auto-import and type-checking issues.
Manual Installation Documentation #
The manual installation instructions in the README have been updated to align with the latest modular structure. This ensures a clean and standardized workflow for developers configuring Coralite manually without automated generators.
Breaking Changes #
- Hook Payloads: Payloads for component and page deletion hooks are now wrapped inside structured context objects (
{ component }and{ data }) instead of being passed as raw values. - Legacy API Rename: The legacy
compilehook has been renamed tobuild. The library references, types, and definitions have been fully synchronized with current signatures. Custom plugins usingcompilemust transition tobuild.
How to Upgrade #
To upgrade to the latest version, update your project dependencies:
npm install coralite@0.36.3
npm install coralite-scripts@0.36.3
