@pumped-fn/lite 1.3.0 → 1.4.0
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 +45 -0
- package/README.md +149 -576
- package/dist/index.cjs +47 -6
- package/dist/index.d.cts +54 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +54 -2
- 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,50 @@
|
|
|
1
1
|
# @pumped-fn/lite
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- bbcada9: feat(lite): add Controller.set() and Controller.update() for direct value mutation
|
|
8
|
+
|
|
9
|
+
Adds two new methods to Controller for pushing values directly without re-running the factory:
|
|
10
|
+
|
|
11
|
+
- `controller.set(value)` - Replace value directly
|
|
12
|
+
- `controller.update(fn)` - Transform value using a function
|
|
13
|
+
|
|
14
|
+
Both methods:
|
|
15
|
+
|
|
16
|
+
- Use the same invalidation queue as `invalidate()`
|
|
17
|
+
- Run cleanups in LIFO order before applying new value
|
|
18
|
+
- Transition through `resolving → resolved` states
|
|
19
|
+
- Notify all subscribed listeners
|
|
20
|
+
|
|
21
|
+
This enables patterns like WebSocket updates pushing values directly into atoms without triggering factory re-execution.
|
|
22
|
+
|
|
23
|
+
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.
|
|
24
|
+
|
|
25
|
+
## 1.3.1
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- 3208cfe: Improve README documentation clarity and reduce size by 19%
|
|
30
|
+
|
|
31
|
+
**Enhanced API behavior documentation:**
|
|
32
|
+
|
|
33
|
+
- `ctx.cleanup()`: Clarified lifecycle - runs on every invalidation (before re-resolution) and release, LIFO order
|
|
34
|
+
- `ctx.data`: Clarified lifecycle - persists across invalidations, cleared on release, per-atom isolation
|
|
35
|
+
- `controller(atom)` as dep: Explained key difference - receives unresolved controller vs auto-resolved value
|
|
36
|
+
- `ctx.invalidate()`: Explained scheduling behavior - runs after factory completes, not interrupting
|
|
37
|
+
- `ctrl.get()`: Documented stale reads during resolving state
|
|
38
|
+
- `scope.flush()`: Added to API Reference (was undocumented)
|
|
39
|
+
|
|
40
|
+
**Trimmed content:**
|
|
41
|
+
|
|
42
|
+
- Removed duplicate Core Concepts diagram
|
|
43
|
+
- Condensed Flow section
|
|
44
|
+
- Condensed Extensions section
|
|
45
|
+
- Consolidated Lifecycle diagrams
|
|
46
|
+
- Removed rarely-used Direct Tag Methods section
|
|
47
|
+
|
|
3
48
|
## 1.3.0
|
|
4
49
|
|
|
5
50
|
### Minor Changes
|