Skip to content

Commit

Permalink
fix: improve leveldb testing (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
elribonazo authored Jan 1, 2025
2 parents e70a1c6 + 3f79812 commit b7c6fff
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 30 deletions.
3 changes: 2 additions & 1 deletion packages/ridb-level/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ umd/*
.idea
coverage
build
node_modules
node_modules
.db
6 changes: 6 additions & 0 deletions packages/ridb-level/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## @trust0/ridb-level [1.0.9-rc.1](https://github.com/trust0-project/RIDB/compare/@trust0/ridb-level@1.0.8...@trust0/ridb-level@1.0.9-rc.1) (2025-01-01)

### Bug Fixes

* improve testing for leveldb package ([a28b26f](https://github.com/trust0-project/RIDB/commit/a28b26f6d80bb83c7d8b4cdd0fa537e5cbf3d353))

## @trust0/ridb-level [1.0.8](https://github.com/trust0-project/RIDB/compare/@trust0/ridb-level@1.0.7...@trust0/ridb-level@1.0.8) (2025-01-01)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/ridb-level/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@trust0/ridb-level",
"version": "1.0.8",
"version": "1.0.9-rc.1",
"description": "Level DB wrapper for RIDB.",
"main": "./build/index.js",
"types": "./build/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/ridb-level/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*
* # SDK Rerefence
*/
import path from 'path';
import { RIDB } from "@trust0/ridb";
import type {
SchemaTypeRecord,
Expand Down Expand Up @@ -46,7 +47,7 @@ export class LevelDB<T extends SchemaTypeRecord> extends BaseStorage<T> {
}
constructor(Level: typeof ClassicLevel, name: string, schemas: T, options: any) {
super(name, schemas, options);
this.db = new Level(name);
this.db = new Level(path.resolve(process.cwd(), "./.db/" + name));
}
/** Start the database */
async start(): Promise<void> {
Expand Down
Loading

0 comments on commit b7c6fff

Please sign in to comment.