Skip to content

Fix fedify init Astro + Bun projects#707

Open
dahlia wants to merge 5 commits intofedify-dev:2.1-maintenancefrom
dahlia:2.1-maintenance
Open

Fix fedify init Astro + Bun projects#707
dahlia wants to merge 5 commits intofedify-dev:2.1-maintenancefrom
dahlia:2.1-maintenance

Conversation

@dahlia
Copy link
Copy Markdown
Member

@dahlia dahlia commented Apr 20, 2026

Summary

  • Replace the Astro + Bun template's default adapter with @nurodev/astro-bun so projects generated by fedify init build and run correctly on Bun.
  • Add a Bun-specific Astro config template, and update the Astro example and documentation to use bun ./dist/server/entry.mjs for the built server.
  • Record the bug fix in CHANGES.md and update deno.lock for the new adapter dependency.

Testing

  • pnpm --filter @fedify/init build
  • pnpm --filter @fedify/init test
  • bun run build:bun in examples/astro
  • bun run preview:bun in examples/astro

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 20, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c32ca473-ab3d-43ab-83a2-a86cfc8e32e4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@issues-auto-labeler issues-auto-labeler bot added breaking change Requires backward-incompatible change component/build Build system and packaging component/cli CLI tools related labels Apr 20, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces Bun runtime support for Astro projects by updating the @fedify/init package and adding a Bun-specific example configuration. A review comment points out that the server and security settings in the new example configuration are incorrectly defined and should be removed.

Comment thread examples/astro/astro.config.bun.ts
Switch Astro projects generated for Bun from the Node.js adapter to
@nurodev/astro-bun and run the built Bun server entry point for
preview.

Update the Astro example and package documentation to cover the Bun
setup, and record the bug fix in CHANGES.md.

Assisted-by: OpenCode:gpt-5.4
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 20, 2026

@codex review

@dahlia dahlia self-assigned this Apr 20, 2026
@dahlia dahlia added integration/astro Astro integration (@fedify/astro) and removed breaking change Requires backward-incompatible change labels Apr 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes fedify init scaffolding for Astro projects targeting Bun by switching to a Bun-compatible adapter and aligning generated configs/scripts/docs to run the built Bun server entry point.

Changes:

  • Update @fedify/init Astro initializer to use @nurodev/astro-bun for Bun and to generate a Bun-specific Astro config template.
  • Update @fedify/astro documentation to include Bun setup instructions and correct the Deno adapter reference.
  • Extend the examples/astro project with Bun config/scripts and add the Bun adapter dependency; update changelog and deno.lock.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/init/src/webframeworks/astro.ts Select Bun adapter deps, pick Bun config template, and run built Bun entry for preview.
packages/init/src/templates/astro/astro.config.bun.ts.tpl New Astro config template using @nurodev/astro-bun.
packages/astro/README.md Add Bun setup docs and fix Deno adapter naming.
examples/astro/package.json Add Bun scripts and dependency on @nurodev/astro-bun.
examples/astro/astro.config.bun.ts Add Bun-specific Astro config for the example.
examples/astro/README.md Document Bun runtime usage and template instructions.
deno.lock Lock updated for new adapter dependency chain.
CHANGES.md Record the @fedify/init bug fix.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread examples/astro/package.json
Comment thread examples/astro/README.md
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/init/src/webframeworks/astro.ts 55.55% 3 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
packages/init/src/webframeworks/astro.ts 58.13% <55.55%> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Adjust the Deno and Node.js template instructions in the Astro example
so they also remove the Bun config file.

This keeps the documented cleanup steps aligned with the new
astro.config.bun.ts file added in the previous fix.

Assisted-by: OpenCode:gpt-5.4
@dahlia dahlia requested a review from Copilot April 20, 2026 14:06
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 20, 2026

@codex review

@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 20, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces Bun runtime support for Astro projects within the Fedify ecosystem. Key changes include updating @fedify/init to generate Bun-compatible configurations using @nurodev/astro-bun, adding Bun-specific scripts and configuration templates to the Astro example, and updating documentation across the repository. Feedback indicates that the changelog entry is missing required PR references and author credits as specified in the repository style guide. Additionally, an invalid security configuration property was identified in the new Bun configuration file and should be removed.

Comment thread CHANGES.md Outdated
Comment thread examples/astro/astro.config.bun.ts
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread packages/init/src/webframeworks/astro.ts Outdated
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ 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".

dahlia added 2 commits April 20, 2026 23:12
Add a regression test for the Astro initializer's Bun path so changes
to its adapter dependency, generated config, or preview command stay
covered by the init package test suite.

Assisted-by: OpenCode:gpt-5.4
@dahlia dahlia requested a review from Copilot April 20, 2026 14:16
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 20, 2026

@codex review

@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 20, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for the Bun runtime in Astro projects. It updates @fedify/init to correctly generate projects using the @nurodev/astro-bun adapter and includes Bun-specific configurations, scripts, and documentation. A type error was identified in the security configuration of the new Astro Bun example where allowedDomains was incorrectly initialized with an object instead of a string array.

Comment thread examples/astro/astro.config.bun.ts
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 10 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ 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".

@dahlia dahlia requested review from 2chanhaeng and sij411 April 20, 2026 14:27
Copy link
Copy Markdown
Contributor

@2chanhaeng 2chanhaeng left a comment

Choose a reason for hiding this comment

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

I think it would be better if you change these!

Comment thread packages/init/src/webframeworks/astro.ts Outdated
Comment thread packages/init/src/webframeworks/astro.ts Outdated
Use the shared package-manager-to-runtime helper in the Astro
initializer instead of duplicating the runtime mapping inline.

This keeps the template selection logic aligned with the existing
utility used elsewhere in the init package.

Assisted-by: OpenCode:gpt-5.4
@dahlia dahlia requested a review from 2chanhaeng April 21, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/build Build system and packaging component/cli CLI tools related integration/astro Astro integration (@fedify/astro)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants