@pumped-fn/core-next 0.5.82 → 0.5.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,80 @@
1
1
  # @pumped-fn/core-next
2
2
 
3
+ ## 0.5.84
4
+
5
+ ### Patch Changes
6
+
7
+ - 252db92: Simplify Extension.Operation types and remove generic from wrap method
8
+
9
+ - Consolidated 5 operation kinds (execute, journal, subflow, parallel, resolve) into 2 kinds (execution, resolve)
10
+ - Removed generic type parameter from Extension.wrap method for simpler type signatures
11
+ - Updated all wrapWithExtensions implementations to use type assertions
12
+ - Migrated all tests to new operation type structure
13
+ - Updated documentation for simplified 2-kind operation model
14
+ - Benefits: Simpler mental model, easier AI explanation, more flexible tag-based nesting context
15
+
16
+ - 5f190c0: Fix validation bug, simplify flow execution, and fix tag/metadata access
17
+
18
+ **Bug Fix:**
19
+
20
+ - Fixed: Non-journaled flows now validate input/output (previously skipped validation)
21
+ - All flows with schemas now guarantee validation on every execution
22
+ - Fixed: flowMeta.depth calculation when parent depth is undefined (was NaN, now 0)
23
+ - Fixed: Tag access via ctx.get() - Tag objects are functions, not objects (typeof check was wrong)
24
+ - Fixed: Child context created before operation (extensions now see correct depth metadata)
25
+ - Fixed: FlowContext.get() now checks scope.tags after execution tags
26
+ - Fixed: Test using ctx.get() changed to ctx.find() for optional tags
27
+
28
+ **Refactor:**
29
+
30
+ - Simplified exec() from 190 lines to ~50 lines via functional decomposition
31
+ - Extracted pure helper functions: createChildContext, executeFlowHandler, executeJournaledFlow, executeNonJournaledFlow, executeJournaledFn, executeNonJournaledFn, executeAndWrap, executeWithTimeout
32
+ - Enforced safety via TypeScript: UnwrappedExecutor type prevents returning without extension wrapping, ContextConfig type requires parent linkage
33
+ - Eliminated 4 execution paths into single route with helpers
34
+ - Removed duplicate validation/wrapping logic across paths
35
+
36
+ **Enhanced:**
37
+
38
+ - custom() now accepts optional validator function for inline validation:
39
+ ```ts
40
+ custom<number>((value) => {
41
+ if (typeof value !== "number") {
42
+ return { success: false, issues: [{ message: "Expected number" }] };
43
+ }
44
+ return value;
45
+ });
46
+ ```
47
+
48
+ **Testing:**
49
+
50
+ - Rebuilt test suite from scratch: 2 files, ~500 lines total
51
+ - flow-execution.test.ts: API behavior for app developers (22/22 tests passing ✅)
52
+ - flow-extensions.test.ts: Extension integration (20/20 tests passing ✅)
53
+ - Added comprehensive result inspection throughout tests
54
+ - Deleted 8 overlapping legacy test files
55
+ - All 268 core-next tests passing ✅
56
+
57
+ - 13f84a4: Internal refactoring: consolidate duplicate patterns
58
+
59
+ - Extract `wrapWithExtensions` to internal/extension-utils.ts (eliminates duplication between flow.ts and scope.ts)
60
+ - Consolidate dependency resolution via internal `resolveShape` utility
61
+ - Simplify FlowDefinition.handler overload implementation
62
+ - Increase packages/next/src by +0.72% (+33 LOC) due to new internal utilities and comprehensive test coverage
63
+
64
+ No public API changes. All tests pass. Performance neutral or improved.
65
+
66
+ ## 0.5.83
67
+
68
+ ### Patch Changes
69
+
70
+ - 811926e: Refactor FlowContext.exec for improved maintainability and add comprehensive extension tests
71
+
72
+ - Reduce exec method from 323 to 138 lines (72% reduction)
73
+ - Extract shared utilities: abort-utils, journal-utils
74
+ - Add helper methods: parseExecOverloads, executeJournaledFn, executeSubflow
75
+ - Add comprehensive extension tests with full operation metadata validation
76
+ - Verify extension wrapping order and nested operations
77
+
3
78
  ## 0.5.82
4
79
 
5
80
  ### Patch Changes