@sveltejs/kit 2.48.6 → 2.48.7

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "2.48.6",
3
+ "version": "2.48.7",
4
4
  "description": "SvelteKit is the fastest way to build Svelte apps",
5
5
  "keywords": [
6
6
  "framework",
@@ -2075,7 +2075,7 @@ export type RemoteForm<Input extends RemoteFormInput | void, Output> = {
2075
2075
  /** The number of pending submissions */
2076
2076
  get pending(): number;
2077
2077
  /** Access form fields using object notation */
2078
- fields: Input extends void ? never : RemoteFormFields<Input>;
2078
+ fields: RemoteFormFields<Input>;
2079
2079
  /** Spread this onto a `<button>` or `<input type="submit">` */
2080
2080
  buttonProps: {
2081
2081
  type: 'submit';
@@ -317,16 +317,7 @@ export function is_external_url(url, base, hash_routing) {
317
317
  }
318
318
 
319
319
  if (hash_routing) {
320
- if (url.pathname === base + '/' || url.pathname === base + '/index.html') {
321
- return false;
322
- }
323
-
324
- // be lenient if serving from filesystem
325
- if (url.protocol === 'file:' && url.pathname.replace(/\/[^/]+\.html?$/, '') === base) {
326
- return false;
327
- }
328
-
329
- return true;
320
+ return url.pathname !== location.pathname;
330
321
  }
331
322
 
332
323
  return false;
@@ -183,7 +183,12 @@ export async function internal_respond(request, options, manifest, state) {
183
183
  'Use `event.cookies.set(name, value, options)` instead of `event.setHeaders` to set cookies'
184
184
  );
185
185
  } else if (lower in headers) {
186
- throw new Error(`"${key}" header is already set`);
186
+ // appendHeaders-style for Server-Timing https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Server-Timing
187
+ if (lower === 'server-timing') {
188
+ headers[lower] += ', ' + value;
189
+ } else {
190
+ throw new Error(`"${key}" header is already set`);
191
+ }
187
192
  } else {
188
193
  headers[lower] = value;
189
194
 
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // generated during release, do not modify
2
2
 
3
3
  /** @type {string} */
4
- export const VERSION = '2.48.6';
4
+ export const VERSION = '2.48.7';
package/types/index.d.ts CHANGED
@@ -2051,7 +2051,7 @@ declare module '@sveltejs/kit' {
2051
2051
  /** The number of pending submissions */
2052
2052
  get pending(): number;
2053
2053
  /** Access form fields using object notation */
2054
- fields: Input extends void ? never : RemoteFormFields<Input>;
2054
+ fields: RemoteFormFields<Input>;
2055
2055
  /** Spread this onto a `<button>` or `<input type="submit">` */
2056
2056
  buttonProps: {
2057
2057
  type: 'submit';