From f8fc2fa72f3ad7cad473be6c46616e71930c3572 Mon Sep 17 00:00:00 2001 From: Rody Davis <31253215+rodydavis@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:18:17 -0400 Subject: [PATCH] Switch to sealed class (#10) --- CHANGELOG.md | 4 ++++ lib/src/ast.dart | 2 +- pubspec.yaml | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b268ff5..fa6e61c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.2.0 + +- Make `Query` sealed instead of abstract. + ## 2.1.1 - Updated `petitparser` dependency. diff --git a/lib/src/ast.dart b/lib/src/ast.dart index 0b0ebe9..37270ff 100644 --- a/lib/src/ast.dart +++ b/lib/src/ast.dart @@ -26,7 +26,7 @@ abstract class QueryEvaluator { } /// Base interface for queries. -abstract class Query { +sealed class Query { const Query({ required this.position, }); diff --git a/pubspec.yaml b/pubspec.yaml index 05d66bc..925853b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,11 +2,11 @@ name: query description: > Search query parser to implement customized search. Supports boolean groups, field scopes, ranges, comparisons... -version: 2.1.1 +version: 2.2.0 homepage: https://github.com/isoos/query environment: - sdk: '>=2.17.0 <4.0.0' + sdk: '>=3.0.0 <4.0.0' dependencies: petitparser: ^6.0.0