diff --git a/cli/package.json b/cli/package.json index ca833c86..48ac4c3a 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/spawn", - "version": "0.2.5", + "version": "0.2.6", "type": "module", "bin": { "spawn": "cli.js" diff --git a/cli/src/__tests__/commands-update-download.test.ts b/cli/src/__tests__/commands-update-download.test.ts index 504a94de..52e20500 100644 --- a/cli/src/__tests__/commands-update-download.test.ts +++ b/cli/src/__tests__/commands-update-download.test.ts @@ -1,7 +1,8 @@ import { describe, it, expect, beforeEach, afterEach, mock, spyOn } from "bun:test"; import { createMockManifest, createConsoleMocks, restoreMocks } from "./test-helpers"; import { loadManifest } from "../manifest"; -import { VERSION } from "../version"; +import pkg from "../../package.json" with { type: "json" }; +const VERSION = pkg.version; /** * Tests for cmdUpdate and script download/execution paths in commands.ts. diff --git a/cli/src/__tests__/integration.test.ts b/cli/src/__tests__/integration.test.ts index f7d6e2c8..98aee0df 100644 --- a/cli/src/__tests__/integration.test.ts +++ b/cli/src/__tests__/integration.test.ts @@ -53,9 +53,10 @@ describe("CLI Integration Tests", () => { it("should handle version command", async () => { // This test verifies the basic CLI structure works // In a real environment, we'd spawn the CLI process - // For now, we just verify the version module exports + // For now, we just verify the version is exported from package.json - const { VERSION } = await import("../version"); + const pkg = await import("../../package.json", { with: { type: "json" } }); + const VERSION = pkg.default.version; expect(VERSION).toBeDefined(); expect(typeof VERSION).toBe("string"); expect(VERSION).toMatch(/^\d+\.\d+\.\d+$/); diff --git a/cli/src/unicode-detect.ts b/cli/src/unicode-detect.ts index 88e5271c..50ddae5d 100644 --- a/cli/src/unicode-detect.ts +++ b/cli/src/unicode-detect.ts @@ -37,4 +37,8 @@ const shouldForceAscii = (): boolean => { if (shouldForceAscii()) { process.env.TERM = "linux"; + // Also set CI=true as a backup - clack uses this to disable Unicode + if (!process.env.CI) { + process.env.CI = "true"; + } }