Skip to content

Commit 34faddd

Browse files
committed
feat: ready for the 1.0.0-beta.14+8 released
1 parent bc7e792 commit 34faddd

File tree

5 files changed

+36
-33
lines changed

5 files changed

+36
-33
lines changed

CHANGELOG.md

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

1212
## [Unreleased]
1313

14+
## [1.0.0-beta.14+8] - 2024-07-17
15+
16+
- Feat: Upgraded surrealdb.wasm to 1.0.0-beta.14.
17+
- Feat: Integrated with surrealdb_js 1.0.0-beta.14+3 that provide an unified API.
18+
1419
## [0.9.0+7] - 2024-03-13
1520

1621
- Feat: Upgraded to surrealdb.wasm 0.9.0, the official release of wasm module of the surrealdb 1.3.0.

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Welcome to the surrealdb_wasm project! We're excited to have you as a potential
2020

2121
### Project Overview
2222

23-
The Flutter SurrealDB WebAssembly (WASM) package is a powerful integration for Flutter, built upon the foundation of [surrealdb.wasm](https://github.com/surrealdb/surrealdb.wasm), the official SurrealDB library for WebAssembly. We value contributions that enhance this project's functionality and maintain its quality.
23+
The Flutter SurrealDB WebAssembly (WASM) package is a powerful integration for Flutter, built upon the foundation of [surrealdb.wasm](https://github.com/surrealdb/surrealdb.wasm), the WebAssembly engine for the SurrealDB JavaScript SDK. Consequently, the [surrealdb_js](https://pub.dev/packages/surrealdb_js) package will provide an unified API for the WebAssembly engine. We value contributions that enhance this project's functionality and maintain its quality.
2424

2525
### Licensing
2626

@@ -32,10 +32,11 @@ Please review our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing. We
3232

3333
### Getting Started
3434

35-
1. Clone the repository: `git clone https://github.com/limcheekin/surrealdb_wasm.git`
35+
1. Fork and clone the repository: https://github.com/limcheekin/surrealdb_wasm/fork
3636
2. Install dependencies: `flutter pub get`
3737
3. Set up your development environments:
38-
- [Download and install Node.js and NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) to build `surrealdb_wasm.js` with the `npm run package` command after making changes to [surrealdb.js](https://github.com/limcheekin/surrealdb_wasm/blob/main/assets/wasm/surrealdb/surrealdb.js).
38+
- [Download and install Node.js and NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) to build `surrealdb_wasm.js` with the `npm run package` command after making changes to [surrealdb.js](https://github.com/limcheekin/surrealdb_wasm/blob/main/assets/wasm/surrealdb/surrealdb.js) file.
39+
- [Install SurrealDB on Linux](https://surrealdb.com/docs/surrealdb/installation/linux).
3940
- Download [Chrome Driver](https://chromedriver.chromium.org/downloads) for integration test execution.
4041

4142
### Contributor Guidelines

README.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]
66
[![License: MIT][license_badge]][license_link]
77

8-
The Flutter SurrealDB WebAssembly (WASM) package is a powerful integration for Flutter, built upon the foundation of [surrealdb.wasm](https://github.com/surrealdb/surrealdb.wasm), the official SurrealDB library for WebAssembly.
8+
The Flutter SurrealDB WebAssembly (WASM) package is a powerful integration for Flutter, built upon the foundation of [surrealdb.wasm](https://github.com/surrealdb/surrealdb.wasm), the WebAssembly engine for the SurrealDB JavaScript SDK. Consequently, the [surrealdb_js](https://pub.dev/packages/surrealdb_js) package will provide an unified API for the WebAssembly engine.
99

1010
## 🔍 Demo
1111

@@ -37,33 +37,32 @@ Install it:
3737
flutter pub get
3838
```
3939

40+
Lastly, add the following code before the `</head>` tag in the `web/index.html` file:
41+
```html
42+
<script type="module">
43+
import { Surreal, StringRecordId } from "/assets/packages/surrealdb_js/assets/js/index.bundled.mjs";
44+
import { surrealdbWasmEngines } from "/assets/packages/surrealdb_wasm/assets/wasm/surrealdb/esm.bundled.js";
45+
46+
// expose the type to the global scope
47+
globalThis.SurrealJS = Surreal;
48+
globalThis.StringRecordId = StringRecordId;
49+
globalThis.WasmEngine = surrealdbWasmEngines;
50+
</script>
51+
```
52+
4053
## ✨ Features
4154

42-
- <input type="checkbox" checked disabled /> [x] `connect()`
43-
- <input type="checkbox" checked disabled /> [x] `use()`
44-
- <input type="checkbox" checked disabled /> [x] `create()`
45-
- <input type="checkbox" checked disabled /> [x] `update()`
46-
- <input type="checkbox" checked disabled /> [x] `merge()`
47-
- <input type="checkbox" checked disabled /> [x] `delete()`
48-
- <input type="checkbox" checked disabled /> [x] `select()`
49-
- <input type="checkbox" checked disabled /> [x] `query()`
50-
- <input type="checkbox" checked disabled /> [x] `transaction()`
51-
- <input type="checkbox" checked disabled /> [x] `set()`
52-
- <input type="checkbox" checked disabled /> [x] `unset()`
53-
- <input type="checkbox" checked disabled /> [x] `signup()`
54-
- <input type="checkbox" checked disabled /> [x] `signin()`
55-
- <input type="checkbox" disabled /> [ ] `invalidate()`
56-
- <input type="checkbox" disabled /> [ ] `authenticate()`
57-
- <input type="checkbox" checked disabled /> [x] `patch()`
58-
- <input type="checkbox" checked disabled /> [x] `version()`
59-
- <input type="checkbox" checked disabled /> [x] `health()`
55+
Please refer to the [surrealdb_js](https://pub.dev/packages/surrealdb_js#-features) package for a comprehensive list of features.
6056

6157
## 🏃 Examples
6258

6359
### Basic
6460

6561
```dart
66-
final db = Surreal();
62+
import 'package:surrealdb_js/surrealdb_js.dart';
63+
import 'package:surrealdb_wasm/surrealdb_wasm.dart';
64+
65+
final db = Surreal({'engines': WasmEngine()});
6766
6867
await db.connect('indxdb://surreal');
6968
await db.use(namespace: 'test', database: 'test');
@@ -79,17 +78,17 @@ final created = db.create('person',
7978
},
8079
);
8180
82-
// created['id']: person:b9eht8bie8abf0vbcfxh
81+
final id = created['id'].toString();
8382
final merged = await db.merge(
84-
created['id'],
83+
id,
8584
{
8685
'marketing': false,
8786
},
8887
);
8988
90-
final tom = await db.select(created['id']);
89+
final tom = await db.select(id);
9190
92-
final deleted = await db.delete(created['id']);
91+
final deleted = await db.delete(id);
9392
```
9493

9594
For more code examples, kindly refer to the [integration test](https://github.com/limcheekin/surrealdb_wasm/blob/main/integration_test/surrealdb_wasm_test.dart) and the [example project](https://github.com/limcheekin/surrealdb_wasm/blob/main/example/lib/main.dart).
@@ -115,7 +114,7 @@ For more code examples, kindly refer to the [integration test of transaction](ht
115114

116115
## 🧑‍💼 Contributing
117116

118-
Contributions are welcome! Please check out the unimplemented features above, issues on the repository, and feel free to open a pull request.
117+
Contributions are welcome! Please check out the unimplemented features or issues on the repository, and feel free to open a pull request.
119118
For more information, please see the [contribution guide](CONTRIBUTING.md).
120119

121120
<a href="https://github.com/limcheekin/surrealdb_wasm/graphs/contributors">

RELEASE.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
- Feat: Upgraded to surrealdb.wasm 0.9.0, the official release of wasm module of the surrealdb 1.3.0.
2-
- Feat: API breaking changes:
3-
- `db.select()` and `db.query()` that return single result, no longer requiring casting to `List` and retrieval by `.first`.
4-
- Fix: Catched the error `Encountered a non-object value in array` within the library, preventing it from being exposed to the user. Reported the bug at [surrealdb.wasm#56](https://github.com/surrealdb/surrealdb.wasm/issues/56).
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.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: surrealdb_wasm
22
description: Flutter SurrealDB WebAssembly(WASM) package
3-
version: 0.9.0
3+
version: 1.0.0-beta.14
44
repository: https://github.com/limcheekin/surrealdb_wasm
55

66
environment:

0 commit comments

Comments
 (0)