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 npm project setup has been added to build such versions using rollup and to manage dependencies for these environments.

Supported environments

Requirements

  • Deno
  • npm
  • NodeJS

Build for all supported environments

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

npm run build.

To watch for and auto rebuild changes:

npm run dev.

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).