Skip to content

Commit 3d970d2

Browse files
committed
merge main -> async
2 parents 5bcdb13 + e079ac9 commit 3d970d2

File tree

378 files changed

+6058
-3616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

378 files changed

+6058
-3616
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: Throw on unrendered snippets in `dev`

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212

1313
jobs:
1414
Tests:
15+
permissions: {}
1516
runs-on: ${{ matrix.os }}
1617
timeout-minutes: 15
1718
strategy:
@@ -41,6 +42,7 @@ jobs:
4142
env:
4243
CI: true
4344
Lint:
45+
permissions: {}
4446
runs-on: ubuntu-latest
4547
timeout-minutes: 5
4648
steps:
@@ -61,6 +63,7 @@ jobs:
6163
if: (${{ success() }} || ${{ failure() }}) # ensures this step runs even if previous steps fail
6264
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); }
6365
Benchmarks:
66+
permissions: {}
6467
runs-on: ubuntu-latest
6568
timeout-minutes: 15
6669
steps:

.github/workflows/ecosystem-ci-trigger.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: github.repository == 'sveltejs/svelte' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run')
1111
steps:
12+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
1213
- uses: actions/github-script@v6
1314
with:
1415
script: |

.github/workflows/pkg.pr.new-comment.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ on:
66
types:
77
- completed
88

9+
permissions:
10+
pull-requests: write
11+
912
jobs:
1013
build:
1114
name: 'Update comment'
1215
runs-on: ubuntu-latest
1316
steps:
17+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
1418
- name: Download artifact
1519
uses: actions/download-artifact@v4
1620
with:

.github/workflows/pkg.pr.new.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,16 @@ on: [push, pull_request]
33

44
jobs:
55
build:
6+
permissions: {}
7+
68
runs-on: ubuntu-latest
79

810
steps:
9-
- name: Checkout code
10-
uses: actions/checkout@v4
11-
12-
- name: install corepack
13-
run: npm i -g [email protected]
14-
15-
- run: corepack enable
11+
- uses: actions/checkout@v4
12+
- uses: pnpm/action-setup@v4
1613
- uses: actions/setup-node@v4
1714
with:
18-
node-version: 18.x
15+
node-version: 22.x
1916
cache: pnpm
2017

2118
- name: Install dependencies

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
name: Release
1818
runs-on: ubuntu-latest
1919
steps:
20+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
2021
- name: Checkout Repo
2122
uses: actions/checkout@v4
2223
with:

benchmarking/compare/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import fs from 'node:fs';
22
import path from 'node:path';
33
import { execSync, fork } from 'node:child_process';
44
import { fileURLToPath } from 'node:url';
5-
import { benchmarks } from '../benchmarks.js';
65

76
// if (execSync('git status --porcelain').toString().trim()) {
87
// console.error('Working directory is not clean');

benchmarking/compare/runner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { benchmarks } from '../benchmarks.js';
1+
import { reactivity_benchmarks } from '../benchmarks/reactivity/index.js';
22

33
const results = [];
4-
for (const benchmark of benchmarks) {
4+
for (const benchmark of reactivity_benchmarks) {
55
const result = await benchmark();
66
console.error(result.benchmark);
77
results.push(result);

documentation/docs/01-introduction/02-getting-started.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Getting started
33
---
44

5-
We recommend using [SvelteKit](../kit), the official application framework from the Svelte team powered by [Vite](https://vite.dev/):
5+
We recommend using [SvelteKit](../kit), which lets you [build almost anything](../kit/project-types). It's the official application framework from the Svelte team and powered by [Vite](https://vite.dev/). Create a new project with:
66

77
```bash
88
npx sv create myapp
@@ -15,7 +15,9 @@ Don't worry if you don't know Svelte yet! You can ignore all the nice features S
1515

1616
## Alternatives to SvelteKit
1717

18-
You can also use Svelte directly with Vite by running `npm create vite@latest` and selecting the `svelte` option. With this, `npm run build` will generate HTML, JS and CSS files inside the `dist` directory using [vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte). In most cases, you will probably need to [choose a routing library](faq#Is-there-a-router) as well.
18+
You can also use Svelte directly with Vite by running `npm create vite@latest` and selecting the `svelte` option. With this, `npm run build` will generate HTML, JS, and CSS files inside the `dist` directory using [vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte). In most cases, you will probably need to [choose a routing library](faq#Is-there-a-router) as well.
19+
20+
>[!NOTE] Vite is often used in standalone mode to build [single page apps (SPAs)](../kit/glossary#SPA), which you can also [build with SvelteKit](../kit/single-page-apps).
1921
2022
There are also plugins for [Rollup](https://github.com/sveltejs/rollup-plugin-svelte), [Webpack](https://github.com/sveltejs/svelte-loader) [and a few others](https://sveltesociety.dev/packages?category=build-plugins), but we recommend Vite.
2123

documentation/docs/01-introduction/04-svelte-js-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: .svelte.js and .svelte.ts files
44

55
Besides `.svelte` files, Svelte also operates on `.svelte.js` and `.svelte.ts` files.
66

7-
These behave like any other `.js` or `.ts` module, except that you can use runes. This is useful for creating reusable reactive logic, or sharing reactive state across your app.
7+
These behave like any other `.js` or `.ts` module, except that you can use runes. This is useful for creating reusable reactive logic, or sharing reactive state across your app (though note that you [cannot export reassigned state]($state#Passing-state-across-modules)).
88

99
> [!LEGACY]
1010
> This is a concept that didn't exist prior to Svelte 5

0 commit comments

Comments
 (0)