Skip to content

imagekit: fix stale --version, bump to 1.1.1 - #19

Merged
charlesponti merged 2 commits into
mainfrom
fix/imagekit-version-flag
Sep 11, 2026
Merged

charlesponti merged 2 commits into
mainfrom
fix/imagekit-version-flag

Conversation

@charlesponti

Copy link
Copy Markdown
Member

Summary

  • imagekit --version was hardcoded to "1.0.0" in index.ts and went stale the moment the package was bumped to 1.1.0 (confirmed against the published npm package).
  • Now imports package.json so --version always matches the published version. Bun inlines JSON imports at build time, so this works for both the compiled binary (build:test/build) and the Node-targeted dist/imagekit.js.
  • Updated the integration test that had the same "1.0.0" literal hardcoded.
  • Bumps to 1.1.1.

Test plan

  • bun run typecheck
  • bun test (57 pass)
  • node dist/imagekit.js --version → 1.1.0 locally before the bump (now 1.1.1)

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 11, 2026 20:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 47275a1501

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the manifest-driven version assertion

When the imagekit integration phase runs, scripts/test-clis.sh builds the binary and invokes scripts/cli/integration/imagekit.sh, whose line 30 still requires --version to contain 1.0.0. This line now makes the binary emit 1.1.1, so that grep exits nonzero and the macOS CI integration job fails; update the shell assertion to expect or derive the current package version.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A critical TypeScript configuration issue and a moderate artifact-coverage gap remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Fixes stale imagekit --version output by sourcing the version from package.json and bumps the package to 1.1.1.

Changes:

  • Enables JSON imports and uses package metadata for CLI version output.
  • Updates integration version expectations.
  • Bumps @ponti-studios/imagekit to 1.1.1.
File summaries
File Summary
apps/imagekit/tsconfig.json Enables JSON module resolution. Critical comment (2 votes): the imported package.json is outside rootDir and may cause TS6059.
apps/imagekit/src/index.ts Sources CLI version output from package.json.
apps/imagekit/src/commands/integration.test.ts Updates version assertions. Moderate comment (2 votes): compiled binary and Node-targeted artifact coverage is missing.
apps/imagekit/package.json Bumps the package version to 1.1.1.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true,
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);
…age.json

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 <noreply@anthropic.com>
@charlesponti
charlesponti merged commit 1c8d063 into main Sep 11, 2026
15 checks passed
@charlesponti
charlesponti deleted the fix/imagekit-version-flag branch September 11, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants