Skip to content

Commit ed34995

Browse files
authored
✨ refactor: restructure API (#5)
* ✨ refactor: restructure API with engine, error, runtime, and source modules - Remove deprecated js API modules - Add new engine, error, runtime, and source API modules - Update example app with new API screens - Add widgets directory for UI components - Update package dependencies and changelog * 📝 update: modify runtime API and integration tests - Update CHANGELOG.md with latest changes - Modify integration test in example - Update runtime.rs implementation - Sync package dependencies
1 parent ed62bf5 commit ed34995

5 files changed

Lines changed: 1811 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
# Changelog
22

3-
## 1.3.1
3+
## 1.4.0
44

5-
* **PERFORMANCE**: Optimized BigInt conversion using native rquickjs API instead of JavaScript evaluation
6-
* **PERFORMANCE**: Improved Symbol description extraction using native rquickjs Symbol API
7-
* **PERFORMANCE**: Simplified file reading with direct `tokio::fs::read()` call
5+
* **BREAKING**: Restructured API modules - removed deprecated `js` module, added `engine`, `error`, `runtime`, and `source` modules for better organization
6+
* **FIX**: Fixed Promise result unwrapping - QuickJS's `JS_EVAL_FLAG_ASYNC` wraps Promise results in `{value: xxx}` format, now properly detected and unwrapped by checking for objects with exactly one `value` property
7+
* **FIX**: Fixed nested Promise handling to correctly await and unwrap chained Promises
8+
* **FIX**: Fixed `undefined` value handling in Promise results - now correctly returns `JsValue.none()` instead of the wrapper object
89
* **FIX**: Fixed `DynamicModuleResolver` to properly check module existence before resolving
910
* **FIX**: Fixed `build_loaders()` to properly include additional modules in resolver and loader chains
1011
* **FIX**: Fixed `GlobalAttachment` to correctly initialize each context independently using context-level userdata
12+
* **PERFORMANCE**: Optimized BigInt conversion using native rquickjs API instead of JavaScript evaluation
13+
* **PERFORMANCE**: Improved Symbol description extraction using native rquickjs Symbol API
14+
* **PERFORMANCE**: Simplified file reading with direct `tokio::fs::read()` call
15+
* **IMPROVEMENT**: Added comprehensive integration tests (130+ test cases) covering Promise edge cases, boundary conditions, bridge call scenarios, and memory management
16+
* **IMPROVEMENT**: Updated example app with new API screens for engine, error, runtime, and source modules
17+
* **IMPROVEMENT**: Added widgets directory for reusable UI components in example app
18+
* **INTERNAL**: Improved Promise result detection logic using object key enumeration instead of direct property access
1119
* **INTERNAL**: Removed unused variable in bridge call function
1220
* **INTERNAL**: Improved code clarity and reduced redundant logic
1321

0 commit comments

Comments
 (0)