Skip to content

chore(deps): upgrade astro to v7 and align @astrojs/* integrations#1866

Open
lacolaco wants to merge 2 commits into
mainfrom
chore/upgrade-astro-v7
Open

chore(deps): upgrade astro to v7 and align @astrojs/* integrations#1866
lacolaco wants to merge 2 commits into
mainfrom
chore/upgrade-astro-v7

Conversation

@lacolaco

@lacolaco lacolaco commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

Astro v6 → v7 アップグレード。 Renovate PR #1853 を手作業で再構成して置き換える。

  • astro 6.4.8 → 7.0.4
  • @astrojs/node 10.0.4 → 11.0.0
  • @astrojs/react 5.0.7 → 6.0.0 (Vite v8 対応)
  • @astrojs/markdown-remark ^7.2.0 を新規追加

なぜ

Astro v7 で Sätteri がデフォルトの Markdown プロセッサに変わり、 既存の remark/rehype パイプライン (remarkBreaks / remarkMath / remarkEmbed / rehypeExtractVideoHtml / rehypeGithubEmoji / rehypeGithubAlert / rehypeKatex / rehypeMermaid / rehypeImageCdn) を維持するには @astrojs/markdown-remarkunified()markdown.processor に明示する必要がある (CHANGELOG v7.0.0 で明示)。

カスタムプラグインはすべて unified/remark/rehype エコシステム上で書かれており、 Sätteri ネイティブ化は別途大きな書き換えが必要なため、 本 PR では unified への opt-back を選択。

前提検証

  • getContainerRenderer (@astrojs/react v6 で import path 変更) はプロジェクト内で未使用
  • compressHTML / experimental.* / src/fetch.ts / astro:transitions 内部 API は未使用
  • @astrojs/node v11 standalone モードの entry point は dist/server/entry.mjs 変更なし → Dockerfile L32 と整合
  • astro:db は使用しておらず削除影響なし

ローカル検証

  • pnpm build ✅ (14.6s)
  • pnpm lint
  • pnpm format:check
  • pnpm test:tools ✅ (247 tests pass)
  • pnpm test:libs ✅ (15 files / 176 tests pass)

関連

Test plan

  • CI build 成功
  • CI deploy-preview 成功
  • Preview URL で記事ページ・タグページのレイアウト/コンテンツに視覚的乖離が無いか確認 (Astro v7 で compressHTML デフォルトが 'jsx' 化、 インライン要素間スペースの挙動変化)
  • CI code-review pass

🤖 Generated with Claude Code

Astro v7 で Sätteri がデフォルトの Markdown プロセッサに変わったため、 既存
の remark/rehype プラグイン (remarkEmbed/remarkMath/rehypeImageCdn 他) を
維持するために @astrojs/markdown-remark の unified() を markdown.processor
に明示指定する。 併せて peer dependency の @astrojs/node を v11、
@astrojs/react を v6 (Vite v8 対応) に追従する。

- astro 6.4.8 → 7.0.4
- @astrojs/node 10.0.4 → 11.0.0
- @astrojs/react 5.0.7 → 6.0.0
- @astrojs/markdown-remark ^7.2.0 を追加

Supersedes #1853 (Renovate の自動 PR は手作業対応のため close)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Astro v6→v7 のメジャーバージョンアップ対応 PR。変更は最小限で、astro.config.ts への processor: unified() の追加と関連パッケージのバージョン更新のみ。コメントで変更理由が明確に説明されており、既存の remark/rehype プラグイン構成を維持するための正しいマイグレーション手順が適用されている。コードの品質、安全性、一貫性に問題なし。

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview deployment ready!

✅ Preview URL: https://pr-1866---web-njpdbbjcea-an.a.run.app
📝 Commit SHA: 93bdbd5 (view commit)

This comment was automatically generated by the deploy-preview workflow.

retrospective-critic で Stack の version 表記が一世代前 (Astro 5.x) のまま放置されていた
ことが指摘された。 本 PR で Astro 7.x へアップグレードしたタイミングに合わせて Stack
section を最新化する。 pnpm も lockfile の `packageManager: pnpm@10.34.4` に揃える。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Astro v6→v7アップグレードPR。コードへの変更は astro.config.ts への processor: unified() 追加のみで最小限。Astro v7でデフォルトの Markdown プロセッサが Sätteri に変わったことへの対応として、既存の remark/rehype プラグインパイプラインを維持するための正しいアプローチ。コメントに変更理由・参照URLが記載されており、PR本文にはビルド・lint・テスト全通過の確認結果も記録されている。潜在的なバグ・セキュリティ問題・パフォーマンス上の懸念なし。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant