Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"@vitest/browser": "^3.0.8",
"@vitest/coverage-istanbul": "^3.0.8",
"@vitest/ui": "^3.0.8",
"chromedriver": "^136.0.0",
"dts-bundle-generator": "^9.5.1",
"esbuild": "^0.25.3",
"esbuild-node-externals": "^1.18.0",
Expand Down Expand Up @@ -69,5 +68,8 @@
"optionalDependencies": {
"@esbuild/darwin-arm64": "^0.25.0",
"@rollup/rollup-linux-x64-gnu": "^4.24.0"
},
"dependencies": {
"chromedriver": "^135.0.0"
}
}
4 changes: 3 additions & 1 deletion packages/ridb-core/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
pkg
target
target

./build
21 changes: 21 additions & 0 deletions packages/ridb-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## 1.7.2 (2025-05-07)

### 🩹 Fixes

- lock issue ([6a5dea5](https://github.com/trust0-project/RIDB/commit/6a5dea5))
- move to cjs modules ([d6c7608](https://github.com/trust0-project/RIDB/commit/d6c7608))

### ❤️ Thank You

- Javier Ribó

## 1.7.1 (2025-05-07)

### 🩹 Fixes

- cleaning packages ([c6fba7e](https://github.com/trust0-project/RIDB/commit/c6fba7e))

### ❤️ Thank You

- Javier Ribó

## 1.7.0 (2025-05-07)

### 🚀 Features
Expand Down
4 changes: 2 additions & 2 deletions packages/ridb-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ crate-type = ["cdylib", "rlib"]

[dependencies]
log = "0.4.20"
wasm-bindgen = { version = "0.2.90", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.40"
wasm-bindgen = { version = "0.2.92", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.42"
console_error_panic_hook = { version = "0.1.1", optional = true }
js-sys = {version="0.3.69", features = []}
serde = { version = "1.0.195", features = ["derive"] }
Expand Down
52 changes: 49 additions & 3 deletions packages/ridb-core/build/ridb_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,54 @@ if (typeof Buffer === 'undefined') {
global.Buffer = require('buffer').Buffer;
}

var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// pkg/ridb_core.js
var ridb_core_exports = {};
__export(ridb_core_exports, {
BasePlugin: () => BasePlugin,
BaseStorage: () => BaseStorage,
Collection: () => Collection,
CoreStorage: () => CoreStorage,
Database: () => Database,
Errors: () => Errors,
InMemory: () => InMemory,
IndexDB: () => IndexDB,
OpType: () => OpType,
Operation: () => Operation,
Property: () => Property,
Query: () => Query,
QueryOptions: () => QueryOptions,
RIDBError: () => RIDBError,
Schema: () => Schema,
WasmBindgenTestContext: () => WasmBindgenTestContext,
__wbgtest_console_debug: () => __wbgtest_console_debug,
__wbgtest_console_error: () => __wbgtest_console_error,
__wbgtest_console_info: () => __wbgtest_console_info,
__wbgtest_console_log: () => __wbgtest_console_log,
__wbgtest_console_warn: () => __wbgtest_console_warn,
default: () => ridb_core_default,
initSync: () => initSync,
is_debug_mode: () => is_debug_mode,
main_js: () => main_js
});
module.exports = __toCommonJS(ridb_core_exports);
var wasm;
var heap = new Array(128).fill(void 0);
heap.push(void 0, null, true, false);
Expand Down Expand Up @@ -3032,7 +3078,8 @@ async function __wbg_init(input) {
return __wbg_finalize_init(instance, module2);
}
var ridb_core_default = __wbg_init;
export {
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
BasePlugin,
BaseStorage,
Collection,
Expand All @@ -3054,8 +3101,7 @@ export {
__wbgtest_console_info,
__wbgtest_console_log,
__wbgtest_console_warn,
ridb_core_default as default,
initSync,
is_debug_mode,
main_js
};
});
25 changes: 22 additions & 3 deletions packages/ridb-core/build/ridb_core_bg.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions packages/ridb-core/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "@trust0/ridb-core",
"description": "RIDB wasm core",
"type": "module",
"publishConfig": {
"access": "public"
},
"version": "1.7.0",
"version": "1.7.2",
"main": "./build/ridb_core.js",
"types": "./build/ridb_core.d.ts",
"exports": {
Expand All @@ -28,7 +27,6 @@
},
"devDependencies": {
"@esbuild-plugins/node-resolve": "^0.2.2",
"chromedriver": "^136.0.0",
"esbuild": "^0.25.3"
},
"files": [
Expand Down
7 changes: 1 addition & 6 deletions packages/ridb-core/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { wasmPlugin } from '../../esbuild.base.js';

export default defineConfig(({ watch }) => ({
entry: ['pkg/ridb_core.js', 'pkg/ridb_core_bg.wasm'],
format: 'esm',
format: 'cjs',
outDir: 'build',
target: 'esnext',
minify: false,
Expand All @@ -26,9 +26,4 @@ global.Buffer = require('buffer').Buffer;
format:'cjs'
} as any
},
outExtension({ format }) {
return {
js: `.js`,
};
},
}));
29 changes: 29 additions & 0 deletions packages/ridb-level/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## 1.2.4 (2025-05-07)

### 🩹 Fixes

- lock issue ([6a5dea5](https://github.com/trust0-project/RIDB/commit/6a5dea5))
- move to cjs modules ([d6c7608](https://github.com/trust0-project/RIDB/commit/d6c7608))

### 🧱 Updated Dependencies

- Updated @trust0/ridb to 1.5.4

### ❤️ Thank You

- Javier Ribó

## 1.2.3 (2025-05-07)

### 🩹 Fixes

- cleaning packages ([c6fba7e](https://github.com/trust0-project/RIDB/commit/c6fba7e))

### 🧱 Updated Dependencies

- Updated @trust0/ridb to 1.5.3

### ❤️ Thank You

- Javier Ribó

## 1.2.2 (2025-05-07)

### 🩹 Fixes
Expand Down
5 changes: 2 additions & 3 deletions packages/ridb-level/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "@trust0/ridb-level",
"version": "1.2.2",
"version": "1.2.4",
"description": "Level DB storage for @trust0/ridb.",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"type": "module",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -32,7 +31,7 @@
"types:default": "npx tsc"
},
"devDependencies": {
"@trust0/ridb": "^1.5.2",
"@trust0/ridb": "^1.5.4",
"classic-level": "^2.0.0",
"jsdom": "^24.1.3",
"uuid": "^11.0.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/ridb-level/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { wasmPlugin } from '../../esbuild.base.js';

export default defineConfig(({ watch }) => ({
entry: ['src/index.ts','src/worker.ts','src/testing/index.ts'],
format: 'esm',
format: 'cjs',
outDir: 'build',
target: 'esnext',
minify: true,
Expand All @@ -18,7 +18,7 @@ export default defineConfig(({ watch }) => ({
options = {
...options,
...generic,
format:'esm',
format:'cjs',
platform: 'node',
entryPoints: ['src/index.ts'],
external: ['buffer', '@trust0/ridb', '@trust0/ridb-core'],
Expand Down
29 changes: 29 additions & 0 deletions packages/ridb-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## 1.2.4 (2025-05-07)

### 🩹 Fixes

- lock issue ([6a5dea5](https://github.com/trust0-project/RIDB/commit/6a5dea5))
- move to cjs modules ([d6c7608](https://github.com/trust0-project/RIDB/commit/d6c7608))

### 🧱 Updated Dependencies

- Updated @trust0/ridb to 1.5.4

### ❤️ Thank You

- Javier Ribó

## 1.2.3 (2025-05-07)

### 🩹 Fixes

- cleaning packages ([c6fba7e](https://github.com/trust0-project/RIDB/commit/c6fba7e))

### 🧱 Updated Dependencies

- Updated @trust0/ridb to 1.5.3

### ❤️ Thank You

- Javier Ribó

## 1.2.2 (2025-05-07)

### 🩹 Fixes
Expand Down
4 changes: 2 additions & 2 deletions packages/ridb-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@trust0/ridb-react",
"description": "React bindings for RIDB.",
"version": "1.2.2",
"version": "1.2.4",
"author": "elribonazo@gmail.com",
"repository": {
"type": "git",
Expand All @@ -27,7 +27,7 @@
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@trust0/ridb": "^1.5.2",
"@trust0/ridb": "^1.5.4",
"@types/react": "^18.2.8",
"@types/react-dom": "^18.2.4",
"jsdom": "^25.0.1",
Expand Down
5 changes: 4 additions & 1 deletion packages/ridb-react/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { RIDB, WasmInternal } from "@trust0/ridb";
import { BasePlugin, MigrationsParameter } from '@trust0/ridb-core';
import { SchemaTypeRecord } from '@trust0/ridb-core';

await WasmInternal();



type DatabaseProps<T extends SchemaTypeRecord> = {
Expand Down Expand Up @@ -32,6 +32,9 @@ export function useDatabase<T extends SchemaTypeRecord>(): RIDB<T> {
export function Database<T extends SchemaTypeRecord>({ children, ...props }: DatabaseComponentProps<T>) {
const dbInit = props as DatabaseProps<T>;
const db = useMemo(() => new RIDB<T>(dbInit), [props]);
useEffect(() => {
WasmInternal();
}, []);
return (
<DatabaseContext.Provider value={db}>
{children}
Expand Down
12 changes: 3 additions & 9 deletions packages/ridb-react/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { wasmPlugin } from '../../esbuild.base.js';

export default defineConfig(({ watch }) => ({
entry: ['src/index.tsx'],
format: 'esm',
format: 'cjs',
outDir: 'build',
target: 'esnext',
minify: true,
Expand All @@ -18,18 +18,12 @@ export default defineConfig(({ watch }) => ({
options = {
...options,
...generic,
format:'esm',
format:'cjs',
platform: 'node',
entryPoints: ['src/index.ts'],
external: ['buffer', '@trust0/ridb', '@trust0/ridb-core'],
banner: {
js: `import { createRequire } from 'module';
import pathWorkaround from 'path';
import {fileURLToPath} from 'url';
const require = createRequire(import.meta.url);
global.__filename = fileURLToPath(import.meta.url);
global.__dirname = pathWorkaround.dirname(__filename);
if (typeof Buffer === 'undefined') {
js: `if (typeof Buffer === 'undefined') {
global.Buffer = require('buffer').Buffer;
}
`}
Expand Down
31 changes: 31 additions & 0 deletions packages/ridb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
## 1.5.4 (2025-05-07)

### 🩹 Fixes

- lock issue ([6a5dea5](https://github.com/trust0-project/RIDB/commit/6a5dea5))
- move to cjs modules ([d6c7608](https://github.com/trust0-project/RIDB/commit/d6c7608))

### 🧱 Updated Dependencies

- Updated @trust0/ridb-core to 1.7.2
- Updated @trust0/ridb-core to 1.7.2

### ❤️ Thank You

- Javier Ribó

## 1.5.3 (2025-05-07)

### 🩹 Fixes

- cleaning packages ([c6fba7e](https://github.com/trust0-project/RIDB/commit/c6fba7e))

### 🧱 Updated Dependencies

- Updated @trust0/ridb-core to 1.7.1
- Updated @trust0/ridb-core to 1.7.1

### ❤️ Thank You

- Javier Ribó

## 1.5.2 (2025-05-07)

### 🩹 Fixes
Expand Down
Loading