@sveltejs/kit 1.30.3 → 1.30.4

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": "1.30.3",
3
+ "version": "1.30.4",
4
4
  "description": "The fastest way to build Svelte apps",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,7 +23,7 @@
23
23
  "set-cookie-parser": "^2.6.0",
24
24
  "sirv": "^2.0.2",
25
25
  "tiny-glob": "^0.2.9",
26
- "undici": "~5.26.2"
26
+ "undici": "^5.28.3"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@playwright/test": "1.30.0",
@@ -213,7 +213,7 @@ async function compress_file(file, format = 'gz') {
213
213
  [zlib.constants.BROTLI_PARAM_QUALITY]: zlib.constants.BROTLI_MAX_QUALITY,
214
214
  [zlib.constants.BROTLI_PARAM_SIZE_HINT]: statSync(file).size
215
215
  }
216
- })
216
+ })
217
217
  : zlib.createGzip({ level: zlib.constants.Z_BEST_COMPRESSION });
218
218
 
219
219
  const source = createReadStream(file);
@@ -182,8 +182,8 @@ function validate_user_config(kit, cwd, out, config) {
182
182
  typeof extend === 'string'
183
183
  ? path.resolve(cwd, extend) === out
184
184
  : Array.isArray(extend)
185
- ? extend.some((e) => path.resolve(cwd, e) === out)
186
- : false;
185
+ ? extend.some((e) => path.resolve(cwd, e) === out)
186
+ : false;
187
187
 
188
188
  const options = config.options.compilerOptions || {};
189
189
 
@@ -111,7 +111,7 @@ export function sequence(...handlers) {
111
111
  transformPageChunk,
112
112
  filterSerializedResponseHeaders,
113
113
  preload
114
- })
114
+ })
115
115
  : resolve(event, { transformPageChunk, filterSerializedResponseHeaders, preload });
116
116
  }
117
117
  });
@@ -124,7 +124,7 @@ export async function setResponse(res, response) {
124
124
  ? set_cookie_parser.splitCookiesString(
125
125
  // This is absurd but necessary, TODO: investigate why
126
126
  /** @type {string}*/ (response.headers.get(key))
127
- )
127
+ )
128
128
  : value
129
129
  );
130
130
  } catch (error) {
@@ -42,12 +42,12 @@ export interface Adapter {
42
42
  type AwaitedPropertiesUnion<input extends Record<string, any> | void> = input extends void
43
43
  ? undefined // needs to be undefined, because void will break intellisense
44
44
  : input extends Record<string, any>
45
- ? {
45
+ ? {
46
46
  [key in keyof input]: Awaited<input[key]>;
47
- }
48
- : {} extends input // handles the any case
49
- ? input
50
- : unknown;
47
+ }
48
+ : {} extends input // handles the any case
49
+ ? input
50
+ : unknown;
51
51
 
52
52
  export type AwaitedProperties<input extends Record<string, any> | void> =
53
53
  AwaitedPropertiesUnion<input> extends Record<string, any>
@@ -70,8 +70,8 @@ type OptionalUnion<
70
70
  type UnpackValidationError<T> = T extends ActionFailure<infer X>
71
71
  ? X
72
72
  : T extends void
73
- ? undefined // needs to be undefined, because void will corrupt union type
74
- : T;
73
+ ? undefined // needs to be undefined, because void will corrupt union type
74
+ : T;
75
75
 
76
76
  /**
77
77
  * This object is passed to the `adapt` function of adapters.
@@ -223,7 +223,7 @@ export async function dev(vite, vite_config, svelte_config) {
223
223
  ? async () => {
224
224
  const url = path.resolve(cwd, endpoint.file);
225
225
  return await loud_ssr_load_module(url);
226
- }
226
+ }
227
227
  : null,
228
228
  endpoint_id: endpoint?.file
229
229
  };
@@ -204,7 +204,7 @@ const mutable = (dir) =>
204
204
  ? sirv(dir, {
205
205
  etag: true,
206
206
  maxAge: 0
207
- })
207
+ })
208
208
  : (_req, _res, next) => next();
209
209
 
210
210
  /**
@@ -550,10 +550,10 @@ export function create_client(app, target) {
550
550
  typeof data !== 'object'
551
551
  ? `a ${typeof data}`
552
552
  : data instanceof Response
553
- ? 'a Response object'
554
- : Array.isArray(data)
555
- ? 'an array'
556
- : 'a non-plain object'
553
+ ? 'a Response object'
554
+ : Array.isArray(data)
555
+ ? 'an array'
556
+ : 'a non-plain object'
557
557
  }, but must return a plain object at the top level (i.e. \`return {...}\`)`
558
558
  );
559
559
  }
@@ -398,10 +398,10 @@ function validate_load_response(data, id) {
398
398
  typeof data !== 'object'
399
399
  ? `a ${typeof data}`
400
400
  : data instanceof Response
401
- ? 'a Response object'
402
- : Array.isArray(data)
403
- ? 'an array'
404
- : 'a non-plain object'
401
+ ? 'a Response object'
402
+ : Array.isArray(data)
403
+ ? 'an array'
404
+ : 'a non-plain object'
405
405
  }, but must return a plain object at the top level (i.e. \`return {...}\`)`
406
406
  );
407
407
  }
@@ -467,7 +467,7 @@ export async function render_response({
467
467
  ? text(transformed, {
468
468
  status,
469
469
  headers
470
- })
470
+ })
471
471
  : new Response(
472
472
  new ReadableStream({
473
473
  async start(controller) {
@@ -485,7 +485,7 @@ export async function render_response({
485
485
  'content-type': 'text/html'
486
486
  }
487
487
  }
488
- );
488
+ );
489
489
  }
490
490
 
491
491
  /**
@@ -341,8 +341,8 @@ export async function respond(request, options, manifest, state) {
341
341
  const response = is_data_request
342
342
  ? redirect_json_response(e)
343
343
  : route?.page && is_action_json_request(event)
344
- ? action_json_redirect(e)
345
- : redirect_response(e.status, e.location);
344
+ ? action_json_redirect(e)
345
+ : redirect_response(e.status, e.location);
346
346
  add_cookies_to_headers(response.headers, Object.values(cookies_to_add));
347
347
  return response;
348
348
  }
@@ -91,7 +91,7 @@ export function parse_route_id(id) {
91
91
  return '/' + result;
92
92
  })
93
93
  .join('')}/?$`
94
- );
94
+ );
95
95
 
96
96
  return { pattern, params };
97
97
  }
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 = '1.30.3';
4
+ export const VERSION = '1.30.4';
package/types/index.d.ts CHANGED
@@ -22,12 +22,12 @@ declare module '@sveltejs/kit' {
22
22
  type AwaitedPropertiesUnion<input extends Record<string, any> | void> = input extends void
23
23
  ? undefined // needs to be undefined, because void will break intellisense
24
24
  : input extends Record<string, any>
25
- ? {
25
+ ? {
26
26
  [key in keyof input]: Awaited<input[key]>;
27
- }
28
- : {} extends input // handles the any case
29
- ? input
30
- : unknown;
27
+ }
28
+ : {} extends input // handles the any case
29
+ ? input
30
+ : unknown;
31
31
 
32
32
  export type AwaitedProperties<input extends Record<string, any> | void> =
33
33
  AwaitedPropertiesUnion<input> extends Record<string, any>
@@ -50,8 +50,8 @@ declare module '@sveltejs/kit' {
50
50
  type UnpackValidationError<T> = T extends ActionFailure<infer X>
51
51
  ? X
52
52
  : T extends void
53
- ? undefined // needs to be undefined, because void will corrupt union type
54
- : T;
53
+ ? undefined // needs to be undefined, because void will corrupt union type
54
+ : T;
55
55
 
56
56
  /**
57
57
  * This object is passed to the `adapt` function of adapters.