Skip to content
🚀 This documentation is for unreal-orm 1.0.0 alpha which requires SurrealDB 2.0 SDK. For use with version 1.x, see here.

v1.0.0-alpha.8

This release introduces a unified --log-level flag for the CLI, upgrades SurrealDB dependencies to surrealdb@2.0.0 and @surrealdb/node@3.0.1, fixes query binding collisions, and deprecates the PARALLEL clause.

A new --log-level option is available on every command, giving you full control over CLI output verbosity:

Terminal window
# Suppress all output except errors (great for CI/automation)
unreal push --log-level silent --embedded memory -y
# Default behavior — spinners, headers, success messages
unreal pull --log-level normal
# Timestamped step-by-step debug logging
unreal diff --log-level debug
LevelBehavior
silentOnly errors and warnings (via stderr)
normalDefault — spinners, headers, success messages
debugTimestamped [DEBUG +Nms] logs at each step

The --log-level option appears in every command’s --help output and is processed automatically before command execution.

Added a DEBUG option to select(), count(), and insert() queries that logs the generated SurrealQL and bindings:

const users = await User.select(db, {
where: eq("city", "NY"),
DEBUG: true, // Logs query string and bindings to console
});

Updated the SurrealLike type to make connect and close optional, ensuring transaction objects can be used wherever a database instance is expected.

  • Debug Instrumentation: Added debug() calls throughout push, pull, diff, mermaid, and connect commands for step-by-step visibility when using --log-level debug.
  • Silent Mode: In silent mode, the update check is skipped entirely, spinners are replaced with no-op stubs, and printer.log() is suppressed.
  • Process Exit Fix: Added process.exit(0) to the postAction hook to prevent the CLI from hanging when @surrealdb/node native engine holds event loop handles after db.close().
  • Test Output Suppression: All E2E test shell invocations now use Bun’s .quiet() method, keeping test runner output clean while still capturing stdout/stderr for assertions.

Replaced Date.now() with an incrementing counter for query binding keys (record_0, table_1, limit_2, etc.). This prevents key collisions when multiple bindings are generated within the same millisecond.

  • Reduced redundant test setup logging with a hasLoggedSetup guard in dbTestUtils.ts.
  • Removed stray console.log in the CRUD integration tests.
  • Added DELETE person cleanup in transaction tests to avoid stale data.

In SurrealDB v3, array<string, 5> now means the array must contain exactly 5 elements, not “up to 5” as in v2. To reflect this, Field.array() now accepts a length option (replacing the deprecated max):

// New: use `length` (recommended)
tags: Field.array(Field.string(), { length: 5 })
// Deprecated: `max` still works but is misleading for v3
tags: Field.array(Field.string(), { max: 5 })

Both generate the same array<string, 5> DDL — the database version determines interpretation.

The parallel option on select() and count() queries is now deprecated. SurrealDB 2.2+ no longer supports the PARALLEL clause — the option is retained for backwards compatibility but is silently ignored. Related debug tests have been removed.

PackageChange
surrealdb^2.0.0-alpha.14^2.0.0
@surrealdb/node2.3.4^3.0.1
  • Package Manager: Migrated workspace from Bun to pnpm (pnpm-workspace.yaml) to resolve monorepo dependency resolution issues.
  • Workspace Config: Switched from wildcard workspace globs to explicit package paths.
PackageVersion
unreal-orm1.0.0-alpha.7 → 1.0.0-alpha.8
@unreal-orm/cli1.0.0-alpha.7 → 1.0.0-alpha.8