Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for Dart-2.5 #162

Merged
merged 3 commits into from
Sep 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#Recent change notes

### 0.3.5
* Updates for Dart 2.5 compatibility. As of Dart 2.5, the `Socket` class
emits `Uint8List`, rather than plain `List<int>`, so some fixes were necessary
to allow the package to continue to function.
* Courtesy of @a14n, thank you!
* Resolves https://github.com/mongo-dart/mongo_dart/issues/160, among other issues.

### 0.3.4
* Added `cursor` option to `DbCollection.aggregate`.
* Courtesy of @jodinathan, thank you!
Expand Down
5 changes: 2 additions & 3 deletions lib/src/network/connection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ class _Connection {
Socket.connect(serverConfig.host, serverConfig.port).then((Socket _socket) {
// Socket connected.
socket = _socket;
_repliesSubscription = socket
.transform(MongoMessageHandler().transformer)
.listen(_receiveReply,
_repliesSubscription =
MongoMessageHandler().transformer.bind(socket).listen(_receiveReply,
onError: (e, st) {
_log.severe("Socket error ${e} ${st}");
//completer.completeError(e);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mongo_dart
version: 0.3.4
version: 0.3.5
authors:
- Vadim Tsushko <[email protected]>
- Ted Sander <[email protected]>
Expand Down
3 changes: 2 additions & 1 deletion test/database_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,8 @@ main() {
});

group('Aggregate:', () {
test('testAggregate', testAggregate);
test('testAggregate', testAggregate,
skip: 'As of MongoDB 3.6, cursor is *required* for aggregate.');
test('testAggregateWithCursor', testAggregateWithCursor);
test(
'testAggregateToStream - if server older then version 2.6 test would be skipped',
Expand Down