Skip to content

Commit 13e1cc5

Browse files
committed
Merge branch 'main' into llms-txt
2 parents 08f1aea + 65825d3 commit 13e1cc5

File tree

7 files changed

+16
-89
lines changed

7 files changed

+16
-89
lines changed

apps/svelte.dev/content/docs/svelte/98-reference/.generated/client-warnings.md

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -204,46 +204,6 @@ Consider the following code:
204204
205205
To fix it, either create callback props to communicate changes, or mark `person` as [`$bindable`]($bindable).
206206
207-
### reactive_declaration_non_reactive_property
208-
209-
```
210-
A `$:` statement (%location%) read reactive state that was not visible to the compiler. Updates to this state will not cause the statement to re-run. The behaviour of this code will change if you migrate it to runes mode
211-
```
212-
213-
In legacy mode, a `$:` [reactive statement](https://svelte.dev/docs/svelte/legacy-reactive-assignments) re-runs when the state it _references_ changes. This is determined at compile time, by analysing the code.
214-
215-
In runes mode, effects and deriveds re-run when there are changes to the values that are read during the function's _execution_.
216-
217-
Often, the result is the same — for example these can be considered equivalent:
218-
219-
```js
220-
let a = 1, b = 2, sum = 3;
221-
// ---cut---
222-
$: sum = a + b;
223-
```
224-
225-
```js
226-
let a = 1, b = 2;
227-
// ---cut---
228-
const sum = $derived(a + b);
229-
```
230-
231-
In some cases — such as the one that triggered the above warning — they are _not_ the same:
232-
233-
```js
234-
let a = 1, b = 2, sum = 3;
235-
// ---cut---
236-
const add = () => a + b;
237-
238-
// the compiler can't 'see' that `sum` depends on `a` and `b`, but
239-
// they _would_ be read while executing the `$derived` version
240-
$: sum = add();
241-
```
242-
243-
Similarly, reactive properties of [deep state](https://svelte.dev/docs/svelte/$state#Deep-state) are not visible to the compiler. As such, changes to these properties will cause effects and deriveds to re-run but will _not_ cause `$:` statements to re-run.
244-
245-
When you [migrate this component](https://svelte.dev/docs/svelte/v5-migration-guide) to runes mode, the behaviour will change accordingly.
246-
247207
### state_proxy_equality_mismatch
248208
249209
```

apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-reactivity-window.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ on Firefox and Safari it won't.
4747

4848
```dts
4949
const devicePixelRatio: {
50-
get current(): number;
50+
get current(): number | undefined;
5151
};
5252
```
5353

apps/svelte.dev/content/docs/svelte/98-reference/30-runtime-warnings.md

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -211,46 +211,6 @@ Consider the following code:
211211
212212
To fix it, either create callback props to communicate changes, or mark `person` as [`$bindable`]($bindable).
213213
214-
### reactive_declaration_non_reactive_property
215-
216-
```
217-
A `$:` statement (%location%) read reactive state that was not visible to the compiler. Updates to this state will not cause the statement to re-run. The behaviour of this code will change if you migrate it to runes mode
218-
```
219-
220-
In legacy mode, a `$:` [reactive statement](https://svelte.dev/docs/svelte/legacy-reactive-assignments) re-runs when the state it _references_ changes. This is determined at compile time, by analysing the code.
221-
222-
In runes mode, effects and deriveds re-run when there are changes to the values that are read during the function's _execution_.
223-
224-
Often, the result is the same — for example these can be considered equivalent:
225-
226-
```js
227-
let a = 1, b = 2, sum = 3;
228-
// ---cut---
229-
$: sum = a + b;
230-
```
231-
232-
```js
233-
let a = 1, b = 2;
234-
// ---cut---
235-
const sum = $derived(a + b);
236-
```
237-
238-
In some cases — such as the one that triggered the above warning — they are _not_ the same:
239-
240-
```js
241-
let a = 1, b = 2, sum = 3;
242-
// ---cut---
243-
const add = () => a + b;
244-
245-
// the compiler can't 'see' that `sum` depends on `a` and `b`, but
246-
// they _would_ be read while executing the `$derived` version
247-
$: sum = add();
248-
```
249-
250-
Similarly, reactive properties of [deep state](https://svelte.dev/docs/svelte/$state#Deep-state) are not visible to the compiler. As such, changes to these properties will cause effects and deriveds to re-run but will _not_ cause `$:` statements to re-run.
251-
252-
When you [migrate this component](https://svelte.dev/docs/svelte/v5-migration-guide) to runes mode, the behaviour will change accordingly.
253-
254214
### state_proxy_equality_mismatch
255215
256216
```

apps/svelte.dev/src/lib/server/content.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ const documents = import.meta.glob<string>('../../../content/**/*.md', {
1010
import: 'default'
1111
});
1212

13-
const assets = import.meta.glob<string>('../../../content/**/+assets/**', {
14-
eager: true,
15-
query: '?url',
16-
import: 'default'
17-
});
13+
const assets = import.meta.glob<string>(
14+
['../../../content/**/+assets/**', '../../../content/**/+assets/**/.env'],
15+
{
16+
eager: true,
17+
query: '?url',
18+
import: 'default'
19+
}
20+
);
1821

1922
export const documentsContent = import.meta.glob<string>('../../../content/**/*.md', {
2023
eager: true,

apps/svelte.dev/src/routes/+error.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
If you were expecting to find something here, please drop by the
2222
<a href="/chat"> Discord chatroom </a>
2323
and let us know, or raise an issue on
24-
<a href="https://github.com/sveltejs/sites">GitHub</a>. Thanks!
24+
<a href="https://github.com/sveltejs/svelte.dev/issues">GitHub</a>. Thanks!
2525
</p>
2626
{:else}
2727
<h1>Yikes!</h1>

apps/svelte.dev/src/routes/e/tmp/codes.json/+server.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ const codes: Record<string, Record<string, string[]>> = {};
1414

1515
for (const page of reference) {
1616
const grouped: Record<string, string[]> = {};
17-
const sections = page.body.split(/(^|\n)## /g).slice(1);
17+
const sections = page.body.split(/(^|\n)## /g);
18+
19+
if (sections.length > 1) {
20+
sections.shift();
21+
}
1822

1923
for (const section of sections) {
2024
const lines = section.slice(section.startsWith('\n') ? 1 : 0).split('\n');

packages/repl/src/lib/workers/bundler/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ async function get_bundle(
291291
const pkg_url =
292292
pkg_name === 'svelte'
293293
? `${svelte_url}/package.json`
294-
: `${packages_url}/${pkg_name}/package.json`;
294+
: `${packages_url}/${pkg_name}@${match[2] ?? 'latest'}/package.json`;
295295
const subpath = `.${match[3] ?? ''}`;
296296

297297
// if this was imported by one of our files, add it to the `imports` set

0 commit comments

Comments
 (0)