@pumped-fn/core-next 0.5.91 → 0.5.94

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,97 @@
1
1
  # @pumped-fn/core-next
2
2
 
3
+ ## 0.5.94
4
+
5
+ ### Patch Changes
6
+
7
+ - 84f1a00: Redesign test suite for better maintainability and coverage
8
+
9
+ - Consolidate 10+ fragmented test files into unified `index.test.ts`
10
+ - 160 tests covering all public API exports
11
+ - 83% code coverage (statements, functions, lines)
12
+ - Tests now mirror public API structure (Scope, Flow, Tag, Extension, etc.)
13
+ - Add realistic AOP scenario demonstrating tags + extensions patterns
14
+
15
+ ## 0.5.93
16
+
17
+ ### Patch Changes
18
+
19
+ - 7c00672: ## Breaking Changes
20
+
21
+ ### File Consolidation (21 → 11 files)
22
+
23
+ - `tag-types.ts` + `tag-executors.ts` + `tags/merge.ts` → `tag.ts`
24
+ - `promises.ts` + `ssch.ts` → `primitives.ts`
25
+ - `flow-execution.ts` → merged into `flow.ts`
26
+ - `extension.ts` → merged into `helpers.ts`
27
+ - `internal/` directory → inlined into main modules
28
+
29
+ ### API Changes
30
+
31
+ **ctx.exec()**: Changed from positional params to config object
32
+
33
+ ```typescript
34
+ // Before
35
+ ctx.exec(myFlow, input);
36
+
37
+ // After
38
+ ctx.exec({ flow: myFlow, input });
39
+ ```
40
+
41
+ **Promised**: Removed 9 methods, simplified to core functionality
42
+
43
+ - Removed: `switch`, `switchError`, `fulfilled`, `rejected`, `firstFulfilled`, `findFulfilled`, `mapFulfilled`, `assertAllFulfilled`
44
+ - Kept: `map`, `mapError`, `partition`
45
+
46
+ **Extension.ExecutionOperation**: Flattened structure
47
+
48
+ - Removed nested `target` object
49
+ - Added flat `mode` field: `"sequential" | "parallel" | "parallel-settled"`
50
+ - Check `operation.flow` instead of `operation.target.type === "flow"`
51
+
52
+ **Tag**: Removed `injectTo` alias and `partial` method
53
+
54
+ **FlowDefinition**: Removed builder pattern (`.handler()` chaining)
55
+
56
+ See `packages/next/MIGRATION.md` for detailed migration guide.
57
+
58
+ ## 0.5.92
59
+
60
+ ### Patch Changes
61
+
62
+ - 9bb928b: Add ExecutionContext lifecycle management
63
+
64
+ **New Features:**
65
+
66
+ - `ExecutionContext.state` property with states: `'active'` | `'closing'` | `'closed'`
67
+ - `ExecutionContext.closed` convenience boolean for quick state checks
68
+ - `ExecutionContext.close(options?)` method with graceful (default) and abort modes
69
+ - `ExecutionContext.onStateChange(callback)` subscription returning cleanup function
70
+ - `ExecutionContextClosedError` thrown when operations attempted on closed context
71
+ - `ContextLifecycleOperation` extension hook for observing context lifecycle events
72
+
73
+ **Graceful mode (default):**
74
+
75
+ - Waits for all in-flight executions to complete
76
+ - Cascades close to child contexts
77
+ - Returns single promise for idempotent calls
78
+
79
+ **Abort mode:**
80
+
81
+ - Signals abort to in-flight executions via `AbortController`
82
+ - Collects errors into `AggregateError` if any operations fail
83
+ - Useful for timeout or cancellation scenarios
84
+
85
+ **Extension Integration:**
86
+
87
+ - Extensions receive `context-lifecycle` operations with phases: `create`, `closing`, `closed`
88
+ - Enables middleware patterns: tracing, logging, metrics collection
89
+
90
+ **Bug Fixes:**
91
+
92
+ - Fixed 33 unhandled promise rejections in test suite
93
+ - Added vitest setup file for unhandled rejection detection
94
+
3
95
  ## 0.5.91
4
96
 
5
97
  ### Patch Changes