@sveltejs/kit 1.8.0 → 1.8.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -10,6 +10,8 @@ import { create_async_iterator } from '../../../utils/streaming.js';
10
10
 
11
11
  export const INVALIDATED_PARAM = 'x-sveltekit-invalidated';
12
12
 
13
+ const encoder = new TextEncoder();
14
+
13
15
  /**
14
16
  * @param {import('types').RequestEvent} event
15
17
  * @param {import('types').SSRRoute} route
@@ -128,12 +130,14 @@ export async function render_data(
128
130
  return new Response(
129
131
  new ReadableStream({
130
132
  async start(controller) {
131
- controller.enqueue(data);
133
+ controller.enqueue(encoder.encode(data));
132
134
  for await (const chunk of chunks) {
133
- controller.enqueue(chunk);
135
+ controller.enqueue(encoder.encode(chunk));
134
136
  }
135
137
  controller.close();
136
- }
138
+ },
139
+
140
+ type: 'bytes'
137
141
  }),
138
142
  {
139
143
  headers: {
@@ -19,6 +19,8 @@ const updated = {
19
19
  check: () => false
20
20
  };
21
21
 
22
+ const encoder = new TextEncoder();
23
+
22
24
  /**
23
25
  * Creates the HTML response.
24
26
  * @param {{
@@ -458,12 +460,14 @@ export async function render_response({
458
460
  : new Response(
459
461
  new ReadableStream({
460
462
  async start(controller) {
461
- controller.enqueue(transformed);
463
+ controller.enqueue(encoder.encode(transformed));
462
464
  for await (const chunk of chunks) {
463
- controller.enqueue(chunk);
465
+ controller.enqueue(encoder.encode(chunk));
464
466
  }
465
467
  controller.close();
466
- }
468
+ },
469
+
470
+ type: 'bytes'
467
471
  }),
468
472
  {
469
473
  headers: {