Skip to content

Add SvelteKit support to fedify init - #971

Open
Palcimer wants to merge 4 commits into
fedify-dev:mainfrom
Palcimer:issue-892-add-sveltekit-fedify-init
Open

Add SvelteKit support to fedify init#971
Palcimer wants to merge 4 commits into
fedify-dev:mainfrom
Palcimer:issue-892-add-sveltekit-fedify-init

Conversation

@Palcimer

Copy link
Copy Markdown
Contributor

Summary

Fedify already has a SvelteKit integration package and an example app, but fedify init command could not scaffold a SvelteKit project. Added a SvelteKit web framework option to @fedify/init.

Assisted-by: Claude Code:claude-sonnet-5

Related issue

Changes

  • Added webframeworks/sveltekit.ts which defines the WebFrameworkDescription and scaffolding command for SvelteKit.
  • Added a template file(hooks.server.ts) that integrates Fedify into a SvelteKit app.
  • Updated @fedify/init README.md and a tutorial document to include SvelteKit support.
  • Skipped the deno lookup test for SvelteKit, matching Astro, Nuxt and SolidStart, since Vite can't resolve @fedify/* packages that are only linked through Deno's local workspace links.

Benefits

  • Users can generate a SvelteKit app using fedify init.

Checklist

  • Did you add a changelog entry to the CHANGES.md?
  • Did you write some relevant docs about this change (if it's a new feature)?
  • [] Did you write a regression test to reproduce the bug (if it's a bug fix)?
  • [] Did you write some tests for this change (if it's a new feature)?
  • Did you run mise test on your machine?

Palcimer added 4 commits July 27, 2026 19:39
Fedify already ships a SvelteKit integration package and example app,
but `fedify init` couldn't scaffold one, so add a `sveltekit` option
via `sv create`.

fedify-dev#892

Assisted-by: Claude Code:claude-sonnet-5
@netlify

netlify Bot commented Jul 27, 2026

Copy link
Copy Markdown

👷 Deploy Preview for fedify-json-schema processing.

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

@netlify

netlify Bot commented Jul 27, 2026

Copy link
Copy Markdown

Deploy Preview for fedify-json-schema canceled.

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

@coderabbitai

coderabbitai Bot commented Jul 27, 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: e4bc5764-b167-4440-8545-0381dadf8f26

📥 Commits

Reviewing files that changed from the base of the PR and between 1eadcb0 and df7e087.

📒 Files selected for processing (11)
  • CHANGES.md
  • docs/tutorial/microblog.md
  • packages/init/README.md
  • packages/init/src/const.ts
  • packages/init/src/templates/sveltekit/hooks.server.ts.tpl
  • packages/init/src/test/action.ts
  • packages/init/src/test/lookup.ts
  • packages/init/src/test/port.ts
  • packages/init/src/types.ts
  • packages/init/src/webframeworks/mod.ts
  • packages/init/src/webframeworks/sveltekit.ts

📝 Walkthrough

Walkthrough

fedify init now supports SvelteKit project scaffolding, including package-manager-specific creation commands, Fedify hook generation, registry wiring, test handling, and documentation updates.

Changes

SvelteKit init support

Layer / File(s) Summary
SvelteKit scaffolding and registration
packages/init/src/const.ts, packages/init/src/webframeworks/*, packages/init/src/templates/sveltekit/*
Adds SvelteKit to the framework registry and generates projects with dependencies, tasks, initialization commands, and a Fedify hooks.server.ts integration.
Test and configuration handling
packages/init/src/test/*, packages/init/src/types.ts
Updates SvelteKit port replacement, records the unsupported Deno remote-package case, adjusts import typing, and refreshes identifier comments.
Documentation and release notes
packages/init/README.md, docs/tutorial/microblog.md, CHANGES.md
Documents SvelteKit in supported options, the interactive prompt, and the 2.4.0 changelog.

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

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant FedifyInit
  participant SvelteKitCLI
  participant GeneratedApp
  User->>FedifyInit: Select SvelteKit and package manager
  FedifyInit->>SvelteKitCLI: Run the SvelteKit create command
  SvelteKitCLI->>GeneratedApp: Create the project
  FedifyInit->>GeneratedApp: Write the Fedify SvelteKit hook
Loading

Possibly related issues

Possibly related PRs

Suggested labels: integration/sveltekit, component/cli, type/documentation

Suggested reviewers: 2chanhaeng

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding SvelteKit support to fedify init.
Description check ✅ Passed The description is directly related and accurately describes the SvelteKit scaffolding and docs updates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.25806% with 11 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/sveltekit.ts 87.03% 3 Missing and 4 partials ⚠️
packages/init/src/test/port.ts 0.00% 4 Missing ⚠️
Files with missing lines Coverage Δ
packages/init/src/const.ts 100.00% <100.00%> (ø)
packages/init/src/test/lookup.ts 24.06% <100.00%> (+0.57%) ⬆️
packages/init/src/webframeworks/mod.ts 100.00% <100.00%> (ø)
packages/init/src/test/port.ts 14.28% <0.00%> (-0.25%) ⬇️
packages/init/src/webframeworks/sveltekit.ts 87.03% <87.03%> (ø)

... and 1 file 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.

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.

Add SvelteKit support to fedify init

1 participant