feat: implicit return for single expressions using acorn parser
- Parse code with acorn to detect single expression statements - Auto-wrap expressions with 'return await (...)' for implicit return - Exclude side-effects: assignments, updates (x++), delete operator - Update skill.md examples to remove console.log (keep await) - Add unit tests for shouldAutoReturn function
This commit is contained in:
Generated
+3
@@ -86,6 +86,9 @@ importers:
|
||||
'@xmorse/cac':
|
||||
specifier: ^6.0.7
|
||||
version: 6.0.7
|
||||
acorn:
|
||||
specifier: ^8.15.0
|
||||
version: 8.15.0
|
||||
async-sema:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
||||
Reference in New Issue
Block a user