Skip to content

Commit 00a8da1

Browse files
authored
Merge branch 'main' into issue-15192
2 parents 5abf70d + a45ccdf commit 00a8da1

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.changeset/foo-bar-baz.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
@sveltejs/enhanced-img: patch
2+
'@sveltejs/enhanced-img': patch
33
---
44

55
fix: replace erroneous `import.meta.DEV` with `import.meta.env.DEV` in generated code

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,22 +190,22 @@ import * as v from 'valibot';
190190
import { query } from '$app/server';
191191
import * as db from '$lib/server/database';
192192

193-
export const getWeather = query.batch(v.string(), async (cities) => {
193+
export const getWeather = query.batch(v.string(), async (cityIds) => {
194194
const weather = await db.sql`
195195
SELECT * FROM weather
196-
WHERE city = ANY(${cities})
196+
WHERE city_id = ANY(${cityIds})
197197
`;
198-
const lookup = new Map(weather.map(w => [w.city, w]));
198+
const lookup = new Map(weather.map(w => [w.city_id, w]));
199199

200-
return (city) => lookup.get(city);
200+
return (cityId) => lookup.get(cityId);
201201
});
202202
```
203203
204204
```svelte
205205
<!--- file: Weather.svelte --->
206206
<script>
207207
import CityWeather from './CityWeather.svelte';
208-
import { getWeather } from './weather.remote.js';
208+
import { getWeather } from './weather.remote';
209209

210210
let { cities } = $props();
211211
let limit = $state(5);

packages/kit/src/types/internal.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export class InternalServer extends Server {
176176
request: Request,
177177
options: RequestOptions & {
178178
prerendering?: PrerenderOptions;
179-
read: (file: string) => Buffer;
179+
read: (file: string) => NonSharedBuffer;
180180
/** A hook called before `handle` during dev, so that `AsyncLocalStorage` can be populated. */
181181
before_handle?: (event: RequestEvent, config: any, prerender: PrerenderOption) => void;
182182
emulator?: Emulator;
@@ -529,7 +529,7 @@ export interface SSRState {
529529
* prerender option is inherited by the endpoint, unless overridden.
530530
*/
531531
prerender_default?: PrerenderOption;
532-
read?: (file: string) => Buffer;
532+
read?: (file: string) => NonSharedBuffer;
533533
/**
534534
* Used to set up `__SVELTEKIT_TRACK__` which checks if a used feature is supported.
535535
* E.g. if `read` from `$app/server` is used, it checks whether the route's config is compatible.

0 commit comments

Comments
 (0)