@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
|
@@ -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)}
|
|
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} (
|
|
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