@pumped-fn/lite 1.3.1 → 1.4.1
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 +53 -0
- package/README.md +154 -457
- package/dist/index.cjs +47 -6
- package/dist/index.d.cts +88 -21
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +88 -21
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +47 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# @pumped-fn/lite
|
|
2
2
|
|
|
3
|
+
## 1.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3f3fea8: fix(lite): improve ExecutionContext and ExecFlowOptions type inference
|
|
8
|
+
|
|
9
|
+
**Type System Improvements:**
|
|
10
|
+
|
|
11
|
+
- Remove unnecessary `TInput` generic from `ExecutionContext` interface
|
|
12
|
+
- Add proper output/input type inference to `ExecFlowOptions<Output, Input>`
|
|
13
|
+
- Make `input` property optional for void/undefined/null input flows
|
|
14
|
+
- Update `FlowFactory` to use intersection type for input typing
|
|
15
|
+
- Simplify `Extension.wrapResolve` and `wrapExec` to use `unknown`
|
|
16
|
+
- Flows without `parse` now return `Flow<Output, void>` for better DX
|
|
17
|
+
|
|
18
|
+
**DX Improvements:**
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
// No input needed for void flows - clean DX
|
|
22
|
+
ctx.exec({ flow: voidFlow });
|
|
23
|
+
|
|
24
|
+
// Input required and type-checked for typed flows
|
|
25
|
+
ctx.exec({ flow: inputFlow, input: "hello" });
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Test Consolidation:**
|
|
29
|
+
|
|
30
|
+
- Reduced test count from 149 to 130 (-13%)
|
|
31
|
+
- Removed duplicate and superficial tests
|
|
32
|
+
- Consolidated similar test patterns
|
|
33
|
+
|
|
34
|
+
## 1.4.0
|
|
35
|
+
|
|
36
|
+
### Minor Changes
|
|
37
|
+
|
|
38
|
+
- bbcada9: feat(lite): add Controller.set() and Controller.update() for direct value mutation
|
|
39
|
+
|
|
40
|
+
Adds two new methods to Controller for pushing values directly without re-running the factory:
|
|
41
|
+
|
|
42
|
+
- `controller.set(value)` - Replace value directly
|
|
43
|
+
- `controller.update(fn)` - Transform value using a function
|
|
44
|
+
|
|
45
|
+
Both methods:
|
|
46
|
+
|
|
47
|
+
- Use the same invalidation queue as `invalidate()`
|
|
48
|
+
- Run cleanups in LIFO order before applying new value
|
|
49
|
+
- Transition through `resolving → resolved` states
|
|
50
|
+
- Notify all subscribed listeners
|
|
51
|
+
|
|
52
|
+
This enables patterns like WebSocket updates pushing values directly into atoms without triggering factory re-execution.
|
|
53
|
+
|
|
54
|
+
BREAKING CHANGE: `DataStore.get()` now always returns `T | undefined` (Map-like semantics). Use `getOrSet()` to access default values from tags. This aligns DataStore behavior with standard Map semantics where `get()` is purely a lookup operation.
|
|
55
|
+
|
|
3
56
|
## 1.3.1
|
|
4
57
|
|
|
5
58
|
### Patch Changes
|