Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sveltejs/svelte
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: svelte@5.3.1
Choose a base ref
...
head repository: sveltejs/svelte
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing 937 changed files with 24,823 additions and 17,115 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ env:

jobs:
Tests:
permissions: {}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
@@ -41,6 +42,7 @@ jobs:
env:
CI: true
Lint:
permissions: {}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
@@ -59,8 +61,9 @@ jobs:
run: pnpm lint
- name: build and check generated types
if: (${{ success() }} || ${{ failure() }}) # ensures this step runs even if previous steps fail
run: pnpm build && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please regenerate types locally and commit the changes after you have reviewed them"; git diff; exit 1); }
run: pnpm build && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please regenerate types locally with `cd packages/svelte && pnpm generate:types` and commit the changes after you have reviewed them"; git diff; exit 1); }
Benchmarks:
permissions: {}
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
26 changes: 0 additions & 26 deletions .github/workflows/docs-preview-create-request.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/docs-preview-delete-request.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/ecosystem-ci-trigger.yml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'sveltejs/svelte' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run')
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- uses: actions/github-script@v6
with:
script: |
4 changes: 4 additions & 0 deletions .github/workflows/pkg.pr.new-comment.yml
Original file line number Diff line number Diff line change
@@ -6,11 +6,15 @@ on:
types:
- completed

permissions:
pull-requests: write

jobs:
build:
name: 'Update comment'
runs-on: ubuntu-latest
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- name: Download artifact
uses: actions/download-artifact@v4
with:
4 changes: 3 additions & 1 deletion .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@ on: [push, pull_request]

jobs:
build:
permissions: {}

runs-on: ubuntu-latest

steps:
@@ -12,7 +14,7 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x
cache: pnpm

- name: Install dependencies
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- name: Checkout Repo
uses: actions/checkout@v4
with:
@@ -33,7 +34,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please regenerate types locally and commit the changes after you have reviewed them"; git diff; exit 1); }
run: pnpm build && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please regenerate types locally with `cd packages/svelte && pnpm generate:types` and commit the changes after you have reviewed them"; git diff; exit 1); }

- name: Create Release Pull Request or Publish to npm
id: changesets
22 changes: 0 additions & 22 deletions .github/workflows/sync-request.yml

This file was deleted.

4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ We use [GitHub issues](https://github.com/sveltejs/svelte/issues) for our public

If you have questions about using Svelte, contact us on Discord at [svelte.dev/chat](https://svelte.dev/chat), and we will do our best to answer your questions.

If you see anything you'd like to be implemented, create a [feature request issue](https://github.com/sveltejs/svelte/issues/new?template=feature_request.yml)
If you see anything you'd like to be implemented, create a [feature request issue](https://github.com/sveltejs/svelte/issues/new?template=feature_request.yml).

### Reporting new issues

@@ -62,8 +62,6 @@ When [opening a new issue](https://github.com/sveltejs/svelte/issues/new/choose)

## Pull requests

> HEADS UP: Svelte 5 will likely change a lot on the compiler. For that reason, please don't open PRs that are large in scope, touch more than a couple of files etc. In other words, bug fixes are fine, but big feature PRs will likely not be merged.
### Proposing a change

If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, you can also file an issue with [feature template](https://github.com/sveltejs/svelte/issues/new?template=feature_request.yml).
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016-24 [these people](https://github.com/sveltejs/svelte/graphs/contributors)
Copyright (c) 2016-2025 [Svelte Contributors](https://github.com/sveltejs/svelte/graphs/contributors)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
[![Cybernetically enhanced web apps: Svelte](https://sveltejs.github.io/assets/banner.png)](https://svelte.dev)
<a href="https://svelte.dev">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/banner_dark.png">
<img src="assets/banner.png" alt="Svelte - web development for the rest of us" />
</picture>
</a>

[![license](https://img.shields.io/npm/l/svelte.svg)](LICENSE.md) [![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat)
[![License](https://img.shields.io/npm/l/svelte.svg)](LICENSE.md) [![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat)

## What is Svelte?

@@ -24,10 +29,6 @@ You may view [our roadmap](https://svelte.dev/roadmap) if you'd like to see what

Please see the [Contributing Guide](CONTRIBUTING.md) and the [`svelte`](packages/svelte) package for information on contributing to Svelte.

### svelte.dev

The source code for https://svelte.dev lives in the [sites](https://github.com/sveltejs/svelte/tree/master/sites/svelte.dev) folder, with all the documentation right [here](https://github.com/sveltejs/svelte/tree/master/documentation). The site is built with [SvelteKit](https://svelte.dev/docs/kit).

## Is svelte.dev down?

Probably not, but it's possible. If you can't seem to access any `.dev` sites, check out [this SuperUser question and answer](https://superuser.com/q/1413402).
Binary file added assets/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/banner_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions benchmarking/benchmarks/reactivity/kairo/kairo_avoidable.js
Original file line number Diff line number Diff line change
@@ -20,12 +20,12 @@ function setup() {
return {
destroy,
run() {
$.flush_sync(() => {
$.flush(() => {
$.set(head, 1);
});
assert($.get(computed5) === 6);
for (let i = 0; i < 1000; i++) {
$.flush_sync(() => {
$.flush(() => {
$.set(head, i);
});
assert($.get(computed5) === 6);
@@ -45,7 +45,7 @@ export async function kairo_avoidable_unowned() {
const { run, destroy } = setup();

const { timing } = await fastest_test(10, () => {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 1000; i++) {
run();
}
});
@@ -74,7 +74,7 @@ export async function kairo_avoidable_owned() {
});

const { timing } = await fastest_test(10, () => {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 1000; i++) {
run();
}
});
8 changes: 4 additions & 4 deletions benchmarking/benchmarks/reactivity/kairo/kairo_broad.js
Original file line number Diff line number Diff line change
@@ -25,12 +25,12 @@ function setup() {
return {
destroy,
run() {
$.flush_sync(() => {
$.flush(() => {
$.set(head, 1);
});
counter = 0;
for (let i = 0; i < 50; i++) {
$.flush_sync(() => {
$.flush(() => {
$.set(head, i);
});
assert($.get(last) === i + 50);
@@ -51,7 +51,7 @@ export async function kairo_broad_unowned() {
const { run, destroy } = setup();

const { timing } = await fastest_test(10, () => {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 1000; i++) {
run();
}
});
@@ -80,7 +80,7 @@ export async function kairo_broad_owned() {
});

const { timing } = await fastest_test(10, () => {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 1000; i++) {
run();
}
});
8 changes: 4 additions & 4 deletions benchmarking/benchmarks/reactivity/kairo/kairo_deep.js
Original file line number Diff line number Diff line change
@@ -25,12 +25,12 @@ function setup() {
return {
destroy,
run() {
$.flush_sync(() => {
$.flush(() => {
$.set(head, 1);
});
counter = 0;
for (let i = 0; i < iter; i++) {
$.flush_sync(() => {
$.flush(() => {
$.set(head, i);
});
assert($.get(current) === len + i);
@@ -51,7 +51,7 @@ export async function kairo_deep_unowned() {
const { run, destroy } = setup();

const { timing } = await fastest_test(10, () => {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 1000; i++) {
run();
}
});
@@ -80,7 +80,7 @@ export async function kairo_deep_owned() {
});

const { timing } = await fastest_test(10, () => {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 1000; i++) {
run();
}
});
8 changes: 4 additions & 4 deletions benchmarking/benchmarks/reactivity/kairo/kairo_diamond.js
Original file line number Diff line number Diff line change
@@ -28,13 +28,13 @@ function setup() {
return {
destroy,
run() {
$.flush_sync(() => {
$.flush(() => {
$.set(head, 1);
});
assert($.get(sum) === 2 * width);
counter = 0;
for (let i = 0; i < 500; i++) {
$.flush_sync(() => {
$.flush(() => {
$.set(head, i);
});
assert($.get(sum) === (i + 1) * width);
@@ -55,7 +55,7 @@ export async function kairo_diamond_unowned() {
const { run, destroy } = setup();

const { timing } = await fastest_test(10, () => {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 1000; i++) {
run();
}
});
@@ -84,7 +84,7 @@ export async function kairo_diamond_owned() {
});

const { timing } = await fastest_test(10, () => {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 1000; i++) {
run();
}
});
8 changes: 4 additions & 4 deletions benchmarking/benchmarks/reactivity/kairo/kairo_mux.js
Original file line number Diff line number Diff line change
@@ -22,13 +22,13 @@ function setup() {
destroy,
run() {
for (let i = 0; i < 10; i++) {
$.flush_sync(() => {
$.flush(() => {
$.set(heads[i], i);
});
assert($.get(splited[i]) === i + 1);
}
for (let i = 0; i < 10; i++) {
$.flush_sync(() => {
$.flush(() => {
$.set(heads[i], i * 2);
});
assert($.get(splited[i]) === i * 2 + 1);
@@ -48,7 +48,7 @@ export async function kairo_mux_unowned() {
const { run, destroy } = setup();

const { timing } = await fastest_test(10, () => {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 1000; i++) {
run();
}
});
@@ -77,7 +77,7 @@ export async function kairo_mux_owned() {
});

const { timing } = await fastest_test(10, () => {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 1000; i++) {
run();
}
});
Loading