Skip to content

Development and Release Process

Russell Dempsey edited this page Oct 24, 2024 · 3 revisions

What runtimes are supported by helia?

Browsers

Helia is an ESM module that should work in the latest browsers, but configurations may be necessary depending on your consuming library and bundler. See https://github.com/ipfs-examples/helia-examples for specific instructions with each bundler.

Browsers have their own support for various transports, you should check https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md#transport for the latest information.

Non-Browser environments

How to build Helia

The Helia monorepo uses aegir to automate many of the build tasks and generating API documentation.

After cloning the repo, run npm install followed by npm run build.

How Helia is released

On every commit to main, the release-please-action tries to generate a release PR. This is defined by the release job of the main GitHub Actions workflow

This is a special PR tagged with autorelease: pending. If none exists one is created.

Any outstanding unreleased commits get added to the release PR and version numbers for modules that have been touched in those commits are updated according to conventional commits.

Merging the release PR

When the release PR is merged, release-please publishes the updated modules to NPM.

Canary releases

We also publish an release candidate on every commit to allow testing pre-releases, which can be installed with npm i helia@next , npm i @helia/http@next , etc.

How are package READMEs generated

The README.md files for each of the packages in the monorepo are generated from the @packageDocumentation in the entry point of each package, for example, the source for the ipns README is the index.ts.

How to run debug tests with VS Code's built-in debugger

Create the .vscode/launch.json file in the root of the repository:

{
  "version": "0.2.0",
  "configurations": [
    {
        "type": "node",
        "request": "launch",
        "name": "Run tests (Node.js)",
        "runtimeExecutable": "npx",
        "runtimeArgs": ["aegir", "test", "-t", "node"],
        "cwd": "${fileDirname}",
        "console": "integratedTerminal",
        "internalConsoleOptions": "neverOpen",
        "env": {
          "DEBUG": "libp2p*,*:trace"
        }
    }
  ]
}

Select a test file and run the job using the “Run and debug” in VS Code - it’ll build and run the tests of only the workspace package the selected test file is in.

You can stick a .only on an individual test if you just want to run that one.