sveltejs/svelte
By the numbers
Active contributors: Rich Harris, Simon H, Dominic Gannaway
Data collected on 2026-04-30 from commit 572444a69.
Size
| Metric | Lines |
|---|---|
Source JavaScript (packages/svelte/src/**/*.js, no tests) |
62,334 |
Source TypeScript declarations (*.ts, *.d.ts) |
3,744 |
Co-located unit tests (src/**/*.test.*) |
2,304 |
Vitest test corpus under packages/svelte/tests/ |
74,522 |
Total (*.js + *.ts source + tests) |
142,904 |
There are 410 source files under packages/svelte/src/ and exactly one published package, svelte. The repo is a pnpm workspace with packages/* (one entry) and playgrounds/* declared in pnpm-workspace.yaml.
Language breakdown (source only, excluding tests)
xychart-beta horizontal
title "Lines of code by language (packages/svelte/src/)"
x-axis [JavaScript, TypeScript]
y-axis "Lines" 0 --> 65000
bar [62334, 3744]The Svelte source is intentionally JavaScript-first — TypeScript is used only for .d.ts declarations and a handful of internal type-helper files. The tests directory is a different mix (most tests are in .test.ts).
Single-file complexity
Largest source files (all under packages/svelte/):
| File | Lines |
|---|---|
src/compiler/phases/1-parse/utils/entities.js |
2,234 |
src/compiler/migrate/index.js |
1,998 |
src/compiler/errors.js (generated) |
1,718 |
src/compiler/phases/scope.js |
1,471 |
src/compiler/phases/2-analyze/index.js |
1,325 |
src/internal/client/reactivity/batch.js |
1,280 |
src/compiler/phases/2-analyze/css/css-prune.js |
1,247 |
src/internal/server/renderer.js |
945 |
src/compiler/phases/1-parse/state/element.js |
950 |
src/compiler/warnings.js (generated) |
844 |
src/internal/client/runtime.js |
837 |
The biggest single file is the HTML entities table (entities.js) — pure data. The biggest hand-authored file is the Svelte 4 → 5 migration codemod.
Activity
| Window | Commits |
|---|---|
| Last 30 days | 47 |
| Last 90 days | 258 |
| All-time | 11,150 |
The repo's first commit is fc7e6e6 from 2016-11-15.
xychart-beta horizontal
title "Commits per year"
x-axis [2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026]
y-axis "Commits" 0 --> 2500
bar [408, 1558, 1288, 2280, 520, 517, 355, 860, 2054, 955, 355]The 2024 spike corresponds to the Svelte 5 push (the 5.0.0 tag landed 2024-10-19). The lower 2020-2022 numbers reflect the Svelte-3-mature, Svelte-4-incremental period.
Churn hotspots (last 90 days)
Files modified most often in the last 90 days:
| File | Touches |
|---|---|
packages/svelte/package.json |
41 |
packages/svelte/CHANGELOG.md |
35 |
packages/svelte/src/version.js |
34 |
packages/svelte/src/internal/client/reactivity/batch.js |
34 |
packages/svelte/src/internal/client/reactivity/deriveds.js |
16 |
packages/svelte/src/internal/server/renderer.js |
12 |
packages/svelte/src/internal/client/reactivity/effects.js |
12 |
packages/svelte/src/internal/client/reactivity/async.js |
11 |
packages/svelte/src/internal/client/dom/blocks/boundary.js |
9 |
package.json, CHANGELOG.md, and version.js churn is dominated by changesets-driven release commits. The reactivity scheduler (batch.js) is the most-modified hand-authored file — consistent with it being the most-watched correctness target in Svelte 5.
Bot-attributed commits
675 / 11,150 commits (~6.1%) carry an explicit Co-authored-by: ...[bot] trailer. This is a lower bound on AI/bot involvement — inline tools like Copilot and Cursor don't leave a trace. The most common bot is changeset-bot, which authors the release-prep commits.
Contributors
Top contributors over the package's full history (excluding [bot] accounts), based on commit count:
| Author | Commits |
|---|---|
| Rich Harris | 3,983 (across the Rich Harris and Rich-Harris aliases — and a small number under Richard Harris) |
| Conduitry | 804 |
| Simon H | 696 |
| Dominic Gannaway | 497 |
| Tan Li Hau | 320 |
| Ben McCann | 246 |
| Paolo Ricciuti | 245 |
| Puru Vijay | 118 |
There are 921 unique commit authors all-time. The bus factor on the core reactivity engine is low (Rich, Dominic, Simon are the top three by edits to internal/client/reactivity/).
Dependencies
packages/svelte/package.json declares:
- 16 runtime dependencies (notable:
acorn,magic-string,esrap,zimmerframe,clsx,devalue,aria-query,axobject-query). - 15 devDependencies (Rollup, Vitest, Playwright, esbuild, dts-buddy, etc.).
The top-level package.json adds 16 more devDependencies for the monorepo (changesets, eslint configs, prettier, vitest coverage).
See also
- Lore for the timeline narrative.
- Maintainers for ownership mapping.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.