Skip to content

Commit ce5d565

Browse files
bors[bot]meili-botbrunoocasali
authored
Merge #288
288: Update version for the next release (v0.11.0) r=brunoocasali a=meili-bot _This PR is auto-generated._ The automated script updates the version of meilisearch-dart to a new version: "v0.11.0" Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com> Co-authored-by: Bruno Casali <brunoocasali@gmail.com>
2 parents 96984f6 + f9bc2d7 commit ce5d565

File tree

6 files changed

+32
-5
lines changed

6 files changed

+32
-5
lines changed

CHANGELOG.md

+27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
[comment]: <> (All notable changes to this project will be documented in this file.)
22

3+
# 0.11.0
4+
### Breaking Changes:
5+
6+
- Changes `Searcheable`, `SearchResult`, `PaginatedSearchResult` signatures to be generic `Searcheable<T>`, `SearchResult<T>`, `PaginatedSearchResult<T>`
7+
- Adds a new `map<TOther>` method to `Searcheable<T>` and its subclasses to map the search result to a different type.
8+
- All search operations produce `Searcheable<Map<String, dynamic>>` by default, which can be mapped to other types using the `map<TOther>` method.
9+
- Revert some of the `Object?` types that were changed from `dynamic`:
10+
- `MeiliSearchClient` class `Future<Map<String, dynamic>> health();`
11+
- `HttpRequest` class `Map<String, dynamic> headers();`
12+
- `MeiliSearchIndex` class `Future<Searcheable<Map<String, dynamic>>> search(...);`
13+
- `MeiliSearchIndex` class`Future<Map<String, dynamic>?> getDocument(Object id, {List<String> fields});`
14+
- `MeiliSearchIndex` class `Future<Result<Map<String, dynamic>>> getDocuments({DocumentsQuery? params});`
15+
- `Searcheable<T>.hits` is non-nullable now, and defaults to `const []`
16+
17+
### Changes:
18+
19+
- Introduced new extension methods to help consumers cast `Future<Searchable<T>>` to the corresponding type:
20+
```dart
21+
final result = await index.search('').then((value) => (value as SearchResult<Map<String, dynamic>>).map(BookDto.fromMap));
22+
final resultPaginated = await index.search('').then((value) => (value as PaginatedSearchResult<Map<String, dynamic>>).map(BookDto.fromMap));
23+
```
24+
to:
25+
```dart
26+
final result = await index.search('').asSearchResult().map(BookDto.fromMap);
27+
final resultPaginated = await index.search('').asPaginatedResult().map(BookDto.fromMap);
28+
```
29+
330
# 0.10.2
431
### Changes:
532

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ You can install the **meilisearch** package by adding a few lines into `pubspec.
4848

4949
```yaml
5050
dependencies:
51-
meilisearch: ^0.10.2
51+
meilisearch: ^0.11.0
5252
```
5353
5454
Then open your terminal and update dart packages.

example/pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ packages:
3535
path: ".."
3636
relative: true
3737
source: path
38-
version: "0.10.2"
38+
version: "0.11.0"
3939
path:
4040
dependency: transitive
4141
description:

example/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ environment:
66
sdk: ">=2.12.0 <3.0.0"
77

88
dependencies:
9-
meilisearch: "0.10.2"
9+
meilisearch: "0.11.0"
1010

1111
dependency_overrides:
1212
meilisearch:

lib/src/version.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Version {
2-
static const String current = '0.10.2';
2+
static const String current = '0.11.0';
33

44
static String get qualifiedVersion {
55
return "Meilisearch Dart (v$current)";

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: meilisearch
22
description: Meilisearch Dart is the Meilisearch API client for Dart and Flutter developers.
3-
version: 0.10.2
3+
version: 0.11.0
44
homepage: https://meilisearch.com
55
repository: https://github.com/meilisearch/meilisearch-dart
66
issue_tracker: https://github.com/meilisearch/meilisearch-dart/issues

0 commit comments

Comments
 (0)