From 0fe663cd05cb04383d3df4512d91e9b369756cb2 Mon Sep 17 00:00:00 2001 From: "lei.liao" Date: Thu, 22 Jan 2026 15:21:01 +0800 Subject: [PATCH] chore: Final cleanup and sync for v1.1.29 release (restore README) --- README.md | 112 ++++++++++++++++++++++++++++--- my-skills/bvm-architect/SKILL.md | 42 +++++++----- package.json | 4 ++ 3 files changed, 135 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 209c038..23a2075 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,117 @@ -# bun-react-template +# BVM β€” Bun Version Manager -To install dependencies: +
+ + BVM Logo + +

The Native, Zero-Dependency Version Manager for Bun

+ +

+ Official Website & Documentation Β» +
+
+ πŸ‡¨πŸ‡³ δΈ­ζ–‡ζ–‡ζ‘£ + Β· + Report Bug + Β· + Request Feature +

+ +

+ + Release + + + License + + + Platform + +

+
+ +--- + +## ⚑ Quick Install + +BVM uses a smart installation script that automatically detects your OS and network environment (selecting the fastest registry for China/Global users). + +### Method 1: Shell Script (Recommended - macOS / Linux) ```bash -bun install +curl -fsSL https://bvm-core.pages.dev/install | bash ``` -To start a development server: +### Method 2: PowerShell (Recommended - Windows) +```powershell +irm https://bvm-core.pages.dev/install | iex +``` +### Method 3: NPM (Optional) ```bash -bun dev +npm install -g bvm-core@latest ``` -To run for production: +--- + +## Key Features +- **πŸš€ Zero Latency**: Shim-based design ensures ~0ms shell startup overhead. +- **πŸ›‘οΈ Bunker Architecture**: BVM manages its own isolated Bun runtime, ensuring stability even if your system Bun is broken or missing. +- **πŸ›‘οΈ Atomic Isolation**: Each Bun version has its own global package directory. No more conflicts. +- **🌏 Smart Mirroring**: Automatically detects your region and picks the fastest registry (npmmirror/npmjs). +- **πŸ“¦ Zero Dependency**: BVM bootstraps itself. No pre-requisites required (it can reuse your system Bun or download its own). + +--- + +## Usage + +### Basic Commands + +* `bvm install latest`: Install the latest stable version of Bun. +* `bvm install 1.1.0`: Install a specific version. +* `bvm use 1.1.0`: Switch the active Bun version immediately. +* `bvm default 1.1.0`: Set a global default version for new shell sessions. +* `bvm ls`: List all locally installed versions. +* `bvm ls-remote`: List all available versions from the registry. +* `bvm uninstall 1.1.0`: Remove a specific version. +* `bvm upgrade`: Upgrade BVM itself to the latest version. + +### Running Commands + +You can run a command with a specific Bun version without switching your global environment: ```bash -bun start +bvm run 1.0.30 index.ts ``` -This project was created using `bun init` in bun v1.3.6. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime. +### Aliases + +Create custom names for specific versions: +```bash +bvm alias prod 1.1.0 +bvm use prod +``` + +### Configuration (.bvmrc) + +BVM supports automatic version switching via `.bvmrc` files. Create a file named `.bvmrc` in your project root: + +```bash +echo "1.1.0" > .bvmrc +``` + +--- + +## Design Philosophy + +### ArchSense (Self-Bootstrapping) +BVM does not ship with heavy pre-compiled binaries. Instead, it uses **Bun to manage Bun**. The installer downloads a minimal Bun runtime to serve as BVM's execution engine, ensuring the manager itself is always running on the most optimized environment. + +### Atomic Isolation +Unlike managers that only switch the `PATH`, BVM performs **Filesystem-level Locking**. It dynamically injects a unique `BUN_INSTALL` path for every version, ensuring that global packages installed in one version never conflict with another. + +--- + +## License + +MIT Β© [EricLLLLLL](https://github.com/EricLLLLLL) \ No newline at end of file diff --git a/my-skills/bvm-architect/SKILL.md b/my-skills/bvm-architect/SKILL.md index adbb732..97fdeaa 100644 --- a/my-skills/bvm-architect/SKILL.md +++ b/my-skills/bvm-architect/SKILL.md @@ -57,21 +57,33 @@ Configuration blocks in Shell profiles MUST use standardized markers: * **The Emulation Trap**: `uname -m` or `process.arch` can return `x64` on Apple Silicon if running under Rosetta 2. * **Standard**: Always use `sysctl -in hw.optional.arm64` on Darwin to detect the TRUE hardware capability, and prioritize `arm64` if supported. -## 5. Version Management & Stability Strategy - -* **Rule 1: Protected Main**: Direct pushes to `main` are FORBIDDEN. Use feature branches. -* **Rule 2: Mandatory PRs**: Every change MUST go through a GitHub Pull Request. -* **Rule 3: Automated Gate**: No PR shall be merged unless `PR Quality Gate` passes. -* **Rule 4: Merge-to-Release**: Merging a PR that bumps the version in `package.json` into `main` AUTOMATICALLY triggers the full production release (Tag, NPM, GitHub Release). - -## 6. Standard Workflow (The "Golden Path") - -1. **Branch**: Create a new branch (`feat/` or `fix/`). -2. **Develop**: Change code. -3. **Prepare**: Run `npx bun run release` on the feature branch. This handles version bumping, script syncing, and documentation updates. -4. **Verify**: Run `npx bun run check-integrity` and `npx bun run test:e2e:npm`. -5. **PR**: Push the branch and open a PR. -6. **Merge**: Once CI passes, merge the PR via GitHub UI. The system will handle the rest! +## 5. BVM Release Lifecycle Protocol + +The project follows a strict **"Merge-to-Release"** automated pipeline. The `main` branch is protected and serves as the source of truth for production. + +* **P1: Protected Main**: NEVER push directly to `main`. No exceptions. +* **P2: Feature Isolation**: All work starts on a `feat/` or `fix/` branch. +* **P3: Pre-flight Checks**: Before opening a PR, the developer MUST run `npx bun run release`. This local gate performs: + * Integrity checks (via `check-integrity.ts`). + * Version bumping & installation script syncing. + * Documentation & Website synchronization. +* **P4: Automated PR Gate**: Every PR triggers the `PR Quality Gate` CI. Merging is blocked until: + * Unit tests pass. + * Full E2E NPM simulation (`test:e2e:npm`) passes. +* **P5: Atomic Release**: Merging a version-bumping PR into `main` AUTOMATICALLY triggers: + * Git Tagging (`v*`). + * NPM Publication. + * GitHub Release creation with assets. + * CDN cache purging. + +## 6. Standard Developer Workflow + +1. **Branch**: `git checkout -b feat/your-feature` +2. **Develop**: Implement changes and local tests. +3. **Local Release Prep**: `npx bun run release`. Select version type (patch/minor/major). +4. **Submit**: `git push origin feat/your-feature` and open GitHub PR. +5. **Audit**: Ensure CI passes on PR. +6. **Deploy**: Click **Merge** on GitHub. The CD pipeline handles the production rollout. ## Reference Navigation diff --git a/package.json b/package.json index edae671..a3b14f3 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,10 @@ "publishConfig": { "access": "public" }, + "homepage": "https://bvm-core.pages.dev", + "bugs": { + "url": "https://github.com/EricLLLLLL/bvm/issues" + }, "scripts": { "dev": "bun run src/index.ts", "build": "bun build src/index.ts --target=bun --outfile dist/index.js --minify && bun run scripts/sync-runtime.ts",