df_type 0.15.1
df_type: ^0.15.1 copied to clipboard
Simplifies type conversions, inspections, nested data access, sync/async operations and more.
Changelog #
0.15.1 #
- update
0.15.0 #
- breaking: Remove
DateTimeUtils,StreamUtils, andStringToDurationConverter. Moved to the newdf_oddpackage. - breaking: Rename extension
ValueOfOnEnumExtensiontoValueOfOnEnumExt. - breaking:
Waiter.addnow takes aWaiterOperation<T>value object; bare-function callers should switch toaddFn(fn, {id}). TheWaiterconstructor takesIterable<WaiterOperation<T>>. - breaking:
letAsStringOrNull(null)returnsnull(previously the literal four-character string'null'). - breaking:
letOrNull<T>throwsArgumentErrorin every build mode when given a specific collection subtype (e.g.List<int>). Previously a debug-onlyassertthat was stripped in release, silently returningnullin production. - breaking:
letMapOrNullrejects the conversion when two source keys coerce to the same target key. Previously the second entry silently overwrote the first. - breaking:
Function.tryCallno longer absorbsErrorsubtypes (StackOverflowError,OutOfMemoryError,AssertionError,StateError, …). It still absorbsException,TypeError, andNoSuchMethodError. - feat: Add
decodeJsonbStrings— recursively decodes JSON-shaped strings inside Maps and Lists, for normalising Postgresjsonbcolumns. Accepts an optionalmaxDepthparameter (default64) so hostile or pathological nesting cannot overflow the stack. - feat: Add
WaiterOperation<T>— immutable value-object wrapper around a deferred operation, with optionalidfor auditing. Cross-isolate sendable whenrunis a top-level orstaticfunction. - feat: Add
Waiter.addFn(fn, {id})andWaiter.removeWhere(test). - feat: Export
isJsRuntime,jsSafeIntegerBound,vmInt64Bound, anddefaultDecodeJsonbStringsMaxDepthfor callers that need to branch on runtime or align with the package's safety bounds. - fix:
letIntOrNullnow rejectsNaN,±Infinity, and values outside the runtime-correct safe-integer range —[-2^63, 2^63)on the Dart VM,[-2^53, 2^53]on the JS runtime (Flutter web / dart2js / dartdevc) whereintis backed by a 64-bit double. Previously could throwUnsupportedError, silently saturate toint64.min/int64.max, or hand back a precision-mangled value on JS. - fix:
wait/consec*now preserves positional argument order across mixed sync/async inputs. - fix:
wait/consec*/Waiter: a buggyonErrorhandler no longer masks the original incident. The handler's own failure is surfaced throughZone.current.handleUncaughtError, while the caller still sees the original error. - fix:
wait/consec*/Waiter:onCompletenow runs on every exit path, including whenonErroritself throws. - fix:
wait/consec*undereagerError: trueno longer leaks secondary rejections throughZone.current.handleUncaughtError— exactly one attributable failure reaches the caller. - fix:
Waiterconstructor and per-call error handlers are now awaited if they return aFuture, and one handler's throw no longer prevents the other from running. - fix:
letDateTimeOrNullnow trims whitespace before parsing.