Skip to content

Commit abdadce

Browse files
committed
Merge branch 'main' into feat/optional-url-params-for-resolve
2 parents 50af08d + dc33ef7 commit abdadce

Some content is hidden

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

66 files changed

+773
-343
lines changed

.changeset/cold-islands-tell.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/shy-clocks-smoke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': patch
3+
---
4+
5+
fix: discard preload fork before creating a new one

.changeset/twenty-papers-unite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': patch
3+
---
4+
5+
fix: delete `RemoteFormAllIssue`, add `path` to `RemoteFormIssue`

.github/workflows/audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: pnpm/[email protected]
2222
- uses: actions/setup-node@v6
2323
with:
24-
node-version: '22.x'
24+
node-version: '24.x'
2525
cache: pnpm
2626
- run: pnpm install --frozen-lockfile
2727
# check prod dependencies as these would affect users

.github/workflows/ci.yml

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: pnpm/[email protected]
2727
- uses: actions/setup-node@v6
2828
with:
29-
node-version: 22
29+
node-version: 24
3030
cache: pnpm
3131
- run: pnpm install --frozen-lockfile
3232
- run: pnpm build
@@ -38,7 +38,7 @@ jobs:
3838
- uses: pnpm/[email protected]
3939
- uses: actions/setup-node@v6
4040
with:
41-
node-version: 22
41+
node-version: 24
4242
cache: pnpm
4343
- run: pnpm install --frozen-lockfile
4444
- run: pnpm run lint
@@ -84,7 +84,7 @@ jobs:
8484
run: find packages -type d -name test-results -not -empty | tar -czf test-results.tar.gz --files-from=-
8585
- name: Upload test results
8686
if: failure()
87-
uses: actions/upload-artifact@v4
87+
uses: actions/upload-artifact@v5
8888
with:
8989
retention-days: 3
9090
name: test-failure-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }}
@@ -142,7 +142,7 @@ jobs:
142142
run: find packages -type d -name test-results -not -empty | tar -czf test-results-cross-platform-${{ matrix.mode }}.tar.gz --files-from=-
143143
- name: Upload test results
144144
if: failure()
145-
uses: actions/upload-artifact@v4
145+
uses: actions/upload-artifact@v5
146146
with:
147147
retention-days: 3
148148
name: test-failure-cross-platform-${{ matrix.mode }}-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }}
@@ -162,7 +162,7 @@ jobs:
162162
- uses: pnpm/[email protected]
163163
- uses: actions/setup-node@v6
164164
with:
165-
node-version: 22
165+
node-version: 24
166166
cache: pnpm
167167
- run: pnpm install --frozen-lockfile
168168
- run: pnpm playwright install chromium
@@ -176,11 +176,45 @@ jobs:
176176
run: find packages -type d -name test-results -not -empty | tar -czf test-results-server-side-route-resolution-${{ matrix.mode }}.tar.gz --files-from=-
177177
- name: Upload test results
178178
if: failure()
179-
uses: actions/upload-artifact@v4
179+
uses: actions/upload-artifact@v5
180180
with:
181181
retention-days: 3
182182
name: test-failure-server-side-route-resolution-${{ matrix.mode }}-${{ github.run_id }}
183183
path: test-results-server-side-route-resolution-${{ matrix.mode }}.tar.gz
184+
test-kit-svelte-async:
185+
runs-on: ubuntu-latest
186+
timeout-minutes: 30
187+
strategy:
188+
fail-fast: false
189+
matrix:
190+
include:
191+
- mode: 'dev'
192+
- mode: 'build'
193+
steps:
194+
- run: git config --global core.autocrlf false
195+
- uses: actions/checkout@v5
196+
- uses: pnpm/[email protected]
197+
- uses: actions/setup-node@v6
198+
with:
199+
node-version: 24
200+
cache: pnpm
201+
- run: pnpm install --frozen-lockfile
202+
- run: pnpm playwright install chromium
203+
- run: pnpm run sync-all
204+
- run: pnpm test:svelte-async:${{ matrix.mode }}
205+
- name: Print flaky test report
206+
run: node scripts/print-flaky-test-report.js
207+
- name: Archive test results
208+
if: failure()
209+
shell: bash
210+
run: find packages -type d -name test-results -not -empty | tar -czf test-results-svelte-async-${{ matrix.mode }}.tar.gz --files-from=-
211+
- name: Upload test results
212+
if: failure()
213+
uses: actions/upload-artifact@v5
214+
with:
215+
retention-days: 3
216+
name: test-failure-svelte-async-${{ matrix.mode }}-${{ github.run_id }}
217+
path: test-results-svelte-async-${{ matrix.mode }}.tar.gz
184218
test-others:
185219
runs-on: ubuntu-latest
186220
strategy:

documentation/docs/10-getting-started/30-project-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ my-project/
1919
│ ├ error.html
2020
│ ├ hooks.client.js
2121
│ ├ hooks.server.js
22-
| ├ service-worker.js
22+
├ service-worker.js
2323
│ └ tracing.server.js
2424
├ static/
2525
│ └ [your static assets]

documentation/docs/20-core-concepts/60-remote-functions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default config;
3333

3434
## Overview
3535

36-
Remote functions are exported from a `.remote.js` or `.remote.ts` file, and come in four flavours: `query`, `form`, `command` and `prerender`. On the client, the exported functions are transformed to `fetch` wrappers that invoke their counterparts on the server via a generated HTTP endpoint. Remote files must be placed in your `src` directory.
36+
Remote functions are exported from a `.remote.js` or `.remote.ts` file, and come in four flavours: `query`, `form`, `command` and `prerender`. On the client, the exported functions are transformed to `fetch` wrappers that invoke their counterparts on the server via a generated HTTP endpoint. Remote files can be placed anywhere in your `src` directory (except inside the `src/lib/server` directory), and third party libraries can provide them, too.
3737

3838
## query
3939

@@ -325,6 +325,8 @@ A form is composed of a set of _fields_, which are defined by the schema. In the
325325
326326
These attributes allow SvelteKit to set the correct input type, set a `name` that is used to construct the `data` passed to the handler, populate the `value` of the form (for example following a failed submission, to save the user having to re-enter everything), and set the [`aria-invalid`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-invalid) state.
327327
328+
> [!NOTE] The generated `name` attribute uses JS object notation (e.g. `nested.array[0].value`). String keys that require quotes such as `object['nested-array'][0].value` are not supported. Under the hood, boolean checkbox and number field names are prefixed with `b:` and `n:`, respectively, to signal SvelteKit to coerce the values from strings prior to validation.
329+
328330
Fields can be nested in objects and arrays, and their values can be strings, numbers, booleans or `File` objects. For example, if your schema looked like this...
329331
330332
```js

documentation/docs/25-build-and-deploy/55-single-page-apps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ title: Single-page apps
44

55
You can turn a SvelteKit app into a fully client-rendered single-page app (SPA) by specifying a _fallback page_. This page will be served for any URLs that can't be served by other means such as returning a prerendered page.
66

7-
> [!NOTE] SPA mode has a large negative performance impact by forcing multiple network round trips (for the blank HTML document, then for the JavaScript, and then for any data needed for the page) before content can be shown. Unless you are serving the app from a local network (e.g.a mobile app that wraps a locally-served SPA) this will delay startup, especially when considering the latency of mobile devices. It also harms SEO by often causing sites to be downranked for performance (SPAs are much more likely to fail [Core Web Vitals](https://web.dev/explore/learn-core-web-vitals)), excluding search engines that don't render JS, and causing your site to receive less frequent updates from those that do. And finally, it makes your app inaccessible to users if JavaScript fails or is disabled (which happens [more often than you probably think](https://kryogenix.org/code/browser/everyonehasjs.html)).
7+
> [!NOTE] SPA mode has a large negative performance impact by forcing multiple network round trips (for the blank HTML document, then for the JavaScript, and then for any data needed for the page) before content can be shown. Unless you are serving the app from a local network (e.g. a mobile app that wraps a locally-served SPA) this will delay startup, especially when considering the latency of mobile devices. It also harms SEO by often causing sites to be downranked for performance (SPAs are much more likely to fail [Core Web Vitals](https://web.dev/explore/learn-core-web-vitals)), excluding search engines that don't render JS, and causing your site to receive less frequent updates from those that do. And finally, it makes your app inaccessible to users if JavaScript fails or is disabled (which happens [more often than you probably think](https://kryogenix.org/code/browser/everyonehasjs.html)).
88
>
99
> You can avoid these drawbacks by [prerendering](#Prerendering-individual-pages) as many pages as possible when using SPA mode (especially your homepage). If you can prerender all pages, you can simply use [static site generation](adapter-static) rather than a SPA. Otherwise, you should strongly consider using an adapter which supports server side rendering. SvelteKit has officially supported adapters for various providers with generous free tiers.
1010
1111
## Usage
1212

13-
First, disable SSR for the pages you don't want to prerender. These pages will be served via the fallback page. E.g. to serve all pages via the fallback by default, you can update the root layout as shown below. You should [opt back into prerendering individual pages and directories](#Prerendering-individual-pages) where possible.
13+
First, disable SSR for the pages you don't want to prerender. These pages will be served via the fallback page; for example, to serve all pages via the fallback by default, you can update the root layout as shown below. You should [opt back into prerendering individual pages and directories](#Prerendering-individual-pages) where possible.
1414
```js
1515
/// file: src/routes/+layout.js
1616
export const ssr = false;

documentation/docs/40-best-practices/06-icons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ A great way to use icons is to define them purely via CSS. Iconify offers suppor
88

99
## Svelte
1010

11-
There are many [icon libraries for Svelte](/packages#icons). When choosing an icon library, it is recommended to avoid those that provide a `.svelte` file per icon as these libraries can have thousands of `.svelte` files which really slow down [Vite's dependency optimization](https://vite.dev/guide/dep-pre-bundling.html). This can become especially pathological if the icons are imported both via an umbrella import and subpath import [as described in the `vite-plugin-svelte` FAQ](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies).
11+
There are many [icon libraries for Svelte](/packages#icons). When choosing an icon library, it is recommended to avoid those that provide a `.svelte` file per icon, as these libraries can have thousands of `.svelte` files which really slow down [Vite's dependency optimization](https://vite.dev/guide/dep-pre-bundling.html). This can become especially pathological if the icons are imported both via an umbrella import and subpath import [as described in the `vite-plugin-svelte` FAQ](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies).

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"test:cross-platform:build": "pnpm run --dir packages/kit test:cross-platform:build",
1111
"test:server-side-route-resolution:dev": "pnpm run --dir packages/kit test:server-side-route-resolution:dev",
1212
"test:server-side-route-resolution:build": "pnpm run --dir packages/kit test:server-side-route-resolution:build",
13+
"test:svelte-async:dev": "pnpm run --dir packages/kit test:svelte-async:dev",
14+
"test:svelte-async:build": "pnpm run --dir packages/kit test:svelte-async:build",
1315
"test:vite-ecosystem-ci": "pnpm --dir packages/kit test",
1416
"test:others": "pnpm -r --filter='./packages/*' --filter=!./packages/kit/ --workspace-concurrency=1 test",
1517
"check": "pnpm -r prepublishOnly && pnpm -r check",
@@ -31,7 +33,7 @@
3133
"prettier-plugin-svelte": "^3.4.0",
3234
"typescript-eslint": "catalog:"
3335
},
34-
"packageManager": "pnpm@10.19.0",
36+
"packageManager": "pnpm@10.20.0",
3537
"engines": {
3638
"pnpm": ">=9.0.0"
3739
},

0 commit comments

Comments
 (0)