Skip to content

Add a test to prevent README framework list drift - #991

Open
yerpark wants to merge 4 commits into
fedify-dev:mainfrom
yerpark:issue-888-webframework-list-sync
Open

Add a test to prevent README framework list drift#991
yerpark wants to merge 4 commits into
fedify-dev:mainfrom
yerpark:issue-888-webframework-list-sync

Conversation

@yerpark

@yerpark yerpark commented Aug 9, 2026

Copy link
Copy Markdown

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 label values 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: its label was "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 init prompt 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.ts key label before label after README.md
bare-bones Bare-bones Bare-bones
astro Astro Astro
elysia ElysiaJS Elysia Elysia
express Express Express
hono Hono Hono
next Next.js Next.js
nitro Nitro Nitro
nuxt Nuxt Nuxt
solidstart SolidStart SolidStart
sveltekit SvelteKit SvelteKit

Impact of the label change

I searched the codebase for other uses of "ElysiaJS" and of the label field. label is only used for display text: the fedify init framework prompt, a package-manager compatibility message, and test:init's console output. No test or snapshot depends on the exact string, and the generated project files are unaffected. I have ran fedify init interactively to see the new prompt, and checked it.

How I tested this

  • mise run test:deno packages/init/src/webframeworks.test.ts
  • mise run check-each init

AI 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.values versus Object.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.

yerpark added 4 commits August 9, 2026 20:05
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
@netlify

netlify Bot commented Aug 9, 2026

Copy link
Copy Markdown

Deploy Preview for fedify-json-schema canceled.

Name Link
🔨 Latest commit db1c60f
🔍 Latest deploy log https://app.netlify.com/projects/fedify-json-schema/deploys/6a78902465f09e000812a4c1

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 18a94070-c958-4870-875e-f9c7777e66b6

📥 Commits

Reviewing files that changed from the base of the PR and between 15ad151 and db1c60f.

📒 Files selected for processing (5)
  • docs/tutorial/astro-blog.md
  • docs/tutorial/microblog.md
  • packages/init/src/types.ts
  • packages/init/src/webframeworks.test.ts
  • packages/init/src/webframeworks/elysia.ts

📝 Walkthrough

Walkthrough

The Elysia framework label changes from ElysiaJS to Elysia across the registry and tutorials. A test now checks that README framework labels match the registered framework list.

Changes

Elysia label consistency

Layer / File(s) Summary
Update Elysia framework labels
packages/init/src/webframeworks/elysia.ts, packages/init/src/types.ts, docs/tutorial/astro-blog.md, docs/tutorial/microblog.md
The registry label, type documentation, and tutorial examples now use Elysia instead of ElysiaJS.
Validate README framework labels
packages/init/src/webframeworks.test.ts
The test reads the README framework list and compares its count and sorted labels with the registered framework labels.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

Suggested labels: type/documentation, component/cli

Suggested reviewers: dahlia

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding a test to prevent drift between the README and framework registry.
Description check ✅ Passed The description directly explains the consistency test, Elysia label update, documentation updates, and validation performed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant