ruvector/scripts/README.md
rUv 9108adeeb5 feat: Add automated package-lock.json sync tooling
 New Features:
- sync-lockfile.sh: Auto-sync lock file with package.json changes
- install-hooks.sh: Install git pre-commit hooks
- ci-sync-lockfile.sh: CI/CD auto-fix for lock file issues
- Pre-commit hook: Automatically runs on git commit
- validate-lockfile.yml: GitHub Actions workflow for validation

📚 Documentation:
- CONTRIBUTING.md: Complete contribution guide
- scripts/README.md: Automation scripts documentation

🎯 Benefits:
- Prevents "lock file out of sync" CI/CD failures
- Automatic staging of lock file changes
- Zero manual intervention needed
- Works with any workflow (hooks, manual, CI/CD)

🔧 Usage:
1. Install hooks: ./scripts/install-hooks.sh
2. Add dependencies normally
3. Commit - hook auto-syncs lock file
4. CI validates automatically

Resolves the recurring package-lock.json sync issues.
2025-11-25 21:24:14 +00:00

38 lines
917 B
Markdown

# RuVector Automation Scripts
This directory contains automation scripts to streamline development and prevent common issues.
## 📜 Available Scripts
### 🔄 sync-lockfile.sh
Automatically syncs `package-lock.json` with `package.json` changes.
**Usage:** `./scripts/sync-lockfile.sh`
### 🪝 install-hooks.sh
Installs git hooks for automatic lock file management.
**Usage:** `./scripts/install-hooks.sh`
### 🤖 ci-sync-lockfile.sh
CI/CD script for automatic lock file fixing.
**Usage:** `./scripts/ci-sync-lockfile.sh`
## 🚀 Quick Start
1. **Install git hooks** (recommended):
```bash
./scripts/install-hooks.sh
```
2. **Test the hook**:
```bash
cd npm/packages/ruvector
npm install chalk
git add package.json
git commit -m "test: Add chalk dependency"
# Hook automatically updates lock file
```
See [CONTRIBUTING.md](../docs/CONTRIBUTING.md) for full documentation.