From 531bf37446fae17e60d14370321880849a764ec9 Mon Sep 17 00:00:00 2001
From: Chris <845152+LWChris@users.noreply.github.com>
Date: Thu, 12 Oct 2023 08:47:14 +0200
Subject: [PATCH 01/53] docs: update README.md (#516)
Adjust source code snippet according to modifications from previous step.
---
.../01-svelte/01-introduction/03-dynamic-attributes/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/tutorial/01-svelte/01-introduction/03-dynamic-attributes/README.md b/content/tutorial/01-svelte/01-introduction/03-dynamic-attributes/README.md
index e03524b1a..6c325239f 100644
--- a/content/tutorial/01-svelte/01-introduction/03-dynamic-attributes/README.md
+++ b/content/tutorial/01-svelte/01-introduction/03-dynamic-attributes/README.md
@@ -32,5 +32,5 @@ It's not uncommon to have an attribute where the name and value are the same, li
```svelte
/// file: App.svelte
-
+
```
From 0c9e5584bb97cc4e0cdb39eea1045b3d6dc5280f Mon Sep 17 00:00:00 2001
From: MacFJA
Date: Mon, 16 Oct 2023 23:23:45 +0200
Subject: [PATCH 02/53] Fix diff syntax color in dark mode (#521)
---
src/app.css | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/app.css b/src/app.css
index ad8d0b41e..f2bbb57d1 100644
--- a/src/app.css
+++ b/src/app.css
@@ -23,6 +23,9 @@ button:focus-visible {
pre.language-diff code {
color: rgba(0, 0, 0, 0.4);
}
+.dark pre.language-diff code {
+ color: rgba(255, 255, 255, 0.4);
+}
.language-diff .inserted,
.language-diff .deleted {
From 9379080aea9f678467bf6e0c29412667a991d531 Mon Sep 17 00:00:00 2001
From: Michael Baker
Date: Wed, 13 Dec 2023 04:21:21 -0500
Subject: [PATCH 03/53] docs: minor grammar cleanup (#538)
---
.../tutorial/03-sveltekit/08-stores/03-updated-store/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/tutorial/03-sveltekit/08-stores/03-updated-store/README.md b/content/tutorial/03-sveltekit/08-stores/03-updated-store/README.md
index 23f034492..e910c4dc7 100644
--- a/content/tutorial/03-sveltekit/08-stores/03-updated-store/README.md
+++ b/content/tutorial/03-sveltekit/08-stores/03-updated-store/README.md
@@ -4,7 +4,7 @@ title: updated
The `updated` store contains `true` or `false` depending on whether a new version of the app has been deployed since the page was first opened. For this to work, your `svelte.config.js` must specify `kit.version.pollInterval`.
-Version changes only happens in production, not during development. For that reason, `$updated` will always be `false` in this tutorial.
+Version changes only happen in production, not during development. For that reason, `$updated` will always be `false` in this tutorial.
You can manually check for new versions, regardless of `pollInterval`, by calling `updated.check()`.
From f0cf7ad93007ddccaf7ce9bd95318d95ebabb212 Mon Sep 17 00:00:00 2001
From: fubar1337 <133132398+fubar1337@users.noreply.github.com>
Date: Thu, 14 Dec 2023 20:45:46 +0100
Subject: [PATCH 04/53] Updating status code references (#388)
* Update README.md
* Update +error.svelte
* Update +error.svelte
* Update README.md
---
content/tutorial/01-svelte/common/src/routes/+error.svelte | 2 +-
.../tutorial/02-advanced-svelte/common/src/routes/+error.svelte | 2 +-
.../03-sveltekit/07-api-routes/02-post-handlers/README.md | 2 +-
.../03-sveltekit/07-api-routes/03-other-handlers/README.md | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/content/tutorial/01-svelte/common/src/routes/+error.svelte b/content/tutorial/01-svelte/common/src/routes/+error.svelte
index 064ed23cb..7e25aa26e 100644
--- a/content/tutorial/01-svelte/common/src/routes/+error.svelte
+++ b/content/tutorial/01-svelte/common/src/routes/+error.svelte
@@ -11,7 +11,7 @@
code
{$page.status}
diff --git a/content/tutorial/02-advanced-svelte/common/src/routes/+error.svelte b/content/tutorial/02-advanced-svelte/common/src/routes/+error.svelte
index 930ccfd10..fb5551052 100644
--- a/content/tutorial/02-advanced-svelte/common/src/routes/+error.svelte
+++ b/content/tutorial/02-advanced-svelte/common/src/routes/+error.svelte
@@ -11,7 +11,7 @@
code
{$page.status}
diff --git a/content/tutorial/03-sveltekit/07-api-routes/02-post-handlers/README.md b/content/tutorial/03-sveltekit/07-api-routes/02-post-handlers/README.md
index d85a3f2f2..8df0f2de9 100644
--- a/content/tutorial/03-sveltekit/07-api-routes/02-post-handlers/README.md
+++ b/content/tutorial/03-sveltekit/07-api-routes/02-post-handlers/README.md
@@ -51,7 +51,7 @@ export async function POST({ request, cookies }) {
As with `load` functions and form actions, the `request` is a standard [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) object; `await request.json()` returns the data that we posted from the event handler.
-We're returning a response with a [201 Created](https://httpstatusdogs.com/201-created) status and the `id` of the newly generated todo in our database. Back in the event handler, we can use this to update the page:
+We're returning a response with a [201 Created](https://http.dog/201) status and the `id` of the newly generated todo in our database. Back in the event handler, we can use this to update the page:
```svelte
/// file: src/routes/+page.svelte
diff --git a/content/tutorial/03-sveltekit/07-api-routes/03-other-handlers/README.md b/content/tutorial/03-sveltekit/07-api-routes/03-other-handlers/README.md
index b27606b61..24357d492 100644
--- a/content/tutorial/03-sveltekit/07-api-routes/03-other-handlers/README.md
+++ b/content/tutorial/03-sveltekit/07-api-routes/03-other-handlers/README.md
@@ -24,7 +24,7 @@ export async function DELETE({ params, cookies }) {
}
```
-Since we don't need to return any actual data to the browser, we're returning an empty [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) with a [204 No Content](https://httpstatusdogs.com/204-no-content) status.
+Since we don't need to return any actual data to the browser, we're returning an empty [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) with a [204 No Content](https://http.dog/204) status.
We can now interact with this endpoint inside our event handlers:
From 76a1389e76bb9e7eb7a2d93042dd3ec2ca2272e1 Mon Sep 17 00:00:00 2001
From: Rich Harris
Date: Thu, 14 Dec 2023 14:55:48 -0500
Subject: [PATCH 05/53] make visited a boolean (#539)
Co-authored-by: Rich Harris
---
.../03-sveltekit/04-headers-and-cookies/02-cookies/README.md | 4 ++--
.../02-cookies/app-a/src/routes/+page.server.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/content/tutorial/03-sveltekit/04-headers-and-cookies/02-cookies/README.md b/content/tutorial/03-sveltekit/04-headers-and-cookies/02-cookies/README.md
index 252008899..156b748f6 100644
--- a/content/tutorial/03-sveltekit/04-headers-and-cookies/02-cookies/README.md
+++ b/content/tutorial/03-sveltekit/04-headers-and-cookies/02-cookies/README.md
@@ -12,7 +12,7 @@ export function load(+++{ cookies }+++) {
+++const visited = cookies.get('visited');+++
return {
- visited
+ visited: visited === 'true'
};
}
```
@@ -27,7 +27,7 @@ export function load({ cookies }) {
+++cookies.set('visited', 'true', { path: '/' });+++
return {
- visited
+ visited: visited === 'true'
};
}
```
diff --git a/content/tutorial/03-sveltekit/04-headers-and-cookies/02-cookies/app-a/src/routes/+page.server.js b/content/tutorial/03-sveltekit/04-headers-and-cookies/02-cookies/app-a/src/routes/+page.server.js
index 4be89201b..19467be55 100644
--- a/content/tutorial/03-sveltekit/04-headers-and-cookies/02-cookies/app-a/src/routes/+page.server.js
+++ b/content/tutorial/03-sveltekit/04-headers-and-cookies/02-cookies/app-a/src/routes/+page.server.js
@@ -1,7 +1,7 @@
export function load() {
- const visited = false;
+ const visited = 'false';
return {
- visited
+ visited: visited === 'true'
};
}
From 8cc995f6dd3911a02189efe4b98bd60794d677b0 Mon Sep 17 00:00:00 2001
From: Rich Harris
Date: Thu, 14 Dec 2023 15:05:52 -0500
Subject: [PATCH 06/53] tweak (#540)
Co-authored-by: Rich Harris
---
.../tutorial/02-advanced-svelte/01-motion/01-tweens/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/tutorial/02-advanced-svelte/01-motion/01-tweens/README.md b/content/tutorial/02-advanced-svelte/01-motion/01-tweens/README.md
index 9f494068e..68f96f811 100644
--- a/content/tutorial/02-advanced-svelte/01-motion/01-tweens/README.md
+++ b/content/tutorial/02-advanced-svelte/01-motion/01-tweens/README.md
@@ -6,7 +6,7 @@ Now that we've covered the basics, it's time to learn some advanced Svelte techn
Setting values and watching the DOM update automatically is cool. Know what's even cooler? Tweening those values. Svelte includes tools to help you build slick user interfaces that use animation to communicate changes.
-Let's start by changing the `progress` store to a `tweened` value:
+Let's start by changing the `progress` store to a `tweened` store:
```svelte
/// file: App.svelte
From ee29e32baf772669f3d9c06db4b617db8b15b73f Mon Sep 17 00:00:00 2001
From: Paul-Sebastian Manole
Date: Thu, 14 Dec 2023 22:06:30 +0200
Subject: [PATCH 07/53] docs: change grammar to help reduce confusion (#431)
It was not clear which page below the layout inherits the data, because in fact it could be any page.
The confusion can arise from the way the previous sentence was expressed, as **visually**, there is nothing `below` the layout in the project tree.
There are siblings though, like `+page.svelte` but for a Svelte beginner it is **not** immediately obvious that this page also falls `under` the same layout.
---
.../03-sveltekit/03-loading-data/02-layout-data/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/tutorial/03-sveltekit/03-loading-data/02-layout-data/README.md b/content/tutorial/03-sveltekit/03-loading-data/02-layout-data/README.md
index 3b25ecf82..0ea2b69c5 100644
--- a/content/tutorial/03-sveltekit/03-loading-data/02-layout-data/README.md
+++ b/content/tutorial/03-sveltekit/03-loading-data/02-layout-data/README.md
@@ -45,6 +45,6 @@ Now, add a sidebar in the layout for the post page:
```
-The layout (and the page below it) inherits `data.summaries` from the parent `+layout.server.js`.
+The layout (and any page below it) inherits `data.summaries` from the parent `+layout.server.js`.
When we navigate from one post to another, we only need to load the data for the post itself — the layout data is still valid. See the documentation on [invalidation](https://kit.svelte.dev/docs/load#rerunning-load-functions) to learn more.
From 787c1a24d2a19b5fa22a58f47ef622986167d9a7 Mon Sep 17 00:00:00 2001
From: Patrick Hintermayer
Date: Thu, 14 Dec 2023 21:07:23 +0100
Subject: [PATCH 08/53] docs: make loading data link consistent with the
chapter title (#438)
---
.../03-sveltekit/06-forms/01-the-form-element/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/tutorial/03-sveltekit/06-forms/01-the-form-element/README.md b/content/tutorial/03-sveltekit/06-forms/01-the-form-element/README.md
index 2bccee00f..7532c768e 100644
--- a/content/tutorial/03-sveltekit/06-forms/01-the-form-element/README.md
+++ b/content/tutorial/03-sveltekit/06-forms/01-the-form-element/README.md
@@ -2,7 +2,7 @@
title: The