🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@sveltejs/kit

Package Overview
Dependencies
Maintainers
4
Versions
839
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sveltejs/kit - npm Package Compare versions

Comparing version

to
2.20.5

2

package.json
{
"name": "@sveltejs/kit",
"version": "2.20.4",
"version": "2.20.5",
"description": "SvelteKit is the fastest way to build Svelte apps",

@@ -5,0 +5,0 @@ "keywords": [

@@ -681,3 +681,15 @@ import fs from 'node:fs';

},
preserveEntrySignatures: 'strict'
preserveEntrySignatures: 'strict',
onwarn(warning, handler) {
if (
warning.code === 'MISSING_EXPORT' &&
warning.id === `${kit.outDir}/generated/client-optimized/app.js`
) {
// ignore e.g. undefined `handleError` hook when
// referencing `client_hooks.handleError`
return;
}
handler(warning);
}
},

@@ -684,0 +696,0 @@ ssrEmitAssets: true,

@@ -18,3 +18,3 @@ /** @import { RequestEvent } from '@sveltejs/kit' */

/**
* Returns the current `RequestEvent`. Can be used inside `handle`, `load` and actions (and functions called by them).
* Returns the current `RequestEvent`. Can be used inside server hooks, server `load` functions, actions, and endpoints (and functions called by them).
*

@@ -29,3 +29,3 @@ * In environments without [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage), this must be called synchronously (i.e. not after an `await`).

let message =
'Can only read the current request event inside functions invoked during `handle`, such as server `load` functions, actions, and server endpoints.';
'Can only read the current request event inside functions invoked during `handle`, such as server `load` functions, actions, endpoints, and other server hooks.';

@@ -32,0 +32,0 @@ if (!als) {

@@ -9,2 +9,3 @@ import { DEV } from 'esm-env';

import { escape_html } from '../../utils/escape.js';
import { with_event } from '../app/server/event.js';

@@ -111,3 +112,7 @@ /** @param {any} body */

return (await options.hooks.handleError({ error, event, status, message })) ?? { message };
return (
(await with_event(event, () =>
options.hooks.handleError({ error, event, status, message })
)) ?? { message }
);
}

@@ -114,0 +119,0 @@

// generated during release, do not modify
/** @type {string} */
export const VERSION = '2.20.4';
export const VERSION = '2.20.5';

Sorry, the diff of this file is too big to display