ruvector/scripts/sync-lockfile.sh
rUv ca527cb5b9 feat: Add persistence support and Cypher queries to @ruvector/graph-node
- Add persistence support using redb storage backend
- Add GraphDatabase.open() factory method for opening existing databases
- Add isPersistent() and getStoragePath() methods
- Update TypeScript definitions with all new APIs
- Add benchmark suite (131K+ ops/sec batch inserts)
- Add comprehensive test suite with persistence tests
- Add GitHub workflow for multi-platform builds
- Fix sync-lockfile.sh working directory bug
- Publish @ruvector/graph-node@0.1.15 to npm
- Publish @ruvector/graph-node-linux-x64-gnu@0.1.15 to npm

Performance benchmarks:
- Node Creation: 9.17K ops/sec
- Batch Node Creation: 131.10K ops/sec
- Edge Creation: 9.30K ops/sec
- Vector Search (k=10): 2.35K ops/sec
- k-hop Traversal: 10.28K ops/sec

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 04:26:50 +00:00

47 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
# Automatically sync package-lock.json with package.json changes
# Can be used as git hook, CI/CD step, or manual script
set -e
echo "🔍 Checking package-lock.json sync..."
# Change to npm directory (if it exists)
NPM_DIR="$(dirname "$0")/../npm"
if [ ! -d "$NPM_DIR" ]; then
echo "✅ No npm directory found, skipping sync"
exit 0
fi
cd "$NPM_DIR"
# Check if package.json or any workspace package.json changed
CHANGED_PACKAGES=$(git diff --cached --name-only | grep -E 'package\.json$' || true)
if [ -n "$CHANGED_PACKAGES" ]; then
echo "📦 Package.json changes detected:"
echo "$CHANGED_PACKAGES"
echo ""
echo "🔄 Running npm install to sync lock file..."
# Run npm install to update lock file
npm install
# Check if lock file changed
if git diff --name-only | grep -q 'package-lock.json'; then
echo "✅ Lock file updated successfully"
# If running as pre-commit hook, add the lock file
if [ "${GIT_HOOK}" = "pre-commit" ]; then
cd ..
git add npm/package-lock.json
echo "✅ Lock file staged for commit"
else
echo "⚠️ Lock file modified but not staged"
echo " Run: git add npm/package-lock.json"
fi
else
echo "✅ Lock file already in sync"
fi
else
echo "✅ No package.json changes detected"
fi