Load init logging on Fedify 2.1 templates#729
Load init logging on Fedify 2.1 templates#729dahlia merged 2 commits intofedify-dev:2.1-maintenancefrom
Conversation
Import the generated LogTape setup from Astro middleware so scaffolded Astro applications configure logging before Fedify handles requests. Add regression coverage for the generated Astro middleware and update the changelog entry for the broader init template fix. Fixes fedify-dev#725 Assisted-by: Codex:gpt-5.5
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request adds support for loading LogTape configuration in Astro project templates by importing the logging.ts file within src/middleware.ts. The changes include the template modification, a new test case to verify the import, and an update to the changelog. Review feedback suggested improvements to the changelog entry to clarify that the initialization happens before Fedify handles requests for all supported frameworks and to ensure that file paths and package names are formatted with italics according to the repository style guide.
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Tighten the changelog wording for the init template logging fix so the startup timing applies to Astro, Nitro, and Next.js, and so the Astro middleware is described as the place where the logging setup is imported. Review comment: fedify-dev#729 (comment) Assisted-by: Codex:gpt-5.5
|
@codex review |
|
/gemini review |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
There was a problem hiding this comment.
Code Review
This pull request updates the @fedify/init Astro project template to ensure that the generated logging.ts file is loaded during server startup by adding an import statement to src/middleware.ts. It also includes a new test case to verify this behavior and updates the CHANGES.md file. I have no feedback to provide.
2chanhaeng
left a comment
There was a problem hiding this comment.
Looks great! It would be better to test about logging in test:init. #648
Summary
Fixes #725.
This backports the
fedify initlogging startup fix to 2.1-maintenance and completes it for the framework template that exists only on the 2.1 line.The merged 2.0-maintenance change already made generated Nitro projects load server/logging.ts through server/plugins/logging.ts, and generated Next.js projects load logging.ts through instrumentation.ts. This PR keeps those changes on 2.1-maintenance and adds the missing Astro wiring: generated Astro projects now import src/logging.ts from src/middleware.ts before creating the Fedify middleware.
SolidStart is not changed in this PR because 2.1-maintenance does not include a
fedify init -w solidstartoption. The SolidStart initializer appears only on the latermainline.Tests
deno fmt --check packages/init/src/templates/astro/src/middleware.ts.tpl packages/init/src/webframeworks.test.ts CHANGES.mddeno check packages/init/src/webframeworks.test.tspnpm --filter @fedify/init testdeno task checkin packages/initdeno run -A packages/init/src/test/execute.ts init /tmp/fedify-init-725-astro -w astro -p npm -k in-memory -m in-process --dry-rungit diff --check