|
1 | 1 | # Changelog |
2 | 2 |
|
3 | | -## 1.5.0 |
4 | | - |
5 | | -* **BREAKING**: Simplified Engine API - Removed `JsAction`, `JsCallback`, `JsCallbackResult`, and `JsActionResult` enums |
6 | | -* **BREAKING**: Replaced action-based messaging with direct async methods for better developer experience |
7 | | -* **FEATURE**: New direct async methods on `JsEngineCore`: `eval()`, `evaluateModule()`, `declareNewModule()`, `declareNewModules()`, `clearNewModules()`, `getDeclaredModules()`, `isModuleDeclared()`, `call()` |
8 | | -* **FEATURE**: Simplified bridge callback - now uses `Fn(JsValue) -> DartFnFuture<JsResult>` instead of complex enum-based callbacks |
9 | | -* **FEATURE**: Added `initWithoutBridge()` method for engines that don't need Dart bridge communication |
10 | | -* **IMPROVEMENT**: Reduced code complexity by removing the action queue and channel-based messaging |
11 | | -* **IMPROVEMENT**: Better error handling with direct result returns instead of callback-based error propagation |
12 | | -* **IMPROVEMENT**: Cleaner API surface - engine methods now return results directly |
13 | | -* **INTERNAL**: Updated FRB codegen for new API structure |
14 | | -* **INTERNAL**: Refactored internal state management using `Arc<RwLock<Option<...>>>` for bridge storage |
15 | | -* **DOCS**: Updated workflow configuration for FJS example builds |
| 3 | +## 2.0.0 |
| 4 | + |
| 5 | +* **BREAKING**: Renamed `JsEngineCore` to `JsEngine` for clearer naming convention |
| 6 | +* **BREAKING**: Removed `JsAction` system - direct API methods are now available on `JsEngine` |
| 7 | +* **BREAKING**: Removed `exec()` method - use direct methods like `eval()`, `call()`, `declareNewModule()` instead |
| 8 | +* **BREAKING**: Changed `eval()` parameter from positional to named parameter `source:` for better clarity |
| 9 | +* **BREAKING**: Changed `declareNewModule()` parameter to named parameter `module:` |
| 10 | +* **BREAKING**: Changed `declareNewModules()` parameter to named parameter `modules:` |
| 11 | +* **BREAKING**: Removed `engine.freezed.dart` - `JsEngine` is now a regular abstract class |
| 12 | +* **FEATURE**: Added `call()` method to invoke exported module functions directly |
| 13 | +* **FEATURE**: Added `evaluateModule()` method to execute modules immediately |
| 14 | +* **FEATURE**: Added `isModuleDeclared()` method to check module existence |
| 15 | +* **FEATURE**: Added `clearNewModules()` method to remove all dynamically declared modules |
| 16 | +* **FEATURE**: Added `initWithoutBridge()` method for engines that don't need bridge communication |
| 17 | +* **FEATURE**: Added `context` getter to access underlying `JsAsyncContext` |
| 18 | +* **FEATURE**: Added `disposed` getter to check engine disposal status |
| 19 | +* **FEATURE**: Added comprehensive API documentation with examples for all public methods |
| 20 | +* **IMPROVEMENT**: Migrated to named parameters throughout `JsEngine` API for better code clarity |
| 21 | +* **IMPROVEMENT**: Updated all example screens to use new API |
| 22 | +* **IMPROVEMENT**: Enhanced integration tests with new API coverage |
| 23 | +* **IMPROVEMENT**: Simplified engine lifecycle management with direct methods |
| 24 | +* **IMPROVEMENT**: Better error messages with detailed documentation |
| 25 | +* **DOCS**: Fixed README.md and README_zh.md to match actual API signatures |
| 26 | +* **DOCS**: Added detailed parameter descriptions and examples to all API methods |
| 27 | +* **CI/CD**: Added GitHub Actions workflow for building all platforms |
16 | 28 |
|
17 | 29 | ## 1.4.0 |
18 | 30 |
|
|
0 commit comments