Coralite v0.37.1 Released
Coralite v0.37.1 is now available, bringing key stability improvements to the development server and the asset pipeline. This release focuses on addressing cache consistency during hot module replacement (HMR) and enhancing the robustness of filesystem operations within the static asset plugin.
Reliable Script Caching on Component Changes #
To ensure developer updates are instantly and reliably rendered, we have introduced a cache invalidation mechanism in the development server. The renderer now implements a clearCache method to purge compiled scripts, which is also exposed directly on the Coralite instance. Under the hood, coralite-scripts has been updated to trigger this cache clearing during HMR. Additionally, we have converted outputFiles on the Coralite instance to a getter to improve consistency across component recompilations.
// Programmatically clearing the script cache on a Coralite instance
instance.clearCache();
// Consistent access to compiled outputs via the getter
const files = instance.outputFiles;
Robust Filesystem Operations in staticAssetPlugin #
The static asset plugin has been updated with several reliability fixes to handle parallel filesystems operations safely:
- In-flight promise tracking: Serializes concurrent file copy operations to prevent race conditions.
- Incremental build optimization: Compares file timestamps using floor-rounded values (
Math.floor(mtimeMs)) for stable comparison. - Deep change detection: Disables incremental skipping for directories to ensure nested changes are captured.
- Safety warnings: Added warnings for destination file collisions and missing source files.
- Timestamp preservation: Ensures target files retain the original source modification times.
How to Upgrade #
To upgrade to the latest version, update your project dependencies:
npm install coralite@0.37.1
npm install coralite-scripts@0.37.1
