Repository navigation
imagekit: fix stale --version, bump to 1.1.1 - #19
Conversation
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>
There was a problem hiding this comment.
💡 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); |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
🟡 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/imagekitto 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>
Summary
imagekit --versionwas hardcoded to"1.0.0"inindex.tsand went stale the moment the package was bumped to 1.1.0 (confirmed against the published npm package).package.jsonso--versionalways 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-targeteddist/imagekit.js.Test plan
bun run typecheckbun test(57 pass)node dist/imagekit.js --version→1.1.0locally before the bump (now1.1.1)🤖 Generated with Claude Code