From 47275a1501aa20ca5ac05ee197737f18bd76dcb8 Mon Sep 17 00:00:00 2001 From: Charles Ponti Date: Fri, 11 Sep 2026 13:42:11 -0700 Subject: [PATCH 1/2] fix(imagekit): --version now reads from package.json It was hardcoded to "1.0.0" in index.ts, so it went stale as soon as the package was bumped to 1.1.0. Import package.json instead (bun inlines JSON imports at build time, so this works in both the compiled binary and the Node-targeted dist build) and update the integration test that had the same value hardcoded. Co-Authored-By: Claude Sonnet 5 --- apps/imagekit/package.json | 2 +- apps/imagekit/src/commands/integration.test.ts | 3 ++- apps/imagekit/src/index.ts | 3 ++- apps/imagekit/tsconfig.json | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/imagekit/package.json b/apps/imagekit/package.json index 736e220..e2efbeb 100644 --- a/apps/imagekit/package.json +++ b/apps/imagekit/package.json @@ -1,6 +1,6 @@ { "name": "@ponti-studios/imagekit", - "version": "1.1.0", + "version": "1.1.1", "description": "Image asset toolkit — resize, optimize, crop, convert, strip metadata, analyze EXIF, and generate web icons from the command line", "keywords": [ "avif", diff --git a/apps/imagekit/src/commands/integration.test.ts b/apps/imagekit/src/commands/integration.test.ts index 610d679..17054b3 100644 --- a/apps/imagekit/src/commands/integration.test.ts +++ b/apps/imagekit/src/commands/integration.test.ts @@ -12,6 +12,7 @@ import { runSource, tempDir, } from "../test-support"; +import pkg from "../../package.json"; const temporaryDirs: string[] = []; @@ -215,7 +216,7 @@ describe("iconkit binary fixture matrix", () => { expect(result.exitCode).toBe(0); expect(fs.readFileSync(destination, "utf8")).toContain(APP_DIR); expect(version.exitCode).toBe(0); - expect(version.stdout.toString().trim()).toBe("1.0.0"); + expect(version.stdout.toString().trim()).toBe(pkg.version); }); test("handles a broken existing symlink without crashing", () => { diff --git a/apps/imagekit/src/index.ts b/apps/imagekit/src/index.ts index d2acce8..dd38ca1 100644 --- a/apps/imagekit/src/index.ts +++ b/apps/imagekit/src/index.ts @@ -14,6 +14,7 @@ import { cmdFixDates } from "./commands/fix-dates"; import { cmdRename } from "./commands/rename"; import { cmdGenerate } from "./commands/generate"; import { DATE_PATTERN_HELP } from "./date-patterns"; +import pkg from "../package.json"; // Detect invocation name for help text: imagekit is primary, but support iconkit/photokit aliases const invokedAs = path.basename(process.execPath).toLowerCase().includes("iconkit") @@ -29,7 +30,7 @@ program .description( "Image asset toolkit — resize, optimize, analyze EXIF, fix dates, rename, and generate web icons from the command line", ) - .version("1.0.0"); + .version(pkg.version); // Keep primary name as imagekit for help, but allow alias detection for version output // Ensure --version works regardless of invoked name diff --git a/apps/imagekit/tsconfig.json b/apps/imagekit/tsconfig.json index f29caef..4919d2b 100644 --- a/apps/imagekit/tsconfig.json +++ b/apps/imagekit/tsconfig.json @@ -5,6 +5,7 @@ "moduleResolution": "bundler", "strict": true, "esModuleInterop": true, + "resolveJsonModule": true, "skipLibCheck": true, "types": ["node", "bun"], "outDir": "dist", From f13428b20b2b6b7fe9f34f024cdc88259b6b45b8 Mon Sep 17 00:00:00 2001 From: Charles Ponti Date: Fri, 11 Sep 2026 13:45:57 -0700 Subject: [PATCH 2/2] fix(ci): imagekit integration script reads expected version from package.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was hardcoded to "1.0.0", same staleness bug as the --version output itself — this is what caught it in CI. Now derives the expected value from apps/imagekit/package.json so it never needs updating by hand. Co-Authored-By: Claude Sonnet 5 --- scripts/cli/integration/imagekit.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/cli/integration/imagekit.sh b/scripts/cli/integration/imagekit.sh index 758b0c5..3a9f64e 100755 --- a/scripts/cli/integration/imagekit.sh +++ b/scripts/cli/integration/imagekit.sh @@ -26,5 +26,6 @@ cp "$fixtures/metadata-exif.jpg" "$tmpdir/photo.jpg" "$binary" strip "$tmpdir/photo.jpg" "$binary" info "$tmpdir/photo.jpg" | grep -qi "photo.jpg" -# version surfaces with the imagekit identity -"$binary" --version | grep -q "1.0.0" \ No newline at end of file +# version surfaces and matches package.json +expected_version="$(node -p "require('$repo_root/apps/imagekit/package.json').version")" +"$binary" --version | grep -q "$expected_version" \ No newline at end of file