Skip to content

Commit 4eaa0ae

Browse files
chore(deps): update dependency dart to v3.5.3 (#3722)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Pierre Millot <[email protected]>
1 parent 3b4b9f7 commit 4eaa0ae

File tree

6 files changed

+20
-21
lines changed

6 files changed

+20
-21
lines changed

clients/algoliasearch-client-dart/packages/client_core/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ dependencies:
1313
dio: ^5.2.1
1414
dev_dependencies:
1515
lints: ^4.0.0
16-
test: ^1.24.3
16+
test: ^1.25.8

config/.dart-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.4
1+
3.5.2

playground/dart/lib/recommend.dart

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,19 @@ void main() async {
99
appId: dotenv['ALGOLIA_APPLICATION_ID']!,
1010
apiKey: dotenv['ALGOLIA_SEARCH_KEY']!,
1111
);
12-
final indexName = dotenv['SEARCH_INDEX']!;
1312

1413
// Creating recommendation requests for different products.
1514
var requests = [
16-
RecommendationRequest(
17-
model: RecommendationModels.relatedProducts,
15+
RelatedProducts(
16+
model: RelatedModel.relatedProducts,
1817
objectID: '6445156',
19-
indexName: indexName,
20-
threshold: 70,
21-
maxRecommendations: 3,
18+
fallbackParameters: FallbackParams(
19+
query: 'iphone',
20+
),
2221
),
23-
RecommendationRequest(
24-
model: RecommendationModels.relatedProducts,
22+
RelatedProducts(
23+
model: RelatedModel.relatedProducts,
2524
objectID: '6443034',
26-
indexName: indexName,
27-
threshold: 70,
28-
maxRecommendations: 3,
2925
)
3026
];
3127

@@ -44,10 +40,6 @@ void main() async {
4440
/// Prints the search hits.
4541
void printRecommendations(GetRecommendationsResponse response) {
4642
final results = response.results;
47-
if (results == null) {
48-
print("No recommendations found");
49-
return;
50-
}
5143

5244
// Loop over each result and map over the search hits,
5345
// converting each hit to a product.

scripts/buildClients.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ async function buildLanguage(language: Language, gens: Generator[], buildType: B
1515
case 'csharp':
1616
await run('dotnet build --configuration Release', { cwd, language });
1717
break;
18+
case 'dart':
19+
if (buildType !== 'snippets') {
20+
// fix the snippets at some point
21+
await run('dart pub get && dart analyze', { cwd, language });
22+
}
23+
break;
1824
case 'go':
1925
await run('go build ./...', { cwd, language });
2026
break;

templates/dart/pubspec.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ dev_dependencies:
2929
json_serializable: ^6.7.0
3030
lints: ^4.0.0
3131
logging: ^1.2.0
32-
test: ^1.24.3
32+
test: ^1.25.8

tests/output/dart/pubspec.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ dependencies:
99
algolia_client_search: ^1.0.0
1010
algolia_client_insights: ^1.0.0
1111
algolia_client_recommend: ^1.0.0
12-
test: ^1.24.3
12+
test: ^1.25.8
1313
collection: ^1.17.2
14-
test_api: ^0.6.0
14+
test_api: ^0.7.3
1515

16+
algolia_client_core: any
1617
dev_dependencies:
17-
lints: ^3.0.0
18+
lints: ^4.0.0

0 commit comments

Comments
 (0)