chore: sync README.md with version updates and enhance versioning script

Updated `README.md` to reflect version `0.7.3` with improved feature descriptions and scaling highlights. Enhanced the versioning script to automatically update the version badge in `README.md` for consistency. Incremented `version.ts` to `0.7.3`.
This commit is contained in:
David Snelling 2025-06-05 14:25:29 -07:00
parent bb11827d43
commit e35e07d298
3 changed files with 34 additions and 8 deletions

View file

@ -1,8 +1,8 @@
# 🧠 Soulcraft Brainy
<div align="center">
[![Version](https://img.shields.io/badge/version-0.7.1-blue.svg)](https://www.npmjs.com/package/@soulcraft/brainy)
# 🧠 Soulcraft Brainy
[![Version](https://img.shields.io/badge/version-0.7.3-blue.svg)](https://www.npmjs.com/package/@soulcraft/brainy)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)
@ -20,9 +20,11 @@ What makes Brainy special? It intelligently adapts to you and your environment!
- **Vector Search** - Find semantically similar content using embeddings (like having ESP for your data!)
- **Graph Relationships** - Connect data with meaningful relationships (your data's social network)
- **Streaming Pipeline** - Process data in real-time as it flows through the system (like a data waterslide!)
- **Extensible Augmentations** - Customize and extend functionality with pluggable components (LEGO blocks for your data!)
- **Adaptive Intelligence** - Automatically optimizes for your environment and usage patterns
- **Cross-Platform** - Works everywhere you do: browsers, Node.js, and server environments
- **Persistent Storage** - Data persists across sessions (no memory loss here!)
- **Persistent Storage** - Data persists across sessions and scales to any size (no memory loss here, even for elephant-sized data!)
- **TypeScript Support** - Fully typed API with generics (for those who like their code tidy)
- **CLI Tools** - Powerful command-line interface for data management (command line wizardry)
@ -85,7 +87,7 @@ Brainy combines four key technologies to create its adaptive intelligence:
- Adjusts performance parameters based on available resources
- Learns from query patterns to optimize future searches
- Tunes itself for your specific use cases the more you use it
4. **Intelligent Storage Selection** - Uses the best available storage option for your environment:
4. **Intelligent Storage Selection** - Uses the best available storage option for your environment, scaling effortlessly to any data size (from bytes to petabytes!):
- Browser: Origin Private File System (OPFS)
- Node.js: File system
- Server: S3-compatible storage (optional)
@ -133,6 +135,7 @@ Each time data flows through this pipeline, Brainy learns a little more about yo
- Data is saved using the optimal storage for your environment (finds the coziest home for your data)
- Automatic selection between OPFS, filesystem, S3, or memory (no manual configuration needed!)
- Migrates between storage types as your application's needs evolve (moves houses without you noticing)
- Scales effortlessly from tiny datasets to massive data collections (from ant-sized to elephant-sized data, no problem!)
- Configurable storage adapters for custom persistence needs (design your own dream data home)
### 🧩 Augmentation Types

View file

@ -6,6 +6,8 @@
* This script generates a version.js file that exports the version from package.json.
* This allows the CLI to access the version without having to read package.json directly,
* which can be problematic when the package is installed globally.
*
* It also updates the version in the README.md file to ensure it stays in sync with package.json.
*/
import fs from 'fs';
@ -28,8 +30,12 @@ const outputDir = path.join(rootDir, 'src', 'utils');
// Path to the output file
const outputFile = path.join(outputDir, 'version.ts');
// Path to README.md
const readmePath = path.join(rootDir, 'README.md');
// Read package.json
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
const version = packageJson.version;
// Create the output directory if it doesn't exist
if (!fs.existsSync(outputDir)) {
@ -42,10 +48,27 @@ const content = `/**
* Do not modify this file directly.
*/
export const VERSION = '${packageJson.version}';
export const VERSION = '${version}';
`;
// Write the file
fs.writeFileSync(outputFile, content);
console.log(`Generated version.ts with version ${packageJson.version}`);
console.log(`Generated version.ts with version ${version}`);
// Update README.md with the current version
try {
let readmeContent = fs.readFileSync(readmePath, 'utf8');
// Replace the version in the badge URL
const updatedReadme = readmeContent.replace(
/\[\!\[Version\]\(https:\/\/img\.shields\.io\/badge\/version-[0-9]+\.[0-9]+\.[0-9]+-blue\.svg\)\]/g,
`[![Version](https://img.shields.io/badge/version-${version}-blue.svg)]`
);
// Write the updated README back to disk
fs.writeFileSync(readmePath, updatedReadme);
console.log(`Updated README.md with version ${version}`);
} catch (error) {
console.error('Error updating README.md:', error);
}

View file

@ -3,4 +3,4 @@
* Do not modify this file directly.
*/
export const VERSION = '0.7.2';
export const VERSION = '0.7.3';