jolt 3.0.1
jolt: ^3.0.1 copied to clipboard
A lightweight, high-performance reactive signals library for Dart/Flutter with fine-grained updates and intelligent resource management.
3.0.0 #
-
REFACTOR: simplify API by removing native methods and toSignal extensions. (6ed87fa3)
-
Refactor base interfaces
- Remove ReadonlyNodeMixin, replace with DisposableNodeMixin
- Simplify interface hierarchy (ReadableNode, WritableNode, DisposableNode)
- Move disposal logic to finalizer utilities
-
Refactor persist signal implementation
- Introduce write queue management mixin
- Implement 2-element write queue for efficient writes
- Add throttling support with trailing write behavior
- Split into sync and async implementations
-
Add extension methods
- Add .get() and .call() extensions for readable nodes
- Add .set() and .update() extensions for writable nodes
- Add delegated, stream, until, finalizer extensions
-
Remove native methods from classes
- Remove .get(), .set(), .call() methods from Signal, Computed, etc.
- Classes now only use .value property
- Methods moved to extension methods for better API consistency
-
Remove toSignal extension methods
- Remove all conversion extension methods
Migration Guide:
- Replace .get() with .value:
// Before
signal.get()
// After
signal.value
- Replace .set(value) with .value = value:
// Before
signal.set(10)
// After
signal.value = 10
- Replace .call() with .value:
// Before
readonly.call()
// After
readonly.value
- Remove toSignal() and similar conversion methods:
// Before
final signal = someValue.toSignal()
// After
final signal = Signal(someValue)
- Import extension methods if needed:
// If you need .get()/.set()/.call() as extension methods
import 'package:jolt/extension.dart';
- REFACTOR: rename Readonly to Readable and update related interfaces. (daeafdd5)
2.1.0 #
2.0.0 #
- Graduate package to a stable release. See pre-releases prior to this version for changelog entries.
2.0.0-beta.5 #
2.0.0-beta.4 #
2.0.0-beta.3 #
2.0.0-beta.2 #
2.0.0-beta.1 #
BREAKING CHANGES:
-
Type replacements:
JReadonlyValue<T>→ReadonlyNode<T>JWritableValue<T>→WritableNode<T>JEffect→EffectNode(mixin)
Migration guide:
- Type annotations and generic constraints:
JReadonlyValue<T>→ReadonlyNode<T> - Custom class inheritance:
extends JReadonlyValue<T>→with ReadonlyNodeMixin<T> implements ReadonlyNode<T> - Effect classes:
extends JEffect→with EffectNode implements ChainedDisposable
-
Property replacement:
Computed.pendingValue→Computed.peekCached
-
Computed API changes:
Computedconstructor no longer exposesinitialValueparameterComputed.peek()method behavior changed: previously used to view cached value, now behaves the same asuntracked, used to read value without tracking- Added
Computed.peekCached()method: used to view cached value (replaces the originalpeek()functionality)
Migration guide:
- If you previously used
computed.peek()to view cached value, change tocomputed.peekCached() - If you need to read value without tracking, use
computed.peek()oruntracked(() => computed.value)
Other changes:
-
Reactive system refactoring:
- Refactored reactive system abstract classes, separating implementation from interfaces for better extensibility and hiding node details
-
New methods:
- Added
trackWithEffect()method: used to append dependencies to side effects - Added
notifyAll()method: used to collect subscribers and notify them
- Added
-
Watcher enhancements:
- Added
Watcher.immediately()factory method: creates a Watcher that executes immediately - Added
Watcher.once()factory method: creates a Watcher that executes only once - Added pause/resume functionality:
pause()andresume()methods - Added
ignoreUpdates()method: used to ignore updates
- Added
-
Extension methods:
- Added
update()extension method: facilitates functional updates from old value to new value - Added
until()extension method: returns a Future for one-time listening to signal value changes
- Added
-
REFACTOR(jolt): remove EffectBase and add trackWithEffect". (a00420e3)
-
REFACTOR(core): optimize reactive system core and improve code quality. (444957b6)
-
REFACTOR: restructure core interfaces and implementation classes. (e552ab33)
-
FEAT(jolt): add until/update methods and improve APIs. (44eb0c7b)
-
FEAT(watcher): add pause/resume and ignoreUpdates functionality. (c882bf72)
-
FEAT: implement Setup Widget with type-based hook hot reload. (e71cf18c)
1.0.3 #
1.0.0 #
- REFACTOR(jolt): async signal. (f42f70f8)
- REFACTOR: simplify EffectScope API, add detach parameter. (eed8cc1a)
- REFACTOR(jolt): batch WritableComputed setter for atomic updates. (7f7046e0)
- PERF(jolt): simplify Watcher comparison logic. (47acc599)
- PERF(jolt): remove hard code. (7cafc45a)
- FIX(jolt): computed's annotations. (1168f3cd)
- FIX(jolt): add protected annotations. (4a5d3a0a)
- FIX: add missing tests for jolt, rename currentValue to cachedValue. (87de3c6a)
- FIX(persist_signal): ignore write errors and prevent load overwrite. (ba9db5c2)
- FEAT(jolt): expose JFinalizer. (a90865c3)
- FEAT: add cleanup function support for Effect, Watcher and EffectScope. (d0e8b367)
- FEAT(jolt): allow watcher to receive null as old value when called immediately. (b101c68e)
- FEAT(persist_signal): add setEnsured with write counting and rollback. (bfb51d3b)
- DOCS: improve code documentation. (c152870a)
0.0.7 #
- fix: make Computed.peek initialize via untracked and return cached value
0.0.6 #
- chore: use
melosfor monorepo management - fix: fix outdated documentation API comments
- fix: peek in signal
- fix: expose onDispose method for subclass
0.0.5 #
- BREAKING: remove autoDispose, MapEntrySignal, joltObserver
- feat: add onDebug hook for debug(assert method)
- feat: JReadonlyValue now supports toString() for value display
- sync: align with alien_signals v3.0.3
- docs: add comprehensive readme and documentation for tricks
0.0.4 #
- fix: notify method not working
- feat: align stream shortcut listen parameters with original implementation
- fix: equality comparison issue caused by operator== overloading
0.0.3+1 #
- fix: effect scope context
0.0.3 #
- sync: align with alien_signals v3.0.1
- feat: advanced observer
- chore: update dependencies
0.0.2+1 #
- fix: some bugs
0.0.2 #
- Initial version.