@sveltejs/kit 2.49.0 → 2.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -88,6 +88,7 @@ export function write_root(manifest_data, output) {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
if (!browser) {
|
|
91
|
+
// svelte-ignore state_referenced_locally
|
|
91
92
|
setContext('__svelte__', stores);
|
|
92
93
|
}
|
|
93
94
|
|
|
@@ -97,6 +98,7 @@ export function write_root(manifest_data, output) {
|
|
|
97
98
|
if (browser) {
|
|
98
99
|
$effect.pre(() => stores.page.set(page));
|
|
99
100
|
} else {
|
|
101
|
+
// svelte-ignore state_referenced_locally
|
|
100
102
|
stores.page.set(page);
|
|
101
103
|
}
|
|
102
104
|
`
|
|
@@ -316,7 +316,7 @@ export function create_universal_fetch(event, state, fetched, csr, resolve_opts)
|
|
|
316
316
|
let teed_body;
|
|
317
317
|
|
|
318
318
|
const proxy = new Proxy(response, {
|
|
319
|
-
get(response, key,
|
|
319
|
+
get(response, key, receiver) {
|
|
320
320
|
/**
|
|
321
321
|
* @param {string | undefined} body
|
|
322
322
|
* @param {boolean} is_b64
|
|
@@ -427,7 +427,28 @@ export function create_universal_fetch(event, state, fetched, csr, resolve_opts)
|
|
|
427
427
|
};
|
|
428
428
|
}
|
|
429
429
|
|
|
430
|
-
|
|
430
|
+
const value = Reflect.get(response, key, response);
|
|
431
|
+
|
|
432
|
+
if (value instanceof Function) {
|
|
433
|
+
// On Node v24+, the Response object has a private element #state – we
|
|
434
|
+
// need to bind this function to the response in order to allow it to
|
|
435
|
+
// access this private element. Defining the name and length ensure it
|
|
436
|
+
// is identical to the original function when introspected.
|
|
437
|
+
return Object.defineProperties(
|
|
438
|
+
/**
|
|
439
|
+
* @this {any}
|
|
440
|
+
*/
|
|
441
|
+
function () {
|
|
442
|
+
return Reflect.apply(value, this === receiver ? response : this, arguments);
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
name: { value: value.name },
|
|
446
|
+
length: { value: value.length }
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
return value;
|
|
431
452
|
}
|
|
432
453
|
});
|
|
433
454
|
|
package/src/version.js
CHANGED