Skip to content

⬆️ Astro 5 → 7 アップグレード - #14

Merged
sKawashima merged 2 commits into
mainfrom
feature/13-astro-upgrade
Jul 28, 2026
Merged

sKawashima merged 2 commits into
mainfrom
feature/13-astro-upgrade

Conversation

@sKawashima

@sKawashima sKawashima commented Jul 28, 2026 •

Copy link
Copy Markdown
Owner

なぜやるか

Resolves #13

pnpm dlx @astrojs/upgrade 実行により astro が ^5.16.6 → ^7.1.4 に更新されたため、正式に検証してアップグレードを確定する(#4 着手前の割り込みタスク)。

やったこと

  • pnpm install + キャッシュクリア後、pnpm build で全51ページの生成成功を確認
  • ページ内容のサニティチェック(works一覧17件 / ブログ記事レンダリング / dev サーバー200応答)
  • Biome チェック通過
  • 作業ログ docs/works/013_astro_7_upgrade.md

補足

  • コード修正は不要: 既存コードはAstro 5時点で新コンテンツコレクションAPI(glob loader / render())を使用済みのため、6/7の破壊的変更に非該当
  • アップグレード直後の createCollectionToGlobResultMap is not a function エラーは、旧バージョン起動中のdevサーバーとlockfileの不整合が原因(サーバー再起動で解消)
  • Astro 7 から astro dev はデーモン化(astro dev stop/status/logs)

やってないこと

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント
    • Astro 5から7へのアップグレード手順と検証結果(ビルド成功、ページ生成確認、HTTP疎通確認)を追加しました。
    • アップグレード時の判断、既知の警告の扱い、トラブル発生時の進め方、次の対応方針を追記しました。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

Review Change Stack

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: d7409d17-6f2b-4131-a20c-66ab5bdd9c30

📥 Commits

Reviewing files that changed from the base of the PR and between 12d7bce and 84c024d.

📒 Files selected for processing (1)
  • docs/works/013_astro_7_upgrade.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/works/013_astro_7_upgrade.md

Walkthrough

Astro 5から7へのアップグレード実施記録を追加し、実行手順、検証結果、エラー対応、開発環境の変更点、今後の作業をまとめています。

Changes

Astro 7アップグレード

Layer / File(s) Summary
アップグレード実施記録
docs/works/013_astro_7_upgrade.md
アップグレードコマンド、インストール・キャッシュクリア、ビルド、ページ確認、Biomeの結果と、発生したエラーへの対応、開発時の変更点、次のステップを記載した。

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

Astroの星をひとつ越え
ビルドの空にページ咲く
キャッシュを払って風まかせ
再起動すれば道ひらく
次の航海へ、いざ出発!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルはAstro 5→7のアップグレードを簡潔に示していて、変更内容と一致しています。
Linked Issues check ✅ Passed 作業ログにpnpm install/build、全51ページ生成、全ページ確認が記録されており、要件と整合しています。
Out of Scope Changes check ✅ Passed 変更はアップグレード作業ログの追加に限定されており、要求外の差分は見当たりません。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

@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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/works/013_astro_7_upgrade.md`:
- Around line 8-10: Update the verification notes in 013_astro_7_upgrade.md to
explicitly record that pnpm build generated all 51 pages without warnings.
Include the command executed, the absence of warnings, and the checked URLs with
their HTTP 200 statuses alongside the existing sanity-check results.
- Line 20: docs/works/013_astro_7_upgrade.md の該当記述を、astro:assets で画像処理を利用する場合は
sharp を直接依存に追加することと、pnpm が build scripts を無効化した場合のみ pnpm approve-builds
を実行することに分けて明記してください。sharp の利用ごとに approve-builds が必要と誤読されない表現に更新してください。
- Line 19: Update the Astro 7 documentation statement to distinguish foreground
`astro dev` from background `astro dev --background`; state that only the
background mode supports `stop`, `status`, and `logs`, and preserve the correct
behavior of foreground execution.
🪄 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: f9ca7fc9-8b05-4e12-9e51-7c4654393d71

📥 Commits

Reviewing files that changed from the base of the PR and between f75cfbb and 12d7bce.

⛔ Files ignored due to path filters (2)
  • package.json is excluded by !**/*.json
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/*.yaml
📒 Files selected for processing (1)
  • docs/works/013_astro_7_upgrade.md

Comment thread docs/works/013_astro_7_upgrade.md Outdated
Comment thread docs/works/013_astro_7_upgrade.md Outdated
Comment thread docs/works/013_astro_7_upgrade.md Outdated
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Jul 28, 2026
@sKawashima

Copy link
Copy Markdown
Owner Author

レビュー対応しました(84c024d)。3件すべて作業ログの記述を修正:

  • ✅ 検証結果セクションを追加(実行コマンド・警告なしの確認・確認したURLとHTTPステータス・grepでの生成物チェック内容)
  • ✅ astro dev の記述を正確化: バックグラウンド起動は通常 --background 指定時のみで、非対話シェルからの起動時は自動的にバックグラウンド化される(今回のケース)
  • ✅ sharp(画像処理時に必要な直接依存)と pnpm approve-builds(pnpmのbuild scriptブロックへの対処)を分けて記載

@sKawashima
sKawashima merged commit f563180 into main Jul 28, 2026
2 checks passed
@sKawashima
sKawashima deleted the feature/13-astro-upgrade branch July 28, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Astro 5 → 7 アップグレード

1 participant