diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ffee26..3532855 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,15 +2,14 @@ name: Release Nitrite on: push: - branches: - - release - paths-ignore: - - "README.md" - - "CHANGELOG.md" + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' jobs: - test_linux: - name: Release Nitrite on Ubuntu + publish: + name: Publish Nitrite to pub.dev + permissions: + id-token: write runs-on: ubuntu-latest steps: - name: Checkout @@ -33,8 +32,7 @@ jobs: - name: Generate Docs run: melos run dartdoc - - name: Version Nitrite - run: melos run version - - name: Publish Nitrite - run: melos run publish \ No newline at end of file + run: melos run publish + with: + environment: dizitart \ No newline at end of file diff --git a/examples/nitrite_demo/lib/providers/providers.dart b/examples/nitrite_demo/lib/providers/providers.dart index a0a57e4..71caa5d 100644 --- a/examples/nitrite_demo/lib/providers/providers.dart +++ b/examples/nitrite_demo/lib/providers/providers.dart @@ -20,11 +20,9 @@ Future db(DbRef ref) async { var db = await Nitrite.builder() .loadModule(storeModule) .fieldSeparator('.') + .registerEntityConverter(TodoConverter()) .openOrCreate(username: 'demo', password: 'demo123'); - var mapper = db.config.nitriteMapper as SimpleNitriteMapper; - mapper.registerEntityConverter(TodoConverter()); - return db; } diff --git a/melos.yaml b/melos.yaml index 5a4a38b..73f0280 100644 --- a/melos.yaml +++ b/melos.yaml @@ -83,3 +83,9 @@ scripts: clean: run: melos exec -- flutter clean description: Run `flutter clean` for all packages. + + publish: + run: | + melos run generate && + melos exec --ignore="*demo*" -- dart pub publish --dry-run + description: Run `flutter pub publish` for all packages. \ No newline at end of file diff --git a/packages/nitrite/lib/src/common/persistent_collection.dart b/packages/nitrite/lib/src/common/persistent_collection.dart index bed3640..f00c497 100644 --- a/packages/nitrite/lib/src/common/persistent_collection.dart +++ b/packages/nitrite/lib/src/common/persistent_collection.dart @@ -10,7 +10,7 @@ abstract class PersistentCollection void addProcessor(Processor processor); /// Creates an index on the [fields], if not already exists. - /// If [indexOptions] is [null], it will use default options. + /// If [indexOptions] is `null`, it will use default options. /// /// The default indexing option is - /// diff --git a/packages/nitrite/lib/src/common/write_result.dart b/packages/nitrite/lib/src/common/write_result.dart index 856d363..599fcbd 100644 --- a/packages/nitrite/lib/src/common/write_result.dart +++ b/packages/nitrite/lib/src/common/write_result.dart @@ -5,7 +5,7 @@ import 'package:nitrite/nitrite.dart'; class WriteResult extends Iterable { final List _nitriteIds; - /// Creates a [WriteResult] with the given [nitriteIds]. + /// Creates a [WriteResult] with the given `_nitriteIds`. WriteResult(this._nitriteIds); /// Returns the number of [Document]s affected by the write operation. diff --git a/packages/nitrite/lib/src/store/nitrite_map.dart b/packages/nitrite/lib/src/store/nitrite_map.dart index b071b0c..48535f1 100644 --- a/packages/nitrite/lib/src/store/nitrite_map.dart +++ b/packages/nitrite/lib/src/store/nitrite_map.dart @@ -10,7 +10,7 @@ abstract class NitriteMap extends AttributesAware /// specified key. Future containsKey(Key key); - /// Gets the value mapped with the specified key or [null] otherwise. + /// Gets the value mapped with the specified key or `null` otherwise. Future operator [](Key key); /// Removes all entries in the map. diff --git a/packages/nitrite_hive_adapter/lib/src/store/hive_meta.dart b/packages/nitrite_hive_adapter/lib/src/store/hive_meta.dart index ca917e8..99a9a9e 100644 --- a/packages/nitrite_hive_adapter/lib/src/store/hive_meta.dart +++ b/packages/nitrite_hive_adapter/lib/src/store/hive_meta.dart @@ -1,7 +1,5 @@ -/// DO NOT EDIT THIS FILE EXCEPT TO ENTER INITIAL VERSION AND OTHER META INFO -/// THIS FILE IS AUTOMATICALLY OVER WRITTEN BY MetaUpdate - +/// DO NOT EDIT THIS FILE EXCEPT TO ENTER INITIAL VERSION AND OTHER META INFO +/// THIS FILE IS AUTOMATICALLY OVER WRITTEN BY MetaUpdate Map meta = { - "version":"2.2.3", + "version": "2.2.3", }; - \ No newline at end of file diff --git a/packages/nitrite_hive_adapter/lib/src/store/index.dart b/packages/nitrite_hive_adapter/lib/src/store/index.dart index 816ac33..efef698 100644 --- a/packages/nitrite_hive_adapter/lib/src/store/index.dart +++ b/packages/nitrite_hive_adapter/lib/src/store/index.dart @@ -1 +1 @@ -export 'hive_module.dart'; +export 'hive_module.dart' hide TypeAdapterRegistrar; diff --git a/packages/nitrite_hive_adapter/test/hive_test.dart b/packages/nitrite_hive_adapter/test/hive_test.dart index f60e480..e744b7b 100644 --- a/packages/nitrite_hive_adapter/test/hive_test.dart +++ b/packages/nitrite_hive_adapter/test/hive_test.dart @@ -18,8 +18,7 @@ void main() { String metaDartFileContents = """ /// DO NOT EDIT THIS FILE EXCEPT TO ENTER INITIAL VERSION AND OTHER META INFO -/// THIS FILE IS AUTOMATICALLY OVER WRITTEN BY MetaUpdate - +/// THIS FILE IS AUTOMATICALLY OVER WRITTEN BY MetaUpdate Map meta = { "version":"$version", }; diff --git a/packages/nitrite_spatial/CHANGELOG.md b/packages/nitrite_spatial/CHANGELOG.md index 41cc7d8..effe43c 100644 --- a/packages/nitrite_spatial/CHANGELOG.md +++ b/packages/nitrite_spatial/CHANGELOG.md @@ -1,3 +1,3 @@ -## 0.0.1 +## 1.0.0 -* TODO: Describe initial release. +- Initial version. diff --git a/packages/nitrite_spatial/lib/nitrite_spatial.dart b/packages/nitrite_spatial/lib/nitrite_spatial.dart index c9f8c3b..8bec1e6 100644 --- a/packages/nitrite_spatial/lib/nitrite_spatial.dart +++ b/packages/nitrite_spatial/lib/nitrite_spatial.dart @@ -1,3 +1,4 @@ +///A library for using spatial data in Nitrite database. library nitrite_spatial; export 'src/converter.dart'; diff --git a/packages/nitrite_spatial/lib/src/filter.dart b/packages/nitrite_spatial/lib/src/filter.dart index 4140ba7..af25cc6 100644 --- a/packages/nitrite_spatial/lib/src/filter.dart +++ b/packages/nitrite_spatial/lib/src/filter.dart @@ -94,7 +94,7 @@ class SpatialFluentFilter { SpatialFluentFilter(this._field); - /// Creates a filter that matches documents whose [field] intersects the given [geometry]. + /// Creates a filter that matches documents whose field intersects the given [geometry]. /// /// Example: /// ```dart @@ -104,7 +104,7 @@ class SpatialFluentFilter { return IntersectsFilter(_field, geometry); } - /// Creates a filter that matches documents whose [field] is within the given [geometry]. + /// Creates a filter that matches documents whose field is within the given [geometry]. /// /// Example: /// ```dart @@ -114,7 +114,7 @@ class SpatialFluentFilter { return WithinFilter(_field, geometry); } - /// Creates a filter that matches documents whose [field] is near the given [center] within the given [radius]. + /// Creates a filter that matches documents whose field is near the given [center] within the given [radius]. /// /// Example: /// ```dart diff --git a/packages/nitrite_spatial/pubspec.yaml b/packages/nitrite_spatial/pubspec.yaml index bc0e8e8..c2866fc 100644 --- a/packages/nitrite_spatial/pubspec.yaml +++ b/packages/nitrite_spatial/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: dart_jts: ^0.3.0+1 nitrite: ^1.0.0 - nitrite_hive_adapter: ^1.0.0 + hive: ^2.2.3 dev_dependencies: flutter: @@ -19,8 +19,8 @@ dev_dependencies: sdk: flutter flutter_lints: ^3.0.1 build_runner: ^2.4.7 + nitrite_hive_adapter: ^1.0.0 nitrite_generator: ^1.0.0 - hive: ^2.2.3 path: ^1.8.3 path_provider: ^2.1.1 logging: ^1.0.2