Open-Source Wikis

/

Svelte

/

Lore

sveltejs/svelte

Lore

Active contributors: Rich Harris, Simon H, Dominic Gannaway

Timeline of how Svelte's codebase got to where it is. Dates derive from git tags and commit timestamps in this repository.

Eras

Origins (Nov 2016 – Nov 2017)

The first commit, fc7e6e6 "initial commit", lands on 2016-11-15 authored by Rich Harris. By 2016-11-29 the project has cut v1.0.0. The early Svelte was a small framework that Rich had been thinking about as "Ractive without the runtime" — a compiler that produces vanilla DOM JS, no virtual DOM. The compiler was monolithic; runtime helpers were inlined into each compiled component.

Key events:

  • 2016-11-15 — first commit ("initial commit").
  • 2016-11-29v1.0.0 tag.
  • 2017 — 1,558 commits, the highest yearly total before 2019. Most of the early API surface lands here.

v2 — terser API and <style> scoping (Nov 2017 – Apr 2018)

v2.0.0 landed on 2018-04-19. It tightened the API but kept the same compiler architecture. Style scoping via class hashing arrives in this era (the precursor to today's css-prune.js).

Key events:

  • 2018-04-19v2.0.0 tag.

v3 — reactivity rewrite (Apr 2018 – Apr 2019)

The most-cited rewrite in Svelte's history. The mantra was "Svelte should let the compiler do more, so the runtime is smaller". The $: reactive label syntax replaces lifecycle plumbing for derived values. The assign-then-trigger model replaces explicit set() calls in components.

Key events:

  • 2019-04-21v3.0.0 tag.
  • The 2019 commit count peaks at 2,280 — the highest year on record until 2024.

This era introduces the directory layout (compiler/runtime split) that survives to today, though all files have been replaced multiple times.

v4 — incremental polish (2021 – Jun 2023)

A relatively quiet era for the core. Most of the focus was on TypeScript ergonomics, SvelteKit (sveltejs/kit), and language-tools (sveltejs/language-tools). The 2020–2022 commit counts (520, 517, 355) are the lowest contiguous window in the project's history.

Key events:

  • Jun 2023svelte@4.0.0. Smaller, faster compile output; modernized peerDeps.

v5 / runes (mid-2023 – Oct 2024)

The most ambitious rewrite since v3. The $state, $derived, $effect runes replace the implicit reactivity of $:. The runtime gets a fine-grained signals system (Source, Derived, Effect, Batch) — a major departure from v3/v4's per-component scheduler. Async-aware effects and <svelte:boundary> arrive in the same window.

This era explains the present file layout under packages/svelte/src/internal/client/reactivity/ — every file in that directory was added or substantially rewritten.

Key events:

  • 2024-10-19svelte@5.0.0. The repo recorded over 270 prerelease tags (5.0.0-next.1 through 5.0.0-next.272) before the stable ship.
  • 2024 — 2,054 commits, second-highest year ever.
  • Oct 2024 — directory packages/svelte/src/reactivity/ reaches its current shape with SvelteMap, SvelteSet, SvelteDate, SvelteURL, etc.

Post-v5 maintenance + async expansion (Nov 2024 – present)

Since the v5 release, the heaviest churn has been on the reactivity scheduler (reactivity/batch.js modified 34 times in 90 days), async behaviour (reactivity/async.js, reactivity/deriveds.js), and the boundary block (dom/blocks/boundary.js). The TestNoAsync CI job (SVELTE_NO_ASYNC=true) was added to keep the legacy non-async path correct.

Key events:

  • 2025–2026 — recent versions are in the 5.5x.x range; 5.55.5 is current at the time of writing (packages/svelte/src/version.js).
  • New "attachments" API ({@attach}, packages/svelte/src/attachments/) introduced and added to the public surface.

Longest-standing features

These are the parts of the codebase that have weathered the most rewrites and are still actively used:

  • Storespackages/svelte/src/store/shared/index.js. The writable / readable / derived API has been API-stable since v3 (Apr 2019); it's deprecated in favor of runes for new code but fully supported.
  • Easing functionspackages/svelte/src/easing/index.js. A single file of mathematical functions; effectively unchanged for years.
  • Built-in transitions (fade, fly, slide, scale) — packages/svelte/src/transition/index.js. Public API stable since v3.
  • HTML entities tablepackages/svelte/src/compiler/phases/1-parse/utils/entities.js. The biggest single file in the repo (2,234 lines) is essentially a static lookup table.
  • createEventDispatcher — present since v3 (deprecated in v5 but still supported, see packages/svelte/src/index-client.js).

Deprecated features

  • Class components — Svelte 3/4 components were classes. v5 made functional components the default; createClassComponent from packages/svelte/src/legacy/legacy-client.js provides a wrapper for legacy callers.
  • beforeUpdate / afterUpdate — replaced by $effect.pre / $effect. Marked @deprecated in index-client.js.
  • createEventDispatcher — replaced by callback props and the $host() rune. Marked @deprecated.
  • spring() / tweened() (function form) — replaced by Spring and Tween classes in packages/svelte/src/motion/.
  • $store_name auto-subscribe shorthand — only valid in legacy mode; runes mode requires fromStore(store) instead.

Major rewrites

Rewrite When Replaced
Reactive labels ($:) Apr 2019 (v3) oncreate / set / lifecycle plumbing
Functional components Oct 2024 (v5) Class components
Fine-grained signals reactivity Oct 2024 (v5) Per-component update scheduler
Runes ($state, $derived, ...) Oct 2024 (v5) let + $: declarations
Comment-based hydration Oct 2024 (v5) Marker-attribute hydration
Async-aware reactivity 2024–2025 (new — no predecessor)

Growth trajectory

  • 1 → 2 → 3 → 4 → 5 — five major versions over ten years.
  • Prerelease density: the v5 cycle alone produced ~270 prereleases across 2023–2024.
  • The repo went from a single-package layout to a pnpm workspace partway through v3's lifetime; today's pnpm-workspace.yaml declares only packages/* and playgrounds/* (the svelte/kit and svelte/language-tools repos are separate).

For per-file change frequency see By the numbers. For the people behind these eras, see Maintainers.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Lore – Svelte wiki | Factory