Coralite v0.26.0 Released
I am excited to announce the release of Coralite v0.26.0! This update brings an important architectural shift by renaming the script plugin to client and moving its setup process directly into the frontend bundle.
Client Plugins & Bundle Setup #
This release introduces a significant refactor to how scripts are handled. We have renamed the script configuration to client in createPlugin. Additionally, the client.setup execution has been moved from the server-side ScriptManager.prototype.use to the frontend bundle.
By bundling client.setup into the frontend output, it now executes globally during initialization, and its result is deeply merged into context.values. This simplifies the execution flow and improves consistency between the server and the client environment.
Breaking Changes #
Due to the architectural improvements mentioned above, there are a few breaking changes to be aware of when upgrading to v0.26.0:
- Renamed `script` to `client`: The `script` property in `createPlugin` has been renamed to `client`. You will need to update your plugin configurations to use the new name.
- Server-side Execution Removed: Server-side execution of `client.setup` in `ScriptManager.prototype.use` has been completely removed.
- Bundled Execution: `ScriptManager.prototype.compileAllInstances` now bundles `client.setup` into the frontend output. Ensure any setup logic is compatible with the client environment.
Code Refactoring #
Alongside the main architectural changes, we've also cleaned up some types and tests:
- Migrated from script to client config in the `test-script-plugin`.
- Renamed the `IgnoreByAttribute` type to simply `Attribute`, streamlining our type definitions.
How to Upgrade #
To upgrade to the latest version, update your project dependencies:
npm install coralite@0.26.0
npm install coralite-scripts@0.26.0
