From e35e07d298527a9b95f761b6eb15d881867986fd Mon Sep 17 00:00:00 2001 From: David Snelling Date: Thu, 5 Jun 2025 14:25:29 -0700 Subject: [PATCH] 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`. --- README.md | 13 ++++++++----- scripts/generate-version.js | 27 +++++++++++++++++++++++++-- src/utils/version.ts | 2 +- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6cf0cf5f..ba3c0f80 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 🧠 Soulcraft Brainy -
-[![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 diff --git a/scripts/generate-version.js b/scripts/generate-version.js index 37eb7e2f..2b3a3767 100755 --- a/scripts/generate-version.js +++ b/scripts/generate-version.js @@ -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); +} diff --git a/src/utils/version.ts b/src/utils/version.ts index 96939ece..818d5c78 100644 --- a/src/utils/version.ts +++ b/src/utils/version.ts @@ -3,4 +3,4 @@ * Do not modify this file directly. */ -export const VERSION = '0.7.2'; +export const VERSION = '0.7.3';