-
Notifications
You must be signed in to change notification settings - Fork 106
Development and Release Process
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.
- LTS Node.js
- Bun support is still waiting on more crypto feature parity with Node.js: see https://github.com/ipfs-examples/helia-examples/pull/101
- Deno support is still waiting on more crypto feature parity with Node.js: see https://github.com/ipfs-examples/helia-examples/pull/352
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
.
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.
When the release PR is merged, release-please publishes the updated modules to NPM.
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.
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.
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.