Skip to content

Commit

Permalink
remove dart:io dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
tshedor committed Dec 27, 2024
1 parent 2152211 commit 0ec59a0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/brick_graphql/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
sdk: ">=2.18.0 <4.0.0"

dependencies:
brick_core: ^1.2.1
brick_core: ^1.3.0
collection: ">=1.15.0 <2.0.0"
gql: ">=0.13.0 <2.0.0"
gql_exec: ">=0.3.0 <2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/brick_json_generators/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ environment:
dependencies:
analyzer: ">=6.0.0 <7.0.0"
brick_build: ">=3.0.0 <4.0.0"
brick_core: ^1.1.1
brick_core: ^1.3.0
build: ">=2.0.0 <3.0.0"
dart_style: ">=2.0.0 <3.0.0"
source_gen: ">=1.2.2 <2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/brick_rest/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
sdk: ">=2.18.0 <4.0.0"

dependencies:
brick_core: ^1.2.1
brick_core: ^1.3.0
http: ">=1.0.0 <2.0.0"
logging: ">=1.0.0 <2.0.0"
meta: ">=1.3.0 <2.0.0"
Expand Down
4 changes: 4 additions & 0 deletions packages/brick_sqlite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Unreleased

## 3.2.1

- Remove `dart:io` dependency

## 3.2.0

- **DEPRECATION** `Query(providerArgs: {'collate':})` is now `Query(forProviders: [SqliteProviderQuery(collate:)])`
Expand Down
16 changes: 5 additions & 11 deletions packages/brick_sqlite/lib/src/sqlite_provider.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:io';

import 'package:brick_core/core.dart';
import 'package:brick_sqlite/src/db/migration.dart';
import 'package:brick_sqlite/src/db/migration_commands/insert_table.dart';
Expand Down Expand Up @@ -250,17 +248,13 @@ class SqliteProvider<TProviderModel extends SqliteModel> implements Provider<TPr
///
/// **WARNING:** This is a destructive, irrevisible action.
Future<void> resetDb() async {
try {
await (await getDb()).close();
await (await getDb()).close();

await databaseFactory.deleteDatabase(dbName);
await databaseFactory.deleteDatabase(dbName);

// recreate
_openDb = null;
await getDb();
} on FileSystemException {
// noop
}
// recreate
_openDb = null;
await getDb();
}

/// Perform actions within a database transaction.
Expand Down
2 changes: 1 addition & 1 deletion packages/brick_sqlite/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_sqlite
issue_tracker: https://github.com/GetDutchie/brick/issues
repository: https://github.com/GetDutchie/brick

version: 3.2.0+1
version: 3.2.0+2

environment:
sdk: ">=2.18.0 <4.0.0"
Expand Down

0 comments on commit 0ec59a0

Please sign in to comment.