Skip to content

Commit 75b073d

Browse files
authored
Merge branch 'main' into fix-highlighting
2 parents 27c8538 + 8999dfd commit 75b073d

File tree

15 files changed

+220
-26
lines changed

15 files changed

+220
-26
lines changed

.github/workflows/docs-preview-create.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ on:
1919
description: 'Branch (eg. my-feature-branch)'
2020
required: true
2121
type: string
22-
check_id:
23-
description: 'The ID of the check that triggered this workflow'
22+
sha:
23+
description: 'The commit SHA responsible for triggering this workflow'
2424
required: false
2525
type: string
2626

@@ -66,9 +66,11 @@ jobs:
6666
6767
- name: Push
6868
id: push
69-
run: git add -A && git commit -m "sync docs for check run ${{ inputs.check_id }}" && git push -u origin ${{ env.BRANCH }} --force
69+
continue-on-error: true
70+
run: git add -A && git commit -m "sync docs for repo ${{ inputs.repo }}, pr ${{ inputs.pr }}, commit ${{ inputs.sha }}" && git push -u origin ${{ env.BRANCH }} --force
7071

7172
- name: Request preview comment
73+
if: ${{ steps.push.outcome == 'success' }}
7274
uses: peter-evans/repository-dispatch@v3
7375
with:
7476
event-type: 'request-preview-comment'
@@ -77,3 +79,15 @@ jobs:
7779
"repo": "${{ inputs.repo }}",
7880
"pr": "${{ inputs.pr }}"
7981
}
82+
83+
- name: Dispatch docs-unaffected
84+
if: ${{ steps.push.outcome != 'success' }}
85+
uses: peter-evans/repository-dispatch@v3
86+
with:
87+
event-type: 'docs-unaffected'
88+
client-payload: |-
89+
{
90+
"repo": "${{ inputs.repo }}",
91+
"pr": "${{ inputs.pr }}",
92+
"sha": "${{ inputs.sha }}"
93+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title: "What's new in Svelte: September 2025"
3+
description: 'Deno support, await in consts and open telemetry support'
4+
author: Dani Sandoval
5+
authorURL: https://dreamindani.com
6+
---
7+
8+
In case you missed it, the main Svelte blog covered how to use [SvelteKit's new OpenTelemetry traces](https://svelte.dev/blog/sveltekit-integrated-observability) to reliably set up observability instrumentation using instrumentation.server.ts. This month's round up covers that release and a few other features that rolled out before and after it.
9+
10+
Plenty in the showcase, as well, so let's dive in!
11+
12+
## What's new in Svelte and Svelte CLI (sv)
13+
14+
- `await` is now allowed inside `@const` declarations (**[email protected]**, [Docs](https://svelte.dev/docs/svelte/await), [#16542](https://github.com/sveltejs/svelte/pull/16542))
15+
- The `sv add` command has been updated to remove the `--no-preconditions` and add `--no-git-check`. With this new flag, even if some files are dirty, no prompt will be shown (**[email protected]**, [Docs](https://svelte.dev/docs/cli/sv-add), [#650](https://github.com/sveltejs/cli/pull/650))
16+
17+
## What's new in SvelteKit and its adapters
18+
19+
- Deno is now supported as a supported package manager (**sveltejs/[email protected]**, [#14163](https://github.com/sveltejs/kit/pull/14163))
20+
- A new `instrumentation.server.ts` adds tracing and observability setup (**sveltejs/[email protected]**, [Docs](https://svelte.dev/docs/kit/observability), [#13899](https://github.com/sveltejs/kit/pull/13899))
21+
- The `--preserve-output` flag prevents deletion of the output directory before packaging (**sveltejs/[email protected]**, [Docs](https://svelte.dev/docs/kit/packaging), [#13055](https://github.com/sveltejs/kit/pull/13055))
22+
23+
For a full list of bug fixes in Svelte, SvelteKit and its adapters, check out their CHANGELOGs [here](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md) and [here](https://github.com/sveltejs/kit/tree/main/packages).
24+
25+
---
26+
27+
## Community Showcase
28+
29+
### Apps & Sites built with Svelte
30+
31+
- [Pollinate](https://apps.apple.com/us/app/pollinate-pollen-forecast/id6749463028) provides accurate forecasts designed for allergy sufferers who want to plan their day, or vacation, around pollen levels (Check out the [Reddit post](https://www.reddit.com/r/sveltejs/comments/1mk05ym/mobile_app_made_with_svelte_5_capacitor/) on how it was built)
32+
- [Ferndesk](https://ferndesk.com/) is a help center that is kept up to date automatically (the creator shared their demo on the [Svelte Reddit](https://www.reddit.com/r/sveltejs/comments/1mqe9ez/i_built_a_tool_that_keeps_your_help_center_up_to/))
33+
- [Wplace](https://wplace.live/) lets you paint whatever you want on a map of the world
34+
- [Domain Watcher](https://github.com/Scorpio3310/domain-watcher) is a domain availability monitor and expiration tracker built with SvelteKit & Cloudflare Workers
35+
- [Motley](https://trymotley.com/) is a local-first bookmarking/moodboard app
36+
- [TallyHo](https://tallyho.app/) is a simple time tracking for freelancers
37+
- [MenuScan](https://www.getmenuscan.app/) lets you take a picture of any restuarant menu and get access to the calorie and macro counts for each item
38+
- [Vibe Check](https://vibechecked.app/) provides quick, honest diagnostics for AI‑built apps
39+
- [Joyful](https://joyful.to/) is a simple way to write, design, and send beautiful newsletters
40+
- [Eagle Cite](https://eaglecite.com/) lets you highlight, organize, and search your citations in one place
41+
- [Volkara](https://volkara.stormlightlabs.org/) is a set of ADHD-Friendly Productivity Tools
42+
- [Simple Man Archive](https://simplemanarchive.com/) is an ASCII art archive where anyone can contribute by creating unique ASCII art
43+
- [Thirty](https://github.com/thirtycalendar/thirty) is an open-source AI calendar built on familiar foundations
44+
- [Timezones](https://time.tem.dev/) quickly shows and converts timezones across many locations
45+
46+
### Learning Resources
47+
48+
_Featuring Svelte Contributors and Ambassadors_
49+
50+
- [Compile Svelte 5 in your head](https://lihautan.com/compile-svelte-5-in-your-head) by Tan Li Hau
51+
- [Introducing SvelteKit Remote Functions](https://www.youtube.com/watch?v=0hy7PCbXyqs) by Simon Holthausen
52+
- [The Svelte MCP server](https://www.reddit.com/r/sveltejs/comments/1mju9yj/new_features_in_the_svelte_mcp_server_directly/) now allows you to directly reference documentation sections, and prompt templates
53+
54+
_This Week in Svelte_
55+
56+
- [Ep. 112](https://www.youtube.com/watch?v=GQLgq09-knM) — Storybook for Svelte Part 1
57+
- [Ep. 113](https://www.youtube.com/watch?v=aerlBIuinFQ) — Storybook for Svelte Part 2 - Docs
58+
- [Ep. 114](https://www.youtube.com/watch?v=FnUWuLQDCfM) — Changelog Review
59+
60+
_To Read_
61+
62+
- [Securing the supply chain at scale: Starting with 71 important open source projects](https://github.blog/open-source/maintainers/securing-the-supply-chain-at-scale-starting-with-71-important-open-source-projects/) by GitHub
63+
- [Epicenter (YC S25)](https://www.reddit.com/r/sveltejs/comments/1mjqq3t/update_epicenter_yc_s25_just_sponsored_our_first/) is sponsoring Svelte maintainers to spend their time half pushing local-first OSS forward with Epicenter and half building their dream projects
64+
- [Project Two: Creating Mobile app using Tauri + Svelte](https://minosiants.com/blog/two-project) by Kaspar Minosiants
65+
- [Ways to use Anime.js with Svelte](https://brandonma.dev/blog/animejs-svelte/) by Brandon Ma
66+
- [Svelte, Markdown, and the Magic of Web Components](https://www.sh4jid.me/blog/svelte-markdown-and-the-magic-of-web-components) by Shajid Hasan
67+
68+
_To Watch_
69+
70+
- [SvelteKit Remote Functions are INSANE! Type-Safe Full Stack in Minutes](https://www.youtube.com/watch?v=Xbdiwq_88iE) by Tyler Codes
71+
- [Deploy a SvelteKit Application to Cloudflare Workers with Drizzle & D1](https://www.youtube.com/watch?v=ZZaExhqW5II) by Jilles Soeters
72+
73+
### Libraries, Tools & Components
74+
75+
- [EXE](https://github.com/Hugo-Dz/exe) is a build tool to distribute your full-stack web app as a single executable binary with zero runtime dependencies
76+
- [Svelte Sortable List](https://github.com/rodrigodagostino/svelte-sortable-list) is a comprehensive package for creating accessible, sortable lists in Svelte applications
77+
- [Markdown UI](https://github.com/BlueprintLabIO/markdown-ui) turns static docs into interactive experiences - instantly
78+
- [Tark UI](https://www.tarkui.com/) provides beautiful UI components built with Ark UI and Tailwind
79+
- [Uniface Element](https://github.com/ticatec/uniface-element) is a comprehensive enterprise-grade UI component library built with Svelte 5, designed for modern web applications
80+
- [microfolio](https://github.com/aker-dev/microfolio) is a modern static portfolio generator featuring a file-based content management system using folders and Markdown files
81+
- [Keycloakify](https://docs.keycloakify.dev/) is a tool for creating custom Keycloak themes, enabling you to modify the appearance and behavior of Keycloak's user interfaces
82+
- [PDJsonEditor](https://github.com/podosoft-dev/pdjsoneditor) is a powerful JSON visualization and editing tool with both a code editor and interactive graph views
83+
- [Show & Svelte](https://github.com/retrotheft/show-and-svelte) lets you create fully interactive presentations with Svelte
84+
- [wuchale](https://github.com/wuchalejs/wuchale) is a compile-time internationalization (i18n) toolkit that requires zero code changes
85+
- [svelte-overflow-fade](https://github.com/harshmandan/svelte-overflow-fade?tab=readme-ov-file) is a Svelte action and attachment for adding beautiful fade effects to overflowing content
86+
- [formshape](https://www.npmjs.com/package/formshape) is a type-safe form validation for SvelteKit Remote Functions using Standard Schema compatible validators
87+
- [vite-plugin-svelte-inline-component](https://github.com/hanielu/vite-plugin-svelte-inline-component) lets you write tiny Svelte components straight inside your JavaScript / TypeScript tests using tagged‑template literals.
88+
- [vite-plugin-sveltekit-decorators](https://github.com/KiraPC/vite-plugin-sveltekit-decorators) is a Vite plugin that automatically decorates SvelteKit functions with customizable wrappers for logging, analytics, error handling, and more
89+
- [jetbrains-svelte-templates](https://github.com/ruben-sprengel/jetbrains-svelte-templates) is a compact collection of Live Templates for JetBrains IDEs (like WebStorm and IntelliJ IDEA Ultimate) designed to speed up your Svelte & SvelteKit development
90+
91+
That's it for this month! Let us know if we missed anything on [Reddit](https://www.reddit.com/r/sveltejs/) or [Discord](https://discord.gg/svelte).
92+
93+
Until next time 👋🏼!

apps/svelte.dev/content/docs/kit/20-core-concepts/60-remote-functions.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,15 @@ Both the argument and the return value are serialized with [devalue](https://git
163163
164164
### Refreshing queries
165165
166-
Any query can be updated via its `refresh` method:
166+
Any query can be re-fetched via its `refresh` method, which retrieves the latest value from the server:
167167
168168
```svelte
169169
<button onclick={() => getPosts().refresh()}>
170170
Check for new posts
171171
</button>
172172
```
173173
174-
> [!NOTE] Queries are cached while they're on the page, meaning `getPosts() === getPosts()`. This means you don't need a reference like `const posts = getPosts()` in order to refresh the query.
174+
> [!NOTE] Queries are cached while they're on the page, meaning `getPosts() === getPosts()`. This means you don't need a reference like `const posts = getPosts()` in order to update the query.
175175
176176
## form
177177
@@ -271,6 +271,9 @@ import * as v from 'valibot';
271271
import { error, redirect } from '@sveltejs/kit';
272272
import { query, form } from '$app/server';
273273
const slug = '';
274+
const post = { id: '' };
275+
/** @type {any} */
276+
const externalApi = '';
274277
// ---cut---
275278
export const getPosts = query(async () => { /* ... */ });
276279

@@ -286,6 +289,15 @@ export const createPost = form(async (data) => {
286289
// Redirect to the newly created page
287290
redirect(303, `/blog/${slug}`);
288291
});
292+
293+
export const updatePost = form(async (data) => {
294+
// form logic goes here...
295+
const result = externalApi.update(post);
296+
297+
// The API already gives us the updated post,
298+
// no need to refresh it, we can set it directly
299+
+++await getPost(post.id).set(result);+++
300+
});
289301
```
290302
291303
The second is to drive the single-flight mutation from the client, which we'll see in the section on [`enhance`](#form-enhance).
@@ -542,6 +554,9 @@ export const addLike = command(v.string(), async (id) => {
542554
`;
543555

544556
+++getLikes(id).refresh();+++
557+
// Just like within form functions you can also do
558+
// getLikes(id).set(...)
559+
// in case you have the result already
545560
});
546561
```
547562

apps/svelte.dev/content/docs/kit/30-advanced/68-observability.md

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

66
<blockquote class="since note">
7-
<p>Available since 2.29</p>
7+
<p>Available since 2.31</p>
88
</blockquote>
99

1010
Sometimes, you may need to observe how your application is behaving in order to improve performance or find the root cause of a pesky bug. To help with this, SvelteKit can emit server-side [OpenTelemetry](https://opentelemetry.io) spans for the following:

apps/svelte.dev/content/docs/kit/60-appendix/10-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ How to setup rewrites in production will depend on your deployment platform. If
144144
/// file: src/routes/api/[...path]/+server.js
145145
/** @type {import('./$types').RequestHandler} */
146146
export function GET({ params, url }) {
147-
return fetch(`https://my-api-server.com/${params.path + url.search}`);
147+
return fetch(`https://example.com/${params.path + url.search}`);
148148
}
149149
```
150150

apps/svelte.dev/content/docs/kit/98-reference/[email protected]

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2191,6 +2191,13 @@ type RemotePrerenderFunction<Input, Output> = (
21912191

21922192
```dts
21932193
type RemoteQuery<T> = RemoteResource<T> & {
2194+
/**
2195+
* On the client, this function will update the value of the query without re-fetching it.
2196+
*
2197+
* On the server, this can be called in the context of a `command` or `form` and the specified data will accompany the action response back to the client.
2198+
* This prevents SvelteKit needing to refresh all queries on the page in a second server round-trip.
2199+
*/
2200+
set(value: T): void;
21942201
/**
21952202
* On the client, this function will re-fetch the query from the server.
21962203
*
@@ -2211,7 +2218,7 @@ type RemoteQuery<T> = RemoteResource<T> & {
22112218
* await submit().updates(
22122219
* todos.withOverride((todos) => [...todos, { text: data.get('text') }])
22132220
* );
2214-
* }}>
2221+
* })}>
22152222
* <input type="text" name="text" />
22162223
* <button type="submit">Add Todo</button>
22172224
* </form>

apps/svelte.dev/content/docs/kit/98-reference/27-$service-worker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const build: string[];
4444

4545
## files
4646

47-
An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](/docs/kit/configuration)
47+
An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](/docs/kit/configuration#serviceWorker)
4848

4949
<div class="ts-block">
5050

apps/svelte.dev/content/docs/kit/98-reference/50-configuration.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,9 @@ This is useful for allowing trusted third-party services like payment gateways o
289289

290290
If the array contains `'*'`, all origins will be trusted. This is generally not recommended!
291291

292-
**Warning**: Only add origins you completely trust, as this bypasses CSRF protection for those origins.
292+
> [!NOTE] Only add origins you completely trust, as this bypasses CSRF protection for those origins.
293+
294+
CSRF checks only apply in production, not in local development.
293295

294296
</div>
295297
</div>

apps/svelte.dev/content/docs/svelte/07-misc/04-custom-elements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Custom elements
55

66
<!-- - [basically what we have today](https://svelte.dev/docs/custom-elements-api) -->
77

8-
Svelte components can also be compiled to custom elements (aka web components) using the `customElement: true` compiler option. You should specify a tag name for the component using the `<svelte:options>` [element](svelte-options).
8+
Svelte components can also be compiled to custom elements (aka web components) using the `customElement: true` compiler option. You should specify a tag name for the component using the `<svelte:options>` [element](svelte-options). Within the custom element you can access the host element via the [`$host`](https://svelte.dev/docs/svelte/$host) rune.
99

1010
```svelte
1111
<svelte:options customElement="my-element" />

apps/svelte.dev/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"@supabase/supabase-js": "^2.43.4",
5353
"@sveltejs/adapter-vercel": "^5.10.2",
5454
"@sveltejs/enhanced-img": "^0.8.1",
55-
"@sveltejs/kit": "^2.34.0",
55+
"@sveltejs/kit": "^2.37.0",
5656
"@sveltejs/site-kit": "workspace:*",
5757
"@sveltejs/vite-plugin-svelte": "^6.1.3",
5858
"@types/cookie": "^0.6.0",

0 commit comments

Comments
 (0)