Add a test to prevent README framework list drift - #991
Open
yerpark wants to merge 4 commits into
Open
Conversation
Assisted-by: Claude:claude-sonnet-5
Assisted-by: Claude:claude-sonnet-5
Assisted-by: Claude:claude-sonnet-5
These files quoted the fedify init CLI prompt or its JSDoc example before elysia.ts's label changed from "ElysiaJS" to "Elysia", so they no longer matched what the CLI actually shows. Changelog: none Assisted-by: Claude:claude-sonnet-5
✅ Deploy Preview for fedify-json-schema canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe Elysia framework label changes from ChangesElysia label consistency
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
#888
Summary
fedify init's web framework list lives in two places: the framework registry in packages/init/src/webframeworks/mod.ts and the list in packages/init/README.md. The registry is source code, but the README is maintained by hand, so the two can drift apart without anyone noticing.This PR adds a test to webframeworks.test.ts that extracts both lists — the registry's
labelvalues and the framework names in the README — sorts them, and compares them entry by entry.While writing the test, the two lists did not match at first. The only difference turned out to be
elysia: itslabelwas"ElysiaJS", while the README and the rest of the documentation (docs/cli.md, docs/manual/integration.md) use"Elysia", matching the framework's own homepage branding. I fixed webframeworks/elysia.ts to use"Elysia"so the new test passes.That label change makes two tutorial pages stale, since they embed a literal transcript of the
fedify initprompt showing the old"ElysiaJS"text: I updated docs/tutorial/astro-blog.md, docs/tutorial/microblog.md, and, for consistency, a JSDoc example in packages/init/src/types.ts.Naming mismatch found
mod.tskeylabelbeforelabelafterbare-bonesBare-bonesBare-bonesastroAstroAstroelysiaElysiaJSElysiaElysiaexpressExpressExpresshonoHonoHononextNext.jsNext.jsnitroNitroNitronuxtNuxtNuxtsolidstartSolidStartSolidStartsveltekitSvelteKitSvelteKitImpact of the label change
I searched the codebase for other uses of
"ElysiaJS"and of thelabelfield.labelis only used for display text: thefedify initframework prompt, a package-manager compatibility message, andtest:init's console output. No test or snapshot depends on the exact string, and the generated project files are unaffected. I have ranfedify initinteractively to see the new prompt, and checked it.How I tested this
mise run test:deno packages/init/src/webframeworks.test.tsmise run check-each initAI usage
I used Claude (Sonnet 5) throughout this change: debugging the regex and
split()logic in the test, explaining JavaScript/TypeScript syntax I was unfamiliar with (object shorthand properties, regex anchors,Object.valuesversusObject.keys), researching Elysia's official display name, spotting the two tutorial pages that went stale because of the label change, and reviewing the test for redundant assertions. I wrote and understood the final test and fix myself, and ran the checks above to confirm the result.