Skip to content

Latest commit

 

History

History
100 lines (72 loc) · 2.45 KB

File metadata and controls

100 lines (72 loc) · 2.45 KB

Contributing to bvm

Thank you for your interest in contributing to bvm! We follow a standard Pull Request workflow.

Prerequisites

  • Bun (v1.0.0 or later) must be installed on your machine.

Development Workflow

1. Fork & Clone

To contribute, you first need to fork the repository to your own GitHub account. Then, clone your forked repository locally:

git clone https://github.com/<your-username>/bvm.git
cd bvm
git remote add upstream https://github.com/EricLLLLLL/bvm.git

This sets up your local repository to track both your fork (origin) and the original EricLLLLLL/bvm repository (upstream).

2. Setup

Install development dependencies:

bun install

3. Create a Branch

Create a new branch for your feature or fix. Please use a descriptive name:

git checkout -b feat/my-awesome-feature
# or
git checkout -b fix/issue-123

4. Develop & Test

Run the source code directly:

npx bun run src/index.ts <command>

Running Tests:

BVM has two types of tests:

  1. Unit/Integration Tests: Fast tests for internal logic.
    bun test
  2. E2E Tests: Comprehensive tests that verify the full CLI workflow in an isolated sandbox.
    bun test test/e2e

Note: E2E tests are slower but essential for verifying installation scripts and shell configuration changes. CI runs these automatically on Linux, macOS, and Windows.

5. Commit & Push

We follow Conventional Commits.

git add .
git commit -m "feat: add support for xyz"
git push origin feat/my-awesome-feature

6. Submit Pull Request

Go to the GitHub repository and open a Pull Request against the main branch.

  • Describe your changes clearly.
  • Link to any related issues.
  • Wait for code review and CI checks.

Project Architecture

  • src/index.ts: Entry point.
  • src/utils/semver-lite.ts: Minimal semver implementation (replaces semver).
  • install.sh / install.ps1: Installation scripts.

Release Process (Maintainers Only)

bvm uses a fully automated release pipeline powered by GitHub Actions.

  1. Version Bump: Update the version field in package.json.

  2. Tag & Push:

    git tag v1.2.1
    git push origin v1.2.1
  3. CI Automation: The workflow will automatically build, minify, sync runtime versions, and publish to GitHub Releases.


Happy Coding!