df_collection 0.10.0
df_collection: ^0.10.0 copied to clipboard
A package designed to extend Dart collections by offering additional functionality.
Changelog #
0.10.0 #
- breaking:
mergeDataDeepnow deep-copies all mutable substructure into its result — mutating the merged result no longer mutates the input data. Same guarantee formergeListsSetsOrQueuesandmergeIterables. Prior versions silently sharedMap/List/Set/Queuereferences between the result and the inputs, which was a data-integrity hazard. - breaking:
JsonUtility.flattenJsonnow throwsStateErrorwhen (a) any key contains the separator (would produce an ambiguous flat path) or (b) two distinct source paths would flatten to the same flat key (silent overwrite of data). Previously the colliding entry was silently dropped. - breaking:
JsonUtility.mapToJsonnow rejectsNaNand±Infinitydoubles withUnsupportedError— not representable in standard JSON, previously slipped through only to breakjsonEncodedownstream. - breaking:
setNestedValueon a non-Mapintermediate now throwsStateErrorinstead of silently overwriting the existing value. PassoverwriteIntermediates: trueto opt into the old behaviour. An emptykeyPathis now a safe no-op instead of throwing. - breaking:
tryToJson/tryToMapnow only swallowNoSuchMethodError(the "no such member" case). Exceptions thrown by a presenttoJson/toMappropagate. - breaking:
tryReduce/tryMergenow only convert the "empty iterable" case intonull. Exceptions from the user's combine/merge function propagate (previouslyErrorsubclasses includingStackOverflowErrorwere silently swallowed). - breaking:
combinedOrderedStringIdnow throwsArgumentErrorwhen an ID is empty, contains the separator (would otherwise yield silent ID collisions), or when an empty separator is passed. New optionalseparatorparameter (default_). - breaking:
deepGetFromSegmentsrefuses to index into non-Listiterables (notablySet) — element order is implementation-defined there. Also refuses fractional indices (e.g."3.5") instead of silently truncating. - breaking:
chunkedthrowsArgumentErrorfor non-positivechunkSizeinstead of silently yielding a single chunk. - fix:
CsvUtility.csvToMapis now an RFC 4180 parser: handles CRLF / bare-CR line terminators, newlines inside quoted fields, escaped quotes, and preserves significant leading/trailing whitespace. Blank lines no longer renumber subsequent rows. - fix:
CsvUtility.mapToCsvnow quotes fields containing\rper RFC 4180. - fix:
deepGetFromSegmentsnow returns the resolved value instead of alwaysnull. - fix:
takeLast(count)no longer throws whencountexceeds the iterable's length; returns the full iterable. - fix:
traverseMapwrite returns the written value, and no longer throws when the intermediate path crosses a non-map node. - fix:
mergeIterablesno longer throws aTypeErrorwhen one argument is a scalar and the other is a typed iterable. - fix:
JsonUtility.mapToJsonnow acceptsnullvalues (was throwingUnsupportedError). - fix:
JsonUtility.flattenJsonno longer silently drops keys whose values are empty maps or lists. - fix:
mergeListsSetsOrQueuesnow applieselseFilterto the b-side in theSetbranch (was previously skipped). MaybeAddToIterableExt.maybeAddreturn type tightened fromIterable<T>?toIterable<T>.