Thank you for your interest in contributing to ArkivJS! This document outlines the development workflow and guidelines for contributing to this project.
The project follows a Git Flow-inspired branching model:
develop- Main integration branch where all development happens. This is the default branch for ongoing work.main- Production/release branch that reflects the current stable release. This branch should always be in a deployable state.- Feature/Bugfix branches - Created from
developfor implementing new features or fixing bugs. These are merged back intodevelop.
-
Ensure you're on the latest
developbranch:git checkout develop git pull origin develop
-
Create a new branch from
develop:# For features git checkout -b feature/your-feature-name # For bug fixes git checkout -b bugfix/your-bugfix-name
- Write clean, well-documented code
- Follow the existing code style (enforced by Biome linter)
- Add tests for new functionality
- Update documentation as needed
Before submitting a pull request, ensure all tests pass locally:
# Run linting
bun run lint
# Run type checking
bun run type-check
# Run unit tests
bun run test:unit
# Build the package
bun run buildFor integration tests, see the test/README.md for setup instructions.
- Commit your changes with clear, descriptive commit messages
- Rebase your branch on top of current
developbranch - Push your branch to the remote repository
- Open a Pull Request targeting the
developbranch
When you create a Pull Request to develop, the CI pipeline automatically runs:
- Lint Checking - Validates code style using Biome
- Unit Tests - Runs all unit tests in
src/**/* - Smoke Tests - Validates package compatibility across different module formats
- Component Tests - Integration tests with GolemDB using Docker containers
All checks must pass before a PR can be merged.
Once your PR is merged into develop:
- The package is automatically built and published to NPM
- Version is automatically managed with a
-devpostfix (e.g.,0.1.0-dev.0,0.1.0-dev.1) - Package is published with the
devtag, indicating it's a development version and may be unstable - Anyone can install it with:
npm install @arkiv-network/sdk@dev
When develop is ready for release:
-
Merge
developintomain:git checkout main git pull origin main git merge develop git push origin main
-
Upon merge to
main:- The package is automatically built
- Published to NPM with the version from
package.json - Published without the
devtag (stable release) - No version postfix is added
For critical bugs that need to be fixed in production:
-
Create a bugfix branch directly from
main:git checkout main git pull origin main git checkout -b bugfix/hotfix-description
-
Make the fix and commit
-
Merge back into
main:git checkout main git merge bugfix/hotfix-description git push origin main
-
The patch version should be incremented (e.g.,
1.2.3→1.2.4) -
The fix should also be merged back into
developto keep it in sync
Note: No release version branches are needed - only use branches for major version releases if special handling is required.
This project follows Semantic Versioning (SemVer): x.y.z
- Patch version (
x.y.Z) - Incremented for bug fixes that don't add functionality or break compatibility - Minor version (
x.Y.z) - Incremented when new features are added in a backward-compatible manner - Major version (
X.y.z) - Incremented when breaking compatibility changes are introduced
Version management is handled manually with the exception of develop branch and dev tag where the CI/CD pipeline add automatically -dev.X postfix and increase X in case it already exists. So developers doesn't have to remember about changing versions constantly to have most recent dev publish.
The continuous integration pipeline runs the following checks in sequence:
- Validates code style and formatting using Biome
- Command:
bun run lint
- Runs all unit tests in the source code
- Command:
bun run test:unit - Must pass before proceeding
- Validates package compatibility across different module formats (ESM, CommonJS)
- Tests package installation and basic functionality
- Runs in the
test/directory
- Integration tests with GolemDB using Docker containers
- Validates full SDK functionality against a real GolemDB instance
- Uses Testcontainers for isolated testing environments
- Only runs after all tests pass
- Automatically publishes to NPM based on the target branch:
develop→ Published withdevtag and-devpostfixmain→ Published as stable release with version frompackage.json
For detailed information about building and developing the SDK, see:
- BUILD.md - Build configuration and output structure
- README.md - General project information and usage examples
- Check existing issues and pull requests
- Review the codebase and documentation
- Open an issue for bugs or feature requests
- Ask questions in discussions (if available)
Thank you for contributing to Arkiv!