Skip to content

feat: geonic cli update コマンドを追加#94

Merged
miya0001 merged 3 commits into
mainfrom
feat/cli-update
Apr 3, 2026
Merged

feat: geonic cli update コマンドを追加#94
miya0001 merged 3 commits into
mainfrom
feat/cli-update

Conversation

@miya0001

@miya0001 miya0001 commented Apr 3, 2026

Copy link
Copy Markdown
Member

Summary

  • geonic cli update コマンドを追加 — npm update -g @geolonia/geonicdb-cli のエイリアス
  • CLI 内から直接最新版への更新が可能に

Changes

  • src/commands/cli.ts: cli update サブコマンドを追加(execSyncnpm update -g を実行)

Test plan

  • lint / typecheck / 全テストパス
  • geonic cli update --help で正しくヘルプ表示を確認

Summary by CodeRabbit

  • 新機能
    • geonic cli update コマンドを追加しました。CLI を最新バージョンへ更新できます。実行中に進行メッセージが表示されます。
    • --dry-run 相当の出力で、実際に更新を行わずに実行結果を確認できます。
  • ドキュメント
    • CLI のヘルプ例(geonic cli update の使い方)を追加しました。

miya0001 added 2 commits April 3, 2026 16:14
`npm update -g @geolonia/geonicdb-cli` のエイリアスとして
`geonic cli update` で CLI を最新版に更新できるようにした。
@coderabbitai

coderabbitai Bot commented Apr 3, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7341031c-ffae-4df3-9be9-4178542fa90a

📥 Commits

Reviewing files that changed from the base of the PR and between e36eb65 and f374f18.

📒 Files selected for processing (1)
  • src/commands/cli.ts

📝 Walkthrough

Walkthrough

CLIに geonic cli update サブコマンドを追加しました。このコマンドは npm update -g \@geolonia/geonicdb-cli を同期実行し、ドライラン出力、情報/成功メッセージ、エラーハンドリングを行います。

Changes

Cohort / File(s) Summary
Changelog Update
CHANGELOG.md
geonic cli update コマンドのリリースノートを追加。
CLI Command Implementation
src/commands/cli.ts
update サブコマンドを追加。execSyncnpm update -g \@geolonia/geonicdb-cli を同期実行、opts.dryRun の短絡処理、printInfoprintSuccess 出力、withErrorHandler 包装、resolveOptions 利用を導入。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 ぴょんと跳ねて知らせるよ、
新しい「update」で道は軽やか。
そっと試すならドライラン、
実行は同期でぐるりと回し、
終われば「完了!」でぴょんと一息。

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR タイトルは geonic cli update コマンド追加という主要な変更を明確に要約しており、変更セットの内容と完全に関連している。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/cli-update

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/commands/cli.ts`:
- Around line 282-290: The update command currently always runs execSync("npm
update -g `@geolonia/geonicdb-cli`") even when the global --dry-run is set; modify
the action handler for the update command (the function wrapped by
withErrorHandler) to check the parsed global option (e.g., read opts().dryRun or
program.opts().dryRun depending on how global options are accessed in this CLI)
before executing execSync: if dry-run is true, print the planned action with
printInfo/printSuccess and return early without calling execSync; otherwise
proceed to run execSync as before. Ensure the check references the update
command's action function and the execSync, printInfo, and printSuccess symbols
so the change is localized to this block.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2e4029a5-8dc3-4dea-957c-c4958df5a7d2

📥 Commits

Reviewing files that changed from the base of the PR and between 4930149 and e36eb65.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/commands/cli.ts

Comment thread src/commands/cli.ts
@miya0001
miya0001 merged commit a1071c9 into main Apr 3, 2026
7 checks passed
@miya0001
miya0001 deleted the feat/cli-update branch April 3, 2026 07:30
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.

1 participant