Skip to content

Latest commit

 

History

History
78 lines (52 loc) · 2.31 KB

CONTRIBUTING.md

File metadata and controls

78 lines (52 loc) · 2.31 KB

Contributing

Setup

Building nodejs bindings requires some extra setup.

For small or first-time contributions, we recommend the dev container method. Prefer to do it yourself? That's fine too!

Using a dev container environment

OpenDAL provides a pre-configured dev container that could be used in Github Codespaces, VSCode, JetBrains, JuptyerLab. Please pick up your favourite runtime environment.

The fastest way is:

Open in GitHub Codespaces

Bring your own toolbox

The nodejs binding requires Node.js@16+ to be built. We recommend using the latest TLS version for development.

OpenDAL provides a .node-version file that specifies the recommended node versions. You can use any compatible tool to install the correct node version, such as fnm.

Alternatively, you can manually install the LTS node by following these steps:

For Ubuntu and Debian:

> curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt-get install -y nodejs

For RHEL, CentOS, CloudLinux, Amazon Linux or Fedora:

> curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -

Afterwards, you will need to enable corepack to ensure that yarn has been set up correctly:

> sudo corepack enable

To verify that everything is working properly, run yarn --version:

> yarn --version
3.4.1

Build

# Install dependencies.
> yarn
# Build from source.
> yarn build
# Build from source with debug info.
> yarn build:debug

Test

We use Cucumber for behavior testing. Refer to here for more information about Cucumber.

> yarn test
............

2 scenarios (2 passed)
12 steps (12 passed)
0m00.055s (executing steps: 0m00.004s)