Skip to content

Commit ef18c90

Browse files
committed
feat: ready for 1.0.0-beta.14+9 released
1 parent 361e8da commit ef18c90

File tree

10 files changed

+13
-13
lines changed

10 files changed

+13
-13
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Changes to the project are tracked using build numbers behind the version number
1111

1212
## [Unreleased]
1313

14+
## [1.0.0-beta.14+9] - 2024-07-17
15+
- Feat: Added `SurrealWasm.getInstance()` to simplify instantiation of the `Surreal` class with the `WasmEngine`.
16+
1417
## [1.0.0-beta.14+8] - 2024-07-17
1518

1619
- Feat: Upgraded surrealdb.wasm to 1.0.0-beta.14.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Please refer to the [surrealdb_js](https://pub.dev/packages/surrealdb_js#-featur
6262
import 'package:surrealdb_js/surrealdb_js.dart';
6363
import 'package:surrealdb_wasm/surrealdb_wasm.dart';
6464
65-
final db = Surreal({'engines': WasmEngine()});
65+
final db = SurrealWasm.getInstance();
6666
6767
await db.connect('indxdb://surreal');
6868
await db.use(namespace: 'test', database: 'test');

RELEASE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
- Feat: Upgraded surrealdb.wasm to 1.0.0-beta.14.
2-
- Feat: Integrated with surrealdb_js 1.0.0-beta.14+3 that provide an unified API.
1+
- Feat: Added `SurrealWasm.getInstance()` to simplify instantiation of the `Surreal` class with the `WasmEngine`.

example/lib/main.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'package:flutter/material.dart';
2-
import 'package:surrealdb_js/surrealdb_js.dart';
32
import 'package:surrealdb_wasm/surrealdb_wasm.dart';
43
import 'package:flutter_console_widget/flutter_console.dart';
54

@@ -34,7 +33,7 @@ class HomePage extends StatefulWidget {
3433

3534
class _HomePageState extends State<HomePage> {
3635
final FlutterConsoleController controller = FlutterConsoleController();
37-
final db = Surreal({'engines': WasmEngine()});
36+
final db = SurrealWasm.getInstance();
3837
static const commandSymbol = '>';
3938

4039
Future<dynamic> execute(Function function, [String? message]) async {

example/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ dependencies:
1212

1313
flutter_console_widget:
1414
path: flutter_console_widget
15-
surrealdb_wasm: ^1.0.0-beta.14+8
15+
surrealdb_js: ^1.0.0-beta.14+3
16+
surrealdb_wasm: ^1.0.0-beta.14+9
1617

1718
dev_dependencies:
1819
flutter_test:

integration_test/patch_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import 'package:flutter_test/flutter_test.dart';
22
import 'package:integration_test/integration_test.dart';
3-
import 'package:surrealdb_js/surrealdb_js.dart';
43
import 'package:surrealdb_wasm/surrealdb_wasm.dart';
54

65
void main({bool wasm = false}) {
76
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
87

9-
final db = Surreal({'engines': WasmEngine()});
8+
final db = SurrealWasm.getInstance();
109

1110
setUpAll(() async {
1211
if (wasm) {

integration_test/surrealdb_wasm_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ import 'dart:typed_data';
33

44
import 'package:flutter_test/flutter_test.dart';
55
import 'package:integration_test/integration_test.dart';
6-
import 'package:surrealdb_js/surrealdb_js.dart';
76
import 'package:surrealdb_wasm/surrealdb_wasm.dart';
87

98
void main({bool wasm = false}) {
109
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
1110

12-
final db = Surreal({'engines': WasmEngine()});
11+
final db = SurrealWasm.getInstance();
1312
//Tests run with local SurrealDB instance started with the command below:
1413
//surreal start memory --log trace --allow-all --auth --user root --pass root
1514
setUpAll(() async {

integration_test/transaction_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'package:surrealdb_wasm/surrealdb_wasm.dart';
1010
void main({bool wasm = false}) {
1111
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
1212

13-
final db = Surreal({'engines': WasmEngine()});
13+
final db = SurrealWasm.getInstance();
1414

1515
setUpAll(() async {
1616
if (wasm) {

lib/src/js.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// ignore_for_file: public_member_api_docs
2-
31
import 'dart:js_interop';
42

53
/// `WasmEngine` class for the `Surreal` class of the `surrealdb_js` package.
64
extension type WasmEngine._(JSObject _) implements JSObject {
5+
/// constructor with no arguments
76
external WasmEngine();
87
}

lib/surrealdb_wasm.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
library surrealdb_wasm;
33

44
export 'src/js.dart';
5+
export 'src/surreal_extension.dart';

0 commit comments

Comments
 (0)