- Fix a number of doc comment issues.
- Un-deprecate
Optional
. Causing breaks with hints internally at Google. Need to remove all usages before we try to land again.
- Deprecate
Optional
. With the introduction of non-null by default in Dart SDK 2.12, existing users should migrate to non-nullable types. This type will be removed in Quiver 4.0.0. - Make
TreeIterator
not implement deprecatedBidirectionalIterator
. ThemovePrevious
method still exists onTreeIterator
. - Require Dart 2.17
- Fix: Make Cache.get ifAbsent parameter nullable. The parameter was always optional; this just corrects the type.
- Fix: Remove documentation links to the (previously removed) mirrors library.
- Remove broken references to the defunct mirrors library.
- Add documentation to
Optional
suggesting that adding new uses be avoided and existing uses should be migrated to nullable types in codebases where non-null by default has been enabled.
- Fix: Eliminate null check error on removal of root node of
AVLTree
. - Fix: Eliminate null check in partition internal iterator
current
getter. - Minor documentation typo corrections.
- BREAKING CHANGE: This version requires Dart SDK 2.12.0 or later.
- BREAKING CHANGE: Remove
assertCheckedMode
. This was deprecated in 2.1.2. Checked mode no longer exists in Dart 2.0 since the vast majority of what checked mode did is now done in the type system itself. - BREAKING CHANGE: Remove
doWhileAsync
. This was deprecated in 2.1.1. Existing callers should migrate toFuture.doWhile()
. - BREAKING CHANGE: Remove IO library. This was deprecated in 2.1.4.
- BREAKING CHANGE: Remove mirrors library. This was deprecated in 2.1.4.
- BREAKING CHANGE: forEachAsync now returns Future instead of Future.
- BREAKING CHANGE: BiMap no longer throws ArgumentError on insertion of a null key or value, if the corresponding K or V type is nullable. As before, values in the map must be unique and ArgumentError is thrown on attempts to add a key-value pair whose value is already in the map.
- BREAKING CHANGE:
TreeSet.first
andTreeSet.last
now throw StateError if no element exists, as specified by the Set API contract both with null safety enabled or disabled. - BREAKING CHANGE:
TreeSet
iterators now throw ifIterator.current
is called beforemoveNext
is called, or aftermoveNext
has returned false when running with null safety enabled. - Deprecate
checkNotNull
. Users of this function should migrate toArgumentError.checkNotNull
. This will be removed in 4.0.0. - Deprecate
firstNonNull
. Users of this function should migrate tovar v = o1 ?? o2 ?? o3 ?? o4; ArgumentError.checkNotNull(v);
. This will be removed in 4.0.0 - Eliminate dependency on package:meta.
- Deprecate
forEachAsync
,reduceAsync
. Existing callers should migrate toFuture.forEach
. Migration examples have been added to the documentation for these methods. This will be removed in Quiver 3.0.0.
- Fix: Add dart:async import to async/string.dart. Stream wasn't exported from dart:core until Dart 2.1 but Quiver supports back to Dart 2.0.
- Move
stringFromByteStream
from the IO library to the async library. The original in IO has been deprecated and will be removed in 3.0.0. Users should update their code to import this function fromquiver/async.dart
. If bothquiver/io.dart
andquiver.async.dart
are imported in the same file, users should hide the symbol from IO as described here: https://dart.dev/guides/language/language-tour#importing-only-part-of-a-library - Deprecate
getFullPath
. Users should useFile(path).resolveSymbolicLinksSync
. This will be removed in 3.0.0. - Deprecate
visitDirectory
. This will be removed in 3.0.0. The source can be copied under the terms of the Apache 2.0 license. - Deprecate mirrors library. This will be removed in 3.0.0. This library was written prior to Dart 1.0 and in the interim, mirrors have been found to be problematic for production code. The primary Dart runtimes today are Flutter and the web. Flutter disables dart:mirrors altogether. On the web, the use of mirrors disables tree-shaking since in theory almost any symbol could be used reflectively; this can't be solved through static analysis -- one could imagine the situation where a user of a web app inputs the name of a method to be reflectively invoked at runtime. Users of this code can rewrite this code, or copy it into their own projects under the terms of the Apache 2.0 license.
- Fix: Eliminate a set literal inadvertently introduced in google#359. Set literals are only supported starting in Dart 2.2, but Quiver supports back to Dart 2.0.
- Switched from using part/part of to re-exporting the underlying libraries. We weren't making use of private symbols across files within lib/src. This improves readability by keeping imports with the code that's using them. It also allows for cross-imports within lib/src if necessary.
- Fix: revert const constructor change to
Optional.transform
,Optional.transformNull
which causes type errors when used in combination with certain operations that trigger an implicit type check. The error in question was introduced in 2.1.2.
- Minor linter fix: added curly brackets on flow-control structures to make Pana package scoring happier.
- Deprecate
assertCheckedMode
. Checked mode no longer exists in Dart 2.0 since the vast majority of what checked mode did is now done in the type system itself. This will be removed in Quiver 3.0.0. - TreeSet.isEmpty/isNotEmpty are now constant-time checks.
- Large amounts of linter-related cleanups.
- Deprecate
doWhileAsync
. Existing callers should migrate toFuture.doWhile()
fromdart:async
. This will be removed in Quiver 3.0.0. - Fix: Eliminate a crash in
LruMap.putIfAbsent
whenmaximumSize
is 1. - Add return types on any function that didn't include one.
- Upgraded matcher dependency lower-bound from 0.10.0 to 0.12.5 to migrate from
isInstanceOf
toisA
in tests. - Style cleanups.
- Added
isNotBlank
to strings library.
- Added
FakeAsync.pendingTimersDebugInfo
.
- Do not cache failed
ifAbsent
calls inMapCache
.
partition
is now a generic function.- New: Optional now includes an
isNotPresent
getter alongside the existingisPresent
getter.
- New: Optional now includes
transformNullable
to pass maybe present values through a transformer with a nullable return value.
- Updated Dart SDK constraint to >=2.0.0-dev.61 < 3.0.0.
- BREAKING CHANGE: This version requires Dart SDK 2.0.0-dev.61 or later.
- BREAKING CHANGE: StreamBuffer has been changed from implementing
StreamConsumer<T>
toStreamConsumer<List<T>>
. Users ofStreamBuffer<List<T>>
can simply change declarations toStreamBuffer<T>
. In cases where the generic type is already not a list type, inputs to the list may need to be wrapped in a list.
- BREAKING CHANGE: This version requires Dart SDK 2.0.0-dev.30 or later. Bugfixes will be backported to the 0.28.x series for Dart 1 users.
- New: BiMap now includes a real implementation of
addEntries
,get entries
,map
,removeWhere
,update
, andupdateAll
. - New: DelegatingIterable now includes a real implementation of
followedBy
, and accepts theorElse
parameter onsingleWhere
. - New: DelegatingList now includes real implementations of
operator +
,indexWhere
, andlastIndexWhere
. - New: LruMap now includes a real implementation of
addEntries
,get entries
,removeWhere
,update
, andupdateAll
. - New: The map returned by
Multimap.asMap()
now includes real implementations ofget entries
andremoveWhere
. This class also has "real" implementations ofaddEntries
,map
,update
, andupdateAll
, which just throw anUnsupportedError
, as inserts and updates are not allowed on map views. - New: The list keys of
ListMultimap
now include real implementations ofoperator +
,indexWhere
, andlastIndexWhere
. - New: The iterable keys of
ListMultimap
andSetMultimap
now include a real implementation offollowedBy
, and accept theorElse
parameter onsingleWhere
.
- BREAKING CHANGE: Deleted
createTimer
andcreateTimerPeriodic
, which were deprecated in 0.26.0. - BREAKING CHANGE: Deleted
reverse
, which was deprecated in 0.25.0. - BREAKING CHANGE: Deleted
FutureGroup
, which was deprecated in 0.25.0. - BREAKING CHANGE:
InfiniteIterable.singleWhere
now throwsUnsupportedError
.
- Fix: Eliminate a bug where
LruMap
linkage is incorrectly preserved when items are removed.
- Remove use of
Maps.mapToString
inLruMap
. - Add
@visibleForTesting
annotation inAvlTreeSet
.
- BREAKING CHANGE: The signature of
MultiMap
'supdate
stub has changed fromV update(K key, C update(C value), {C ifAbsent()})
toC update(K key, C update(C value), {C ifAbsent()})
.
- BREAKING CHANGE: all classes that implement
Iterable
,List
,Map
,Queue
,Set
, orTimer
now implement stubs of upcoming Dart 2.0 methods. Any class that reimplements these classes also needs new method implementations. The classes with these breaking changes include:HashBiMap
,DelegatingIterable
,DelegatingList
,DelegatingMap
,DelegatingQueue
,DelegatingSet
,LinkedLruHashMap
,TreeSet
, andAvlTreeSet
. - Fix: Use FIFO ordering in
FakeAsync
. PR #265
- Fix: re-adding the most-recently-used entry to a
LinkedLruHashMap
previously introduced a loop in the internal linked list. - Fix: when removing an entry in the middle of the
LinkedLruHashMap
, the recency list was not correctly re-linked.
- Fix: when removing the last item,
LinkedLruHashMap
was put into a state such that the next cache eviction could cause a null-pointer exception. Issue #385. - Fix: strong mode fix when calling
merge
on the empty set of iterables. PR #384.
- BREAKING CHANGE: eliminated deprecated
flip
. Replaced byreverse
in 0.25.0. - BREAKING CHANGE: eliminated deprecated
repeat
. Deprecated in 0.25.0. Callers should useString
's*
operator. - BREAKING CHANGE:
collect
,concat
,doWhileAsync
,enumerate
,extent
,forEachAsync
,max
,merge
,min
,reduceAsync
, andzip
are now type parameterized. Depending on the inferred value of each type parameter, the return type of each function may change in existing code. - BREAKING CHANGE:
Optional
's==
operator now takes into accountT
, the type of the value. This changes, e.g.Optional<int>.absent()
to no longer be equal toOptional<String>.absent()
. - BREAKING CHANGE: stronger generics added in
Cache
andMapCache
. - Deprecated:
reverse
in thestrings
library. No replacement is provided. - Deprecated:
createTimer
,createTimerPeriodic
in theasync
library. These were originally written to support FakeTimer, which is superseded by FakeAsync. - New: Added
isLeapYear
,daysInMonth
,clampDayOfMonth
APIs in thetime
library. - Multimap is now backed by a LinkedHashMap rather than HashMap.
- Multimap: added
contains
to know if an association key/value exists.
- BREAKING CHANGE: minimum SDK constraint increased to 1.21.0. This allows use of async-await and generic function in Quiver.
- BREAKING CHANGE: eliminated deprecated
FakeTimer
. - BREAKING CHANGE:
StreamBuffer<T>
now implementsStreamConsumer<T>
as opposed toStreamConsumer<T|List<T>>
. - Deprecated:
FutureGroup
. Use the replacement inpackage:async
which requires aclose()
call to trigger auto-completion when the count of pending tasks drops to 0. - Deprecated:
repeat
in thestrings
library. Use the*
operator on the String class. - Deprecated: in the strings library,
flip
has been renamedreverse
.flip
is deprecated and will be removed in the next release. - Iterables:
enumerate
is now generic. - Collection: added
indexOf
.
- BREAKING CHANGE: eliminated deprecated
nullToEmpty
,emptyToNull
. - Fix: Strong mode: As of Dart SDK 1.21.0,
Set.difference
takes aSet<Object>
parameter.
- Strings:
nullToEmpty
,emptyToNull
deprecated. Removal in 0.24.0. - BREAKING CHANGE: eliminated deprecated multimap
toMap
. - BREAKING CHANGE: eliminated deprecated
pad*
,trim*
string functions.
- BREAKING CHANGE:
streams
andasync
libraries have been merged into oneasync
library - BREAKING CHANGE: Pre-1.8.0 SDKs are no longer supported.
- Quiver is now strong mode compliant
- New:
Optional
now implementsIterable
and its methods are generic (using temporary syntax) - New:
isNotEmpty
andisDigit
instrings.dart
- New:
Multimap.fromIterable
- Fix: Change
TreeSearch
fromclass
toenum
. - Fix:
fake_async.dart
timers are now active while executing the callback
- Add stats reporting for fake async tests. You can query the number of pending
microtasks and timers via
microtaskCount
,periodicTimerCount
,nonPeriodicTimerCount
.
- Switch from unittest to test.
- Bugfix: fixed return type on some methods (e.g.
where
ofIterable
s returned by Multimap.
- Bugfix: fix drifting times in
Metronome
. - Add
LruMap
to quiver/collection. - Un-deprecate Glob; feedback was that package:glob was not a suitable replacement in many cases. Key reasons: dependency on dart:io and significantly poorer performance.
- Add optional start param to
Glob.allMatches()
to match superclass method signature. - Add optional start param to
Pattern
returned bymatchesAny()
to match superclass method signature. - Deprecate Glob. Use package:glob. Will be removed in 0.22.0.
- Travis CI integration support added.
- Document that the deprecated functions
padLeft
,padRight
,trimLeft
,trimRight
will be removed in 0.22.0.
- Fix hanging
FakeAsync
unit test.
- Replace
equalsTester
dependency onunittest
with finer-grained dependency onmatcher
. path
is now a dev dependency.
- Multimap:
toMap()
is deprecated and replaced withasMap()
.toMap()
will be removed in v0.22.0. - Cleanup method signatures that were inconsistent with the core library.
- Added
areEqualityGroups
matcher for testingoperator==
andhashCode
. - CONTRIBUTING.md added.
- Multimap: better
toString()
on returned collections. - Multimap: Bugfix: support edits on empty value collections.
- Multimap: Added missing return statement in
fold
. - Added isEmpty() in
strings
. - Added max SDK constraint <2.0.0
- Minor updates to README.md.
- CHANGELOG.md added
- Corrected version constraint suggestion in README.md.