Skip to content

Commit 2055313

Browse files
committed
Fix dart analyze issues.
1 parent 29f3338 commit 2055313

17 files changed

+61
-94
lines changed

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
# 0.5.2
2+
3+
* Fixed dart analyze issues.
4+
* Updated dependencies.
5+
16
# 0.5.1
27

38
* Added `reference` property in `Field` class.
49

510
# 0.5.0
611

712
* Added support for nested object fields.
8-
* Updated dependencies.cd
13+
* Updated dependencies.
914

1015
# 0.4.0
1116

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Add `typesense` as a [dependency in your pubspec.yaml file](https://flutter.dev/
1212

1313
```@yaml
1414
dependencies:
15-
typesense: ^0.5.1
15+
typesense: ^0.5.2
1616
```
1717

1818
## Usage

analysis_options.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include: package:lints/core.yaml
1+
include: package:lints/recommended.yaml

example/console-simple/pubspec.lock

+31-47
Original file line numberDiff line numberDiff line change
@@ -5,136 +5,120 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
sha256: db4766341bd8ecb66556f31ab891a5d596ef829221993531bd64a8e6342f0cda
8+
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "2.8.2"
12-
charcode:
13-
dependency: transitive
14-
description:
15-
name: charcode
16-
sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306
17-
url: "https://pub.dev"
18-
source: hosted
19-
version: "1.3.1"
11+
version: "2.12.0"
2012
collection:
2113
dependency: transitive
2214
description:
2315
name: collection
24-
sha256: "6d4193120997ecfd09acf0e313f13dc122b119e5eca87ef57a7d065ec9183762"
16+
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
2517
url: "https://pub.dev"
2618
source: hosted
27-
version: "1.15.0"
19+
version: "1.19.1"
2820
crypto:
2921
dependency: transitive
3022
description:
3123
name: crypto
32-
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
33-
url: "https://pub.dev"
34-
source: hosted
35-
version: "3.0.3"
36-
flutter_lints:
37-
dependency: "direct dev"
38-
description:
39-
name: flutter_lints
40-
sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493
24+
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
4125
url: "https://pub.dev"
4226
source: hosted
43-
version: "1.0.4"
27+
version: "3.0.6"
4428
http:
4529
dependency: transitive
4630
description:
4731
name: http
48-
sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
32+
sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f
4933
url: "https://pub.dev"
5034
source: hosted
51-
version: "1.2.1"
35+
version: "1.3.0"
5236
http_parser:
5337
dependency: transitive
5438
description:
5539
name: http_parser
56-
sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185
40+
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
5741
url: "https://pub.dev"
5842
source: hosted
59-
version: "4.0.0"
43+
version: "4.1.2"
6044
lints:
61-
dependency: transitive
45+
dependency: "direct dev"
6246
description:
6347
name: lints
64-
sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c
48+
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
6549
url: "https://pub.dev"
6650
source: hosted
67-
version: "1.0.1"
51+
version: "5.1.1"
6852
logging:
6953
dependency: "direct main"
7054
description:
7155
name: logging
72-
sha256: "0520a4826042a8a5d09ddd4755623a50d37ee536d79a70452aff8c8ad7bb6c27"
56+
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
7357
url: "https://pub.dev"
7458
source: hosted
75-
version: "1.0.1"
59+
version: "1.3.0"
7660
meta:
7761
dependency: transitive
7862
description:
7963
name: meta
80-
sha256: "5202fdd37b4da5fd14a237ed0a01cad6c1efd4c99b5b5a0d3c9237f3728c9485"
64+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
8165
url: "https://pub.dev"
8266
source: hosted
83-
version: "1.7.0"
67+
version: "1.16.0"
8468
path:
8569
dependency: transitive
8670
description:
8771
name: path
88-
sha256: "2ad4cddff7f5cc0e2d13069f2a3f7a73ca18f66abd6f5ecf215219cdb3638edb"
72+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
8973
url: "https://pub.dev"
9074
source: hosted
91-
version: "1.8.0"
75+
version: "1.9.1"
9276
source_span:
9377
dependency: transitive
9478
description:
9579
name: source_span
96-
sha256: d5f89a9e52b36240a80282b3dc0667dd36e53459717bb17b8fb102d30496606a
80+
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
9781
url: "https://pub.dev"
9882
source: hosted
99-
version: "1.8.1"
83+
version: "1.10.1"
10084
string_scanner:
10185
dependency: transitive
10286
description:
10387
name: string_scanner
104-
sha256: dd11571b8a03f7cadcf91ec26a77e02bfbd6bbba2a512924d3116646b4198fc4
88+
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
10589
url: "https://pub.dev"
10690
source: hosted
107-
version: "1.1.0"
91+
version: "1.4.1"
10892
term_glyph:
10993
dependency: transitive
11094
description:
11195
name: term_glyph
112-
sha256: a88162591b02c1f3a3db3af8ce1ea2b374bd75a7bb8d5e353bcfbdc79d719830
96+
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
11397
url: "https://pub.dev"
11498
source: hosted
115-
version: "1.2.0"
99+
version: "1.2.2"
116100
typed_data:
117101
dependency: transitive
118102
description:
119103
name: typed_data
120-
sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee"
104+
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
121105
url: "https://pub.dev"
122106
source: hosted
123-
version: "1.3.0"
107+
version: "1.4.0"
124108
typesense:
125109
dependency: "direct main"
126110
description:
127111
path: "../.."
128112
relative: true
129113
source: path
130-
version: "0.5.1"
114+
version: "0.5.2"
131115
web:
132116
dependency: transitive
133117
description:
134118
name: web
135-
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
119+
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
136120
url: "https://pub.dev"
137121
source: hosted
138-
version: "0.5.1"
122+
version: "1.1.0"
139123
sdks:
140-
dart: ">=3.3.2 <4.0.0"
124+
dart: ">=3.6.1 <4.0.0"

example/console-simple/pubspec.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ version: 0.2.0
44
publish_to: none
55

66
environment:
7-
sdk: '>=2.17.0 <3.0.0'
7+
sdk: ^3.6.1
88

99
dependencies:
1010
typesense:
1111
path: ../../
12-
logging: ^1.0.1
12+
logging: ^1.3.0
1313

1414
dev_dependencies:
15-
flutter_lints: ^1.0.4
15+
lints: ^5.1.1

lib/src/exceptions/exceptions.dart

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
library exceptions;
2-
31
part 'typesense_exception.dart';
42

53
part 'import_error.dart';

lib/src/exceptions/request_exceptions/http_error.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ part of '../exceptions.dart';
33
/// The request has failed because of some network layer issues like
44
/// connection timeouts, etc.
55
class HttpError extends RequestException {
6-
HttpError(String message, int statusCode) : super(message, statusCode);
6+
HttpError(super.message, super.statusCode);
77

88
@override
99
String toString() {

lib/src/exceptions/request_exceptions/server_error.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ part of '../exceptions.dart';
22

33
/// 5xx server errors
44
class ServerError extends RequestException {
5-
ServerError(String message, int statusCode) : super(message, statusCode);
5+
ServerError(super.message, super.statusCode);
66

77
@override
88
String toString() {

lib/src/models/field.dart

-3
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,6 @@ extension _Type on Type {
284284

285285
case Type.stringify:
286286
return 'string*';
287-
288-
default:
289-
return '';
290287
}
291288
}
292289

lib/src/models/models.dart

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
library models;
2-
31
import 'package:http/http.dart' as http;
42
import '../exceptions/exceptions.dart';
53

lib/src/models/schema.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class Schema extends BaseSchema {
8787
}
8888

8989
class UpdateSchema extends BaseSchema {
90-
UpdateSchema(Set<UpdateField> fields) : super(fields);
90+
UpdateSchema(Set<UpdateField> super.fields);
9191

9292
factory UpdateSchema.fromMap(Map<String, dynamic> map) {
9393
final Set<UpdateField> fields = (map['fields'] != null)

lib/src/services/api_call.dart

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import 'dart:collection';
55
import 'package:http/http.dart' as http;
66

77
import 'base_api_call.dart';
8-
import 'node_pool.dart';
98
import 'request_cache.dart';
109
import '../configuration.dart';
1110
import '../models/models.dart';
@@ -17,9 +16,8 @@ export 'base_api_call.dart' show contentType;
1716
class ApiCall extends BaseApiCall<Map<String, dynamic>> {
1817
final RequestCache _requestCache;
1918

20-
ApiCall(Configuration config, NodePool nodePool, RequestCache requestCache)
21-
: _requestCache = requestCache,
22-
super(config, nodePool);
19+
ApiCall(super.config, super.nodePool, RequestCache requestCache)
20+
: _requestCache = requestCache;
2321

2422
/// Sends an HTTP GET request to the URL constructed using the [Node.uri],
2523
/// [endpoint] and [queryParams].

lib/src/services/collections_api_call.dart

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@ import 'dart:async';
22
import 'dart:convert';
33

44
import './base_api_call.dart';
5-
import './node_pool.dart';
6-
import '../configuration.dart';
75

86
export './base_api_call.dart' show contentType;
97

108
/// Handles requests that expect JSON data of `List<Map<String, dynamic>>` type
119
/// from the server.
1210
class CollectionsApiCall extends BaseApiCall<List<Map<String, dynamic>>> {
13-
CollectionsApiCall(Configuration config, NodePool nodePool)
14-
: super(config, nodePool);
11+
CollectionsApiCall(super.config, super.nodePool);
1512

1613
/// Sends an HTTP GET request to the URL constructed using the [Node.uri],
1714
/// [endpoint] and [queryParams].

lib/src/services/documents_api_call.dart

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import 'dart:async';
22

33
import './base_api_call.dart';
4-
import './node_pool.dart';
5-
import '../configuration.dart';
64

75
export './base_api_call.dart' show contentType;
86

97
/// Handles requests that expect JSONL data of `String` type from the server.
108
class DocumentsApiCall extends BaseApiCall<String> {
11-
DocumentsApiCall(Configuration config, NodePool nodePool)
12-
: super(config, nodePool);
9+
DocumentsApiCall(super.config, super.nodePool);
1310

1411
/// Sends an HTTP GET request to the URL constructed using the [Node.uri],
1512
/// [endpoint] and [queryParams].

lib/typesense.dart

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
library typesense;
2-
31
export 'src/client.dart';
42
export 'src/search_client.dart';
53
export 'src/configuration.dart';

pubspec.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name: typesense
22
description: Dart client library for accessing the HTTP API of Typesense search engine.
3-
version: 0.5.1
3+
version: 0.5.2
44
repository: https://github.com/typesense/typesense-dart
55

66
environment:
7-
sdk: ^3.3.2
7+
sdk: ^3.6.1
88

99
dependencies:
10-
http: ^1.2.1
11-
crypto: ^3.0.3
10+
http: ^1.3.0
11+
crypto: ^3.0.6
1212

1313
dev_dependencies:
14-
test: ^1.25.2
15-
mockito: ^5.4.4
16-
lints: ^3.0.0
17-
build_runner: ^2.4.8
18-
analyzer: ^6.4.1
14+
test: ^1.25.14
15+
mockito: ^5.4.5
16+
lints: ^5.1.1
17+
build_runner: ^2.4.14
18+
analyzer: ^7.2.0

test/test_utils.dart

+3-8
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import 'package:typesense/src/models/models.dart';
99
import 'package:typesense/src/services/api_call.dart';
1010
import 'package:typesense/src/services/documents_api_call.dart';
1111
import 'package:typesense/src/services/collections_api_call.dart';
12-
import 'package:typesense/src/services/request_cache.dart';
13-
import 'package:typesense/src/services/node_pool.dart';
1412

1513
final String host = InternetAddress.loopbackIPv4.address;
1614
const protocol = Protocol.http,
@@ -118,22 +116,19 @@ class ConfigurationFactory {
118116
customMocks: [MockSpec<GenerateMockApiCall>(as: #MockApiCall)])
119117
class GenerateMockApiCall extends ApiCall {
120118
GenerateMockApiCall(
121-
Configuration config, NodePool nodePool, RequestCache requestCache)
122-
: super(config, nodePool, requestCache);
119+
super.config, super.nodePool, super.requestCache);
123120
}
124121

125122
@GenerateMocks([], customMocks: [
126123
MockSpec<GenerateMockCollectionsApiCall>(as: #MockCollectionsApiCall)
127124
])
128125
class GenerateMockCollectionsApiCall extends CollectionsApiCall {
129-
GenerateMockCollectionsApiCall(Configuration config, NodePool nodePool)
130-
: super(config, nodePool);
126+
GenerateMockCollectionsApiCall(super.config, super.nodePool);
131127
}
132128

133129
@GenerateMocks([], customMocks: [
134130
MockSpec<GenerateMockDocumentsApiCall>(as: #MockDocumentsApiCall)
135131
])
136132
class GenerateMockDocumentsApiCall extends DocumentsApiCall {
137-
GenerateMockDocumentsApiCall(Configuration config, NodePool nodePool)
138-
: super(config, nodePool);
133+
GenerateMockDocumentsApiCall(super.config, super.nodePool);
139134
}

0 commit comments

Comments
 (0)