From 3ca9668dfdcc4d88326762e9f3063f07a849f615 Mon Sep 17 00:00:00 2001 From: AnupamKumar-1 Date: Thu, 3 Sep 2026 15:28:13 +0530 Subject: [PATCH] chore: sync all packages to v1.1.0, add version:sync script --- eslint.config.mjs | 15 +++- package.json | 3 +- .../adapters/adapter-framework/package.json | 2 +- .../adapters/adapter-vectordb/package.json | 2 +- packages/cli/package.json | 2 +- packages/core/package.json | 2 +- packages/llm/llm-anthropic/package.json | 2 +- packages/llm/llm-core/package.json | 2 +- packages/llm/llm-gemini/package.json | 2 +- packages/llm/llm-ollama/package.json | 2 +- packages/llm/llm-openai/package.json | 2 +- packages/node-sdk/package.json | 2 +- python/obyflow-python/pyproject.toml | 2 +- scripts/sync-version.mjs | 69 +++++++++++++++++++ 14 files changed, 96 insertions(+), 13 deletions(-) create mode 100644 scripts/sync-version.mjs diff --git a/eslint.config.mjs b/eslint.config.mjs index ff1052f..6b597ba 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -15,6 +15,19 @@ export default tseslint.config( }, eslint.configs.recommended, ...tseslint.configs.recommended, + { + files: ["scripts/**/*.{js,mjs,cjs}"], + languageOptions: { + globals: { + process: "readonly", + console: "readonly", + __dirname: "readonly", + __filename: "readonly", + module: "readonly", + require: "readonly", + }, + }, + }, { rules: { "@typescript-eslint/no-explicit-any": "off", @@ -28,4 +41,4 @@ export default tseslint.config( "no-control-regex": "off", }, }, -); +); \ No newline at end of file diff --git a/package.json b/package.json index 59cc591..498c07c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obyflow", - "version": "1.0.0", + "version": "1.1.0", "description": "Obyflow — AI-native, CLI-first observability platform for tracing, debugging, and understanding modern applications.", "main": "index.js", "scripts": { @@ -9,6 +9,7 @@ "lint": "turbo run lint", "dev": "turbo run dev", "clean": "pnpm -r exec rm -rf dist", + "version:sync": "node scripts/sync-version.mjs", "prepare": "husky" }, "keywords": [], diff --git a/packages/adapters/adapter-framework/package.json b/packages/adapters/adapter-framework/package.json index eb14acc..23b2422 100644 --- a/packages/adapters/adapter-framework/package.json +++ b/packages/adapters/adapter-framework/package.json @@ -1,6 +1,6 @@ { "name": "@obyflow/adapter-framework", - "version": "0.0.2", + "version": "1.1.0", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/adapters/adapter-vectordb/package.json b/packages/adapters/adapter-vectordb/package.json index 2080927..4200a71 100644 --- a/packages/adapters/adapter-vectordb/package.json +++ b/packages/adapters/adapter-vectordb/package.json @@ -1,6 +1,6 @@ { "name": "@obyflow/adapter-vectordb", - "version": "0.0.2", + "version": "1.1.0", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/cli/package.json b/packages/cli/package.json index 1d830b8..4cab267 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "obyflow", - "version": "1.0.9", + "version": "1.1.0", "type": "module", "bin": { "obyflow": "dist/index.js" diff --git a/packages/core/package.json b/packages/core/package.json index 73fd60e..2ad6a8a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@obyflow/core", - "version": "0.0.6", + "version": "1.1.0", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/llm/llm-anthropic/package.json b/packages/llm/llm-anthropic/package.json index 4ae9f21..18235ad 100644 --- a/packages/llm/llm-anthropic/package.json +++ b/packages/llm/llm-anthropic/package.json @@ -1,6 +1,6 @@ { "name": "@obyflow/llm-anthropic", - "version": "0.0.8", + "version": "1.1.0", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/llm/llm-core/package.json b/packages/llm/llm-core/package.json index 51e0b60..06d1357 100644 --- a/packages/llm/llm-core/package.json +++ b/packages/llm/llm-core/package.json @@ -1,6 +1,6 @@ { "name": "@obyflow/llm-core", - "version": "0.0.5", + "version": "1.1.0", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/llm/llm-gemini/package.json b/packages/llm/llm-gemini/package.json index 941c903..039dce7 100644 --- a/packages/llm/llm-gemini/package.json +++ b/packages/llm/llm-gemini/package.json @@ -1,6 +1,6 @@ { "name": "@obyflow/llm-gemini", - "version": "0.0.8", + "version": "1.1.0", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/llm/llm-ollama/package.json b/packages/llm/llm-ollama/package.json index 0bfdc18..8eefab0 100644 --- a/packages/llm/llm-ollama/package.json +++ b/packages/llm/llm-ollama/package.json @@ -1,6 +1,6 @@ { "name": "@obyflow/llm-ollama", - "version": "0.0.8", + "version": "1.1.0", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/llm/llm-openai/package.json b/packages/llm/llm-openai/package.json index 028a265..ebe3f15 100644 --- a/packages/llm/llm-openai/package.json +++ b/packages/llm/llm-openai/package.json @@ -1,6 +1,6 @@ { "name": "@obyflow/llm-openai", - "version": "0.0.8", + "version": "1.1.0", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/node-sdk/package.json b/packages/node-sdk/package.json index 2c1cd29..ca09183 100644 --- a/packages/node-sdk/package.json +++ b/packages/node-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@obyflow/node", - "version": "0.0.2", + "version": "1.1.0", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/python/obyflow-python/pyproject.toml b/python/obyflow-python/pyproject.toml index 93cd5ca..baddbab 100644 --- a/python/obyflow-python/pyproject.toml +++ b/python/obyflow-python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "obyflow-python" -version = "0.0.7" +version = "1.1.0" description = "Obyflow Python SDK — canonical event emission and local storage for the Obyflow observability platform" readme = "README.md" requires-python = ">=3.9" diff --git a/scripts/sync-version.mjs b/scripts/sync-version.mjs new file mode 100644 index 0000000..ac28767 --- /dev/null +++ b/scripts/sync-version.mjs @@ -0,0 +1,69 @@ +#!/usr/bin/env node +/** + * Sync a single version across every publishable package in the monorepo + * (root package.json, all pnpm workspace packages, and the Python SDK's + * pyproject.toml). + * + * This is the ONLY place a version bump should happen — never hand-edit + * a version field in an individual package.json or pyproject.toml. + * + * Usage: + * node scripts/sync-version.mjs 1.1.0 + * pnpm run version:sync 1.1.0 + */ +import { readFileSync, writeFileSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import path from "node:path"; +import { execSync } from "node:child_process"; + +const rootDir = path.resolve(fileURLToPath(import.meta.url), "../.."); +const version = process.argv[2]; + +if (!version || !/^\d+\.\d+\.\d+(-[\w.]+)?$/.test(version)) { + console.error("Usage: node scripts/sync-version.mjs e.g. 1.1.0"); + process.exit(1); +} + +// Discover every workspace package.json from pnpm-workspace.yaml globs, +// so new packages are picked up automatically — nothing hardcoded here. +function findPackageJsonFiles() { + const out = execSync( + `pnpm -r exec node -e "console.log(process.cwd())"`, + { cwd: rootDir, encoding: "utf8" } + ) + .trim() + .split("\n") + .filter(Boolean) + .map((dir) => path.join(dir, "package.json")); + return [path.join(rootDir, "package.json"), ...out]; +} + +function bumpJson(file) { + const raw = readFileSync(file, "utf8"); + const json = JSON.parse(raw); + const before = json.version; + json.version = version; + // preserve trailing newline / formatting style + const newline = raw.endsWith("\n") ? "\n" : ""; + writeFileSync(file, JSON.stringify(json, null, 2) + newline); + console.log(`✓ ${path.relative(rootDir, file)} ${before} -> ${version}`); +} + +function bumpPyproject(file) { + const raw = readFileSync(file, "utf8"); + const before = raw.match(/^version\s*=\s*"([^"]+)"/m)?.[1]; + const updated = raw.replace( + /^version\s*=\s*"[^"]+"/m, + `version = "${version}"` + ); + writeFileSync(file, updated); + console.log(`✓ ${path.relative(rootDir, file)} ${before} -> ${version}`); +} + +for (const f of findPackageJsonFiles()) { + bumpJson(f); +} + +bumpPyproject(path.join(rootDir, "python/obyflow-python/pyproject.toml")); + +console.log(`\nAll packages synced to ${version}.`);