@sveltejs/kit 2.20.6 → 2.20.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.20.6",
3
+ "version": "2.20.7",
4
4
  "description": "SvelteKit is the fastest way to build Svelte apps",
5
5
  "keywords": [
6
6
  "framework",
@@ -253,7 +253,7 @@ export function get_data_json(event, options, nodes) {
253
253
  return JSON.stringify(node);
254
254
  }
255
255
 
256
- return `{"type":"data","data":${devalue.stringify(node.data, reducers)},${JSON.stringify(
256
+ return `{"type":"data","data":${devalue.stringify(node.data, reducers)},"uses":${JSON.stringify(
257
257
  serialize_uses(node)
258
258
  )}${node.slash ? `,"slash":${JSON.stringify(node.slash)}` : ''}}`;
259
259
  });
@@ -263,6 +263,8 @@ export function get_data_json(event, options, nodes) {
263
263
  chunks: count > 0 ? iterator : null
264
264
  };
265
265
  } catch (e) {
266
+ // @ts-expect-error
267
+ e.path = 'data' + e.path;
266
268
  throw new Error(clarify_devalue_error(event, /** @type {any} */ (e)));
267
269
  }
268
270
  }
@@ -658,6 +658,8 @@ function get_data(event, options, nodes, csp, global) {
658
658
  chunks: count > 0 ? iterator : null
659
659
  };
660
660
  } catch (e) {
661
+ // @ts-expect-error
662
+ e.path = e.path.slice(1);
661
663
  throw new Error(clarify_devalue_error(event, /** @type {any} */ (e)));
662
664
  }
663
665
  }
@@ -133,7 +133,7 @@ export function redirect_response(status, location) {
133
133
  */
134
134
  export function clarify_devalue_error(event, error) {
135
135
  if (error.path) {
136
- return `Data returned from \`load\` while rendering ${event.route.id} is not serializable: ${error.message} (data${error.path})`;
136
+ return `Data returned from \`load\` while rendering ${event.route.id} is not serializable: ${error.message} (${error.path})`;
137
137
  }
138
138
 
139
139
  if (error.path === '') {
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.20.6';
4
+ export const VERSION = '2.20.7';