From cc9f0dcb87bf94311530c38c410b965e1bcb0055 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 2 Apr 2026 00:04:05 +0000 Subject: [PATCH 1/2] chore: sync version to 2.13.0 Cherry-picked from release/2.13.x (release v2.13.0) Original commit: 01ff760e8fc79f94c76a5db90310bb589fc172a0 --- apps/streaming-demo/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/streaming-demo/package.json b/apps/streaming-demo/package.json index f28bbf4..0d7aa6a 100644 --- a/apps/streaming-demo/package.json +++ b/apps/streaming-demo/package.json @@ -11,10 +11,10 @@ "runtime": "ts-node src/runtime-server.ts" }, "dependencies": { - "@enclave-vm/broker": "2.12.0", - "@enclave-vm/client": "2.12.0", - "@enclave-vm/types": "2.12.0", - "@enclave-vm/core": "2.12.0", + "@enclave-vm/broker": "2.13.0", + "@enclave-vm/client": "2.13.0", + "@enclave-vm/types": "2.13.0", + "@enclave-vm/core": "2.13.0", "express": "^4.21.0", "zod": "^3.24.0" }, From a01b568e4d3973368a087ebf519e84ea03954699 Mon Sep 17 00:00:00 2001 From: David Antoon Date: Thu, 2 Apr 2026 17:25:35 +0300 Subject: [PATCH 2/2] feat: sync package versions to 2.13.0 and enhance release workflow --- .github/workflows/publish-release.yml | 99 ++++++++++++--------------- libs/ast/package.json | 2 +- libs/broker/package.json | 8 +-- libs/browser/package.json | 4 +- libs/client/package.json | 6 +- libs/core/package.json | 6 +- libs/react/package.json | 4 +- libs/runtime/package.json | 8 +-- libs/stream/package.json | 4 +- libs/types/package.json | 2 +- scripts/sync-versions.mjs | 99 +++++++++++++++++++++++++++ yarn.lock | 58 +--------------- 12 files changed, 165 insertions(+), 135 deletions(-) create mode 100644 scripts/sync-versions.mjs diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 32ec019..7b4d5e6 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -512,6 +512,17 @@ jobs: echo "Skipping: v$VERSION is not the latest (v$LATEST is newer)" fi + - name: Setup Node + if: steps.check.outputs.is_latest == 'true' + uses: actions/setup-node@v6 + with: + node-version-file: ".nvmrc" + cache: "yarn" + + - name: Install dependencies + if: steps.check.outputs.is_latest == 'true' + run: yarn install --frozen-lockfile + - name: Configure git if: steps.check.outputs.is_latest == 'true' run: | @@ -559,16 +570,30 @@ jobs: git push origin --delete "$CHERRY_BRANCH" 2>/dev/null || true git checkout -b "$CHERRY_BRANCH" - # Attempt cherry-pick - if git cherry-pick "$VERSION_COMMIT" --no-commit; then - # Check if cherry-pick produced any changes (may be empty if already applied via a different commit) - if [ -z "$(git diff --cached --name-only)" ]; then - echo "Cherry-pick produced no changes — version bump already applied on $DEFAULT_BRANCH" - git reset HEAD 2>/dev/null || true - exit 0 - fi + # Attempt cherry-pick (may partially apply if main diverged from release branch) + git cherry-pick "$VERSION_COMMIT" --no-commit || { + echo "Cherry-pick had conflicts — resetting and using sync script instead" + git cherry-pick --abort 2>/dev/null || true + git checkout -- . 2>/dev/null || true + } - git commit -m "$(cat </dev/null || true - exit 0 - fi - - git cherry-pick --abort || true - echo "::warning::Cherry-pick had conflicts. Creating issue for manual resolution." - - gh issue create \ - --title "Manual version sync needed: v${VERSION} to main" \ - --label "cherry-pick" \ - --label "conflict" \ - --label "needs-attention" \ - --body "$(cat <", "homepage": "https://github.com/agentfront/enclave/tree/main/libs/ast-guard", diff --git a/libs/broker/package.json b/libs/broker/package.json index 389a631..6a5702d 100644 --- a/libs/broker/package.json +++ b/libs/broker/package.json @@ -1,6 +1,6 @@ { "name": "@enclave-vm/broker", - "version": "2.11.0", + "version": "2.13.0", "description": "Tool broker and session management for the EnclaveJS streaming runtime", "author": "AgentFront ", "homepage": "https://github.com/agentfront/enclave", @@ -35,9 +35,9 @@ } }, "dependencies": { - "@enclave-vm/types": "2.11.0", - "@enclave-vm/stream": "2.11.0", - "@enclave-vm/core": "2.11.0", + "@enclave-vm/types": "2.13.0", + "@enclave-vm/stream": "2.13.0", + "@enclave-vm/core": "2.13.0", "minimatch": "^10.2.5", "zod": "^4.3.6" } diff --git a/libs/browser/package.json b/libs/browser/package.json index ec9bd6f..c16bd72 100644 --- a/libs/browser/package.json +++ b/libs/browser/package.json @@ -1,6 +1,6 @@ { "name": "@enclave-vm/browser", - "version": "2.11.0", + "version": "2.13.0", "description": "Browser sandbox runtime for secure JavaScript code execution using double iframe isolation", "author": "AgentFront ", "homepage": "https://github.com/agentfront/enclave", @@ -36,7 +36,7 @@ } }, "dependencies": { - "@enclave-vm/ast": "2.11.0", + "@enclave-vm/ast": "2.13.0", "acorn": "8.15.0", "astring": "1.9.0", "zod": "^4.3.6" diff --git a/libs/client/package.json b/libs/client/package.json index 5f1ebaf..7bc8e56 100644 --- a/libs/client/package.json +++ b/libs/client/package.json @@ -1,6 +1,6 @@ { "name": "@enclave-vm/client", - "version": "2.11.0", + "version": "2.13.0", "description": "Browser and Node.js client SDK for the EnclaveJS streaming runtime", "author": "AgentFront ", "homepage": "https://github.com/agentfront/enclave", @@ -34,7 +34,7 @@ } }, "dependencies": { - "@enclave-vm/types": "2.11.0", - "@enclave-vm/stream": "2.11.0" + "@enclave-vm/types": "2.13.0", + "@enclave-vm/stream": "2.13.0" } } diff --git a/libs/core/package.json b/libs/core/package.json index 21155a0..73d7e51 100644 --- a/libs/core/package.json +++ b/libs/core/package.json @@ -1,6 +1,6 @@ { "name": "@enclave-vm/core", - "version": "2.11.0", + "version": "2.13.0", "description": "Sandbox runtime for secure JavaScript code execution", "author": "AgentFront ", "homepage": "https://github.com/agentfront/enclave", @@ -39,8 +39,8 @@ }, "dependencies": { "@babel/standalone": "^7.29.0", - "@enclave-vm/types": "2.11.0", - "@enclave-vm/ast": "2.11.0", + "@enclave-vm/types": "2.13.0", + "@enclave-vm/ast": "2.13.0", "acorn": "8.15.0", "acorn-walk": "8.3.4", "astring": "1.9.0", diff --git a/libs/react/package.json b/libs/react/package.json index eaf9388..7b7701f 100644 --- a/libs/react/package.json +++ b/libs/react/package.json @@ -1,6 +1,6 @@ { "name": "@enclave-vm/react", - "version": "2.11.0", + "version": "2.13.0", "description": "React hooks and components for the EnclaveJS streaming runtime", "author": "AgentFront ", "homepage": "https://github.com/agentfront/enclave", @@ -34,7 +34,7 @@ } }, "dependencies": { - "@enclave-vm/client": "2.11.0" + "@enclave-vm/client": "2.13.0" }, "peerDependencies": { "react": ">=18.0.0" diff --git a/libs/runtime/package.json b/libs/runtime/package.json index fb0d6f9..3b2d5b3 100644 --- a/libs/runtime/package.json +++ b/libs/runtime/package.json @@ -1,6 +1,6 @@ { "name": "@enclave-vm/runtime", - "version": "2.11.0", + "version": "2.13.0", "description": "Standalone runtime worker for EnclaveJS - deployable execution environment", "author": "AgentFront ", "homepage": "https://github.com/agentfront/enclave", @@ -37,9 +37,9 @@ "enclave-runtime": "./dist/cli.js" }, "dependencies": { - "@enclave-vm/types": "2.11.0", - "@enclave-vm/stream": "2.11.0", - "@enclave-vm/core": "2.11.0" + "@enclave-vm/types": "2.13.0", + "@enclave-vm/stream": "2.13.0", + "@enclave-vm/core": "2.13.0" }, "devDependencies": { "ws": "^8.19.0" diff --git a/libs/stream/package.json b/libs/stream/package.json index 8e740a3..b08d1b4 100644 --- a/libs/stream/package.json +++ b/libs/stream/package.json @@ -1,6 +1,6 @@ { "name": "@enclave-vm/stream", - "version": "2.11.0", + "version": "2.13.0", "description": "Streaming protocol implementation for EnclaveJS runtime (NDJSON, encryption, reconnection)", "author": "AgentFront ", "homepage": "https://github.com/agentfront/enclave", @@ -35,6 +35,6 @@ } }, "dependencies": { - "@enclave-vm/types": "2.11.0" + "@enclave-vm/types": "2.13.0" } } diff --git a/libs/types/package.json b/libs/types/package.json index f152ad8..24834ea 100644 --- a/libs/types/package.json +++ b/libs/types/package.json @@ -1,6 +1,6 @@ { "name": "@enclave-vm/types", - "version": "2.11.0", + "version": "2.13.0", "description": "Type definitions and Zod schemas for the EnclaveJS streaming runtime protocol", "author": "AgentFront ", "homepage": "https://github.com/agentfront/enclave", diff --git a/scripts/sync-versions.mjs b/scripts/sync-versions.mjs new file mode 100644 index 0000000..c04d542 --- /dev/null +++ b/scripts/sync-versions.mjs @@ -0,0 +1,99 @@ +#!/usr/bin/env node +/** + * Sync all @enclave-vm/* package versions across the monorepo. + * + * Usage: + * node scripts/sync-versions.mjs + * + * Updates: + * - "version" field in each libs//package.json + * - All @enclave-vm/ dependency references in libs and apps package.json files + * + * Idempotent: running when versions are already correct produces no changes. + */ + +import { readFileSync, writeFileSync, readdirSync, existsSync } from 'node:fs'; +import { join, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const SCOPE = '@enclave-vm/'; +const DEP_SECTIONS = ['dependencies', 'devDependencies', 'peerDependencies']; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const ROOT = join(__dirname, '..'); + +function main() { + const version = process.argv[2]; + if (!version) { + console.error('Usage: node scripts/sync-versions.mjs '); + process.exit(1); + } + if (!/^\d+\.\d+\.\d+/.test(version)) { + console.error(`Invalid version format: ${version}`); + process.exit(1); + } + + const packageJsonPaths = discoverPackageJsons(); + let totalUpdated = 0; + + for (const { filePath, isLib } of packageJsonPaths) { + const updated = syncPackageJson(filePath, version, isLib); + if (updated) totalUpdated++; + } + + if (totalUpdated === 0) { + console.log(`All versions already at ${version} — no changes needed.`); + } else { + console.log(`\nUpdated ${totalUpdated} file(s) to version ${version}.`); + console.log('Run "yarn install" to update yarn.lock.'); + } +} + +function discoverPackageJsons() { + const results = []; + for (const dir of ['libs', 'apps']) { + const dirPath = join(ROOT, dir); + if (!existsSync(dirPath)) continue; + for (const entry of readdirSync(dirPath, { withFileTypes: true })) { + if (!entry.isDirectory()) continue; + const pkgPath = join(dirPath, entry.name, 'package.json'); + if (existsSync(pkgPath)) { + results.push({ filePath: pkgPath, isLib: dir === 'libs' }); + } + } + } + return results; +} + +function syncPackageJson(filePath, version, isLib) { + const raw = readFileSync(filePath, 'utf8'); + const pkg = JSON.parse(raw); + let changed = false; + + // Update version field for lib packages only + if (isLib && pkg.version !== version) { + console.log(` ${filePath}: version ${pkg.version} → ${version}`); + pkg.version = version; + changed = true; + } + + // Update all @enclave-vm/* dependency references + for (const section of DEP_SECTIONS) { + if (!pkg[section]) continue; + for (const [name, current] of Object.entries(pkg[section])) { + if (name.startsWith(SCOPE) && current !== version) { + console.log(` ${filePath}: ${section}.${name} ${current} → ${version}`); + pkg[section][name] = version; + changed = true; + } + } + } + + if (changed) { + writeFileSync(filePath, JSON.stringify(pkg, null, 2) + '\n'); + } + + return changed; +} + +main(); diff --git a/yarn.lock b/yarn.lock index d6c493a..fd49608 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1122,62 +1122,6 @@ dependencies: tslib "^2.4.0" -"@enclave-vm/ast@2.12.0": - version "2.12.0" - resolved "https://registry.yarnpkg.com/@enclave-vm/ast/-/ast-2.12.0.tgz#8b095246337f8b7e6810f72a56f62e04e14995e5" - integrity sha512-SZo4eFPzFwhYlTOQy0hSOsf7++VSi9XtPBaR/1ljA9HOAoTU2kzBaptExKpfKbQmqbZ69/cmdGrwSCS3lDkSiQ== - dependencies: - "@types/estree" "1.0.8" - acorn "8.15.0" - acorn-walk "8.3.4" - astring "1.9.0" - -"@enclave-vm/broker@2.12.0": - version "2.12.0" - resolved "https://registry.yarnpkg.com/@enclave-vm/broker/-/broker-2.12.0.tgz#0f7c56d4534da310899cde29bea4245d937ed355" - integrity sha512-Su8bcSVJIEg0I5iGiHPZwuIrnG1qPfrGSuwJuqPxAqa9GMCfPgQHk0K+c+W9jb2dzSqYeT8lCKWvdKCzDEMFqg== - dependencies: - "@enclave-vm/core" "2.12.0" - "@enclave-vm/stream" "2.12.0" - "@enclave-vm/types" "2.12.0" - minimatch "^10.1.1" - zod "^4.3.6" - -"@enclave-vm/client@2.12.0": - version "2.12.0" - resolved "https://registry.yarnpkg.com/@enclave-vm/client/-/client-2.12.0.tgz#d38fd7991fb011f47c740e2737232378a01bdc38" - integrity sha512-kNjcsj+OrD9SaXAJghwEv5c4E4JmswrnZLSqsrFFvvyKS1ZyDtFBKNKlzJ+Rs7ygIX8V6c+fG7PsRHDlPUV1aA== - dependencies: - "@enclave-vm/stream" "2.12.0" - "@enclave-vm/types" "2.12.0" - -"@enclave-vm/core@2.12.0": - version "2.12.0" - resolved "https://registry.yarnpkg.com/@enclave-vm/core/-/core-2.12.0.tgz#7726a5d6f717330633cb7c2d5c77c575cf320f75" - integrity sha512-v7uciTJWrjtO+ZuUDHy4Osu6XVPYdGvBTOisqRSn2Px3ZVHcOzelCKBOgMH8jwKKhz00/ANzJ6P2SuatfLbuKQ== - dependencies: - "@babel/standalone" "^7.29.0" - "@enclave-vm/ast" "2.12.0" - "@enclave-vm/types" "2.12.0" - acorn "8.15.0" - acorn-walk "8.3.4" - astring "1.9.0" - zod "^4.3.6" - -"@enclave-vm/stream@2.12.0": - version "2.12.0" - resolved "https://registry.yarnpkg.com/@enclave-vm/stream/-/stream-2.12.0.tgz#56b2427b11d151164d256a7bf9e1e9b5171ba92b" - integrity sha512-bwjRFsOLQAl5dUJcuzHjmD4Q24nL1BRP4GxdtJqSoOw9pnWD/EDgcybnHtOoNbaG5AYTiXyIv1mEODqE3zlOhg== - dependencies: - "@enclave-vm/types" "2.12.0" - -"@enclave-vm/types@2.12.0": - version "2.12.0" - resolved "https://registry.yarnpkg.com/@enclave-vm/types/-/types-2.12.0.tgz#571b0851ad7c6ac1b661bcea8a923c0fa63c4781" - integrity sha512-/AQ78OQKmjt3OtvXe0iFkZtwV8TzP93VOo+vU4qfYYxj6e4XgVUgWhmUtpBWzq3xaL4UHKAhcBC7CAdBGHKiNw== - dependencies: - zod "^4.3.6" - "@esbuild/aix-ppc64@0.25.12": version "0.25.12" resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz#80fcbe36130e58b7670511e888b8e88a259ed76c" @@ -7312,7 +7256,7 @@ minimalistic-assert@^1.0.0: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimatch@10.1.1, minimatch@^10.1.1: +minimatch@10.1.1: version "10.1.1" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.1.1.tgz#e6e61b9b0c1dcab116b5a7d1458e8b6ae9e73a55" integrity sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==