sveltejs/svelte
Development workflow
Active contributors: Rich Harris, Ben McCann, Simon H
Daily loop
- Branch from
main. PRs targetmainonly. - Run the watcher. From
packages/svelte/:
This runs Rollup in watch mode andpnpm devnode scripts/process-messages -w, which regeneratessrc/compiler/errors.jsandsrc/compiler/warnings.jswhenever you change a file underpackages/svelte/messages/. - Write code or tests —
packages/svelte/src/...for code,packages/svelte/tests/...for tests. - Run a focused test to iterate quickly:
pnpm test runtime-runes -t "your test name" # or FILTER=your-test-name pnpm test runtime-runes - Open a playground for ad-hoc verification:
cd playgrounds/sandbox && pnpm dev(when present). - Generate a changeset (only for user-visible changes):
npx changeset
Test in another local project
Per CONTRIBUTING.md, you can install a PR's branch directly:
pnpm add -D "github:sveltejs/svelte#path:packages/svelte&branch-name"Editing error/warning messages
Messages are authored in markdown under packages/svelte/messages/{client-errors,client-warnings,compile-errors,compile-warnings,server-errors,server-warnings,shared-errors,shared-warnings}/. The process-messages script (run by pnpm dev and pnpm generate) parses those files and emits:
packages/svelte/src/compiler/errors.js(~1.7k lines, fully generated)packages/svelte/src/compiler/warnings.jspackages/svelte/src/internal/client/errors.js,warnings.jspackages/svelte/src/internal/server/errors.js,warnings.jspackages/svelte/src/internal/shared/errors.js,warnings.js
Do not hand-edit any of those .js files; the CI lint job will reject the PR.
Editing types
Types are auto-generated from JSDoc + .d.ts sources via dts-buddy and rolled up into packages/svelte/types/. To refresh:
cd packages/svelte
pnpm generate:typesThe Lint CI job runs pnpm build and diffs the working tree — any uncommitted generated changes will fail the PR.
Commit conventions
There's no enforced commit-message template. Existing history uses Conventional-Commit-style prefixes (fix:, feat:, chore:, docs:) followed by a PR number — e.g. fix: ignore false-positive errors of $inspect dependencies (#18106).
See also
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.