Skip to main content
Deno 2 is finally here 🎉️
Learn more

surrealdb.js

The official SurrealDB library for JavaScript.

Contribution notes

Local setup

This is a Deno project, not NodeJS. For example, this means import paths include the .ts file extension. However, to also support other JavaScript environments, a build has been added to create a npm package that works for NodeJS, Bun, browsers with bundlers.

Supported environments

Requirements

  • Deno
  • npm
  • NodeJS
  • Docker (for e2e tests)
  • Bun (for e2e tests)

Build for all supported environments

For Deno, no build is needed. For all other environments run

deno task build.

Formatting

deno fmt

Linting

deno lint

PRs

Before you commit, please format and lint your code accordingly to check for errors.

Local setup

For local development the Deno extension for VSCode is helpful (hint: local Deno installation required).