fix: Force CI mode for complete Unicode disabling in CLI

- Set both TERM=linux and CI=true in unicode-detect.ts
- CI env var provides additional Unicode disabling for @clack/prompts
- Fix test imports to use package.json instead of deleted version.ts
- Bump to 0.2.6

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Sprite 2026-02-10 07:35:20 +00:00
parent 875e9adb6b
commit dff70afb4b
4 changed files with 10 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.2.5",
"version": "0.2.6",
"type": "module",
"bin": {
"spawn": "cli.js"

View file

@ -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.

View file

@ -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+$/);

View file

@ -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";
}
}