Skip to content

Commit 0f73329

Browse files
committed
Merge branch 'main' into fix/input-defaults-spread
2 parents aeab7b7 + e883cd0 commit 0f73329

File tree

180 files changed

+2508
-627
lines changed

Some content is hidden

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

180 files changed

+2508
-627
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,23 @@ jobs:
6060
env:
6161
CI: true
6262
SVELTE_NO_ASYNC: true
63+
TSGo:
64+
permissions: {}
65+
runs-on: ubuntu-latest
66+
timeout-minutes: 5
67+
steps:
68+
- uses: actions/checkout@v4
69+
- uses: pnpm/action-setup@v4
70+
- uses: actions/setup-node@v4
71+
with:
72+
node-version: 24
73+
cache: pnpm
74+
- name: install
75+
run: pnpm install --frozen-lockfile
76+
- name: install tsgo
77+
run: cd packages/svelte && pnpm i -D @typescript/native-preview
78+
- name: type check
79+
run: cd packages/svelte && pnpm check:tsgo
6380
Lint:
6481
permissions: {}
6582
runs-on: ubuntu-latest

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ Test samples are kept in `/test/xxx/samples` folder.
101101
1. To run test, run `pnpm test`.
102102
1. To run a particular test suite, use `pnpm test <suite-name>`, for example:
103103

104-
```bash
104+
```sh
105105
pnpm test validator
106106
```
107107

108108
1. To filter tests _within_ a test suite, use `pnpm test <suite-name> -t <test-name>`, for example:
109109

110-
```bash
110+
```sh
111111
pnpm test validator -t a11y-alt-text
112112
```
113113

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Getting started
44

55
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

7-
```bash
7+
```sh
88
npx sv create myapp
99
cd myapp
1010
npm install

documentation/docs/02-runes/04-$effect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ An effect only reruns when the object it reads changes, not when a property insi
135135

136136
An effect only depends on the values that it read the last time it ran. This has interesting implications for effects that have conditional code.
137137

138-
For instance, if `condition` is `true` in the code snippet below, the code inside the `if` block will run and `color` will be evaluated. As such, changes to either `condition` or `color` [will cause the effect to re-run](/playground/untitled#H4sIAAAAAAAAE21RQW6DMBD8ytaNBJHaJFLViwNIVZ8RcnBgXVk1xsILTYT4e20TQg89IOPZ2fHM7siMaJBx9tmaWpFqjQNlAKXEihx7YVJpdIyfRkY3G4gB8Pi97cPanRtQU8AuwuF_eNUaQuPlOMtc1SlLRWlKUo1tOwJflUikQHZtA0klzCDc64Imx0ANn8bInV1CDhtHgjClrsftcSXotluLybOUb3g4JJHhOZs5WZpuIS9gjNqkJKQP5e2ClrR4SMdZ13E4xZ8zTPOTJU2A2uE_PQ9COCI926_hTVarIU4hu_REPlBrKq2q73ycrf1N-vS4TMUsulaVg3EtR8H9rFgsg8uUsT1B2F9eshigZHBRpuaD0D3mY8Qm2BfB5N2YyRzdNEYVDy0Ja-WsFjcOUuP1HvFLWA6H3XuHTUSmmDV2--0TXonxsKbp7G9C6R__NONS-MFNvxj_d6mBAgAA).
138+
For instance, if `condition` is `true` in the code snippet below, the code inside the `if` block will run and `color` will be evaluated. This means that changes to either `condition` or `color` [will cause the effect to re-run](/playground/untitled#H4sIAAAAAAAAE21RQW6DMBD8ytaNBJHaJFLViwNIVZ8RcnBgXVk1xsILTYT4e20TQg89IOPZ2fHM7siMaJBx9tmaWpFqjQNlAKXEihx7YVJpdIyfRkY3G4gB8Pi97cPanRtQU8AuwuF_eNUaQuPlOMtc1SlLRWlKUo1tOwJflUikQHZtA0klzCDc64Imx0ANn8bInV1CDhtHgjClrsftcSXotluLybOUb3g4JJHhOZs5WZpuIS9gjNqkJKQP5e2ClrR4SMdZ13E4xZ8zTPOTJU2A2uE_PQ9COCI926_hTVarIU4hu_REPlBrKq2q73ycrf1N-vS4TMUsulaVg3EtR8H9rFgsg8uUsT1B2F9eshigZHBRpuaD0D3mY8Qm2BfB5N2YyRzdNEYVDy0Ja-WsFjcOUuP1HvFLWA6H3XuHTUSmmDV2--0TXonxsKbp7G9C6R__NONS-MFNvxj_d6mBAgAA).
139139

140140
Conversely, if `condition` is `false`, `color` will not be evaluated, and the effect will _only_ re-run again when `condition` changes.
141141

documentation/docs/03-template-syntax/06-snippet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,4 +277,4 @@ Snippets can be created programmatically with the [`createRawSnippet`](svelte#cr
277277

278278
## Snippets and slots
279279

280-
In Svelte 4, content can be passed to components using [slots](legacy-slots). Snippets are more powerful and flexible, and as such slots are deprecated in Svelte 5.
280+
In Svelte 4, content can be passed to components using [slots](legacy-slots). Snippets are more powerful and flexible, and so slots have been deprecated in Svelte 5.

documentation/docs/03-template-syntax/[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ It also will not compile Svelte code.
2222

2323
## Styling
2424

25-
Content rendered this way is 'invisible' to Svelte and as such will not receive [scoped styles](scoped-styles) — in other words, this will not work, and the `a` and `img` styles will be regarded as unused:
25+
Content rendered this way is 'invisible' to Svelte and as such will not receive [scoped styles](scoped-styles). In other words, this will not work, and the `a` and `img` styles will be regarded as unused:
2626

2727
<!-- prettier-ignore -->
2828
```svelte

documentation/docs/03-template-syntax/18-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The user of this component has the same flexibility to use a mixture of objects,
7171
</Button>
7272
```
7373

74-
Svelte also exposes the `ClassValue` type, which is the type of value that the `class` attribute on elements accept. This is useful if you want to use a type-safe class name in component props:
74+
Since Svelte 5.19, Svelte also exposes the `ClassValue` type, which is the type of value that the `class` attribute on elements accept. This is useful if you want to use a type-safe class name in component props:
7575

7676
```svelte
7777
<script lang="ts">

documentation/docs/05-special-elements/07-svelte-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The `<svelte:options>` element provides a place to specify per-component compile
1212
- `runes={false}` — forces a component into _legacy mode_
1313
- `namespace="..."` — the namespace where this component will be used, can be "html" (the default), "svg" or "mathml"
1414
- `customElement={...}` — the [options](custom-elements#Component-options) to use when compiling this component as a custom element. If a string is passed, it is used as the `tag` option
15-
- `css="injected"` — the component will inject its styles inline: During server side rendering, it's injected as a `<style>` tag in the `head`, during client side rendering, it's loaded via JavaScript
15+
- `css="injected"` — the component will inject its styles inline: During server-side rendering, it's injected as a `<style>` tag in the `head`, during client side rendering, it's loaded via JavaScript
1616

1717
> [!LEGACY] Deprecated options
1818
> Svelte 4 also included the following options. They are deprecated in Svelte 5 and non-functional in runes mode.

documentation/docs/06-runtime/03-lifecycle-hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If a function is returned from `onMount`, it will be called when the component i
4141
</script>
4242
```
4343

44-
> [!NOTE] This behaviour will only work when the function passed to `onMount` _synchronously_ returns a value. `async` functions always return a `Promise`, and as such cannot _synchronously_ return a function.
44+
> [!NOTE] This behaviour will only work when the function passed to `onMount` is _synchronous_. `async` functions always return a `Promise`.
4545
4646
## `onDestroy`
4747

documentation/docs/07-misc/02-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Unit tests allow you to test small isolated parts of your code. Integration test
1010

1111
To setup Vitest manually, first install it:
1212

13-
```bash
13+
```sh
1414
npm install -D vitest
1515
```
1616

@@ -166,7 +166,7 @@ It is possible to test your components in isolation using Vitest.
166166
167167
To get started, install jsdom (a library that shims DOM APIs):
168168

169-
```bash
169+
```sh
170170
npm install -D jsdom
171171
```
172172

0 commit comments

Comments
 (0)