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