Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: AbortSignal #49

Merged
merged 8 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: "pnpm"

- name: Clean
Expand Down
2 changes: 2 additions & 0 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ By default, all feature flags are enabled. The following are the feature flags a
| `TypeError` | ✅[^2] | ✅[^2] | ✅[^2] |
| `URIError` | ✅[^2] | ✅[^2] | ✅[^2] |
| `Promise` | ❌ | ✅ | ✅ |
| `AbortSignal` | ✅[^6] | ✅[^6] | ✅[^6] |
| [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) | ✅ | ✅ | ✅ |
| [Well-known symbols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#static_properties) | ✅ | ✅ | ✅ |
| [`AsyncIterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) | ❌ | ✅ | ✅ |
Expand Down Expand Up @@ -137,3 +138,4 @@ By default, all feature flags are enabled. The following are the feature flags a
[^3]: `Feature.AggregateError` must be enabled, otherwise `AggregateError` is serialized into an `Error` instance.
[^4]: `FormData` is partially supported if it doesn't contain any `Blob` or `File` instances.
[^5]: Due to the nature of `Blob` and `File` being an async type (in that it returns a `Promise`-based serializable data) while having a sync constructor, it cannot be represented in a way that the type is consistent to its original declaration.
[^6]: `Feature.AbortSignal` must be enabled, otherwise throws an ``SerovalUnsupportedTypeError`.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"private": true,
"workspaces": ["packages/*", "benchmark"],
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"lerna": "^8.1.6",
"typescript": "^5.5.3"
"@biomejs/biome": "^1.9.4",
"lerna": "^8.1.9",
"typescript": "^5.7.2"
}
}
23 changes: 8 additions & 15 deletions packages/plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,20 @@
"name": "seroval-plugins",
"type": "module",
"version": "1.1.1",
"files": [
"dist",
"web"
],
"files": ["dist", "web"],
"engines": {
"node": ">=10"
},
"license": "MIT",
"keywords": [
"pridepack"
],
"keywords": ["pridepack"],
"devDependencies": {
"@types/node": "^20.14.10",
"@vitest/ui": "^2.0.2",
"@types/node": "^22.10.2",
"@vitest/ui": "^2.1.8",
"pridepack": "2.6.1",
"seroval": "1.1.1",
"tslib": "^2.6.3",
"typescript": "^5.5.3",
"vitest": "^2.0.2"
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"vitest": "^2.1.8"
},
"peerDependencies": {
"seroval": "^1.0"
Expand Down Expand Up @@ -63,9 +58,7 @@
},
"typesVersions": {
"*": {
"web": [
"./dist/types/web/index.d.ts"
]
"web": ["./dist/types/web/index.d.ts"]
}
}
}
2 changes: 1 addition & 1 deletion packages/plugins/tests/web/__snapshots__/blob.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ exports[`Blob > serializeAsync > supports Blob 1`] = `"new Blob([new Uint8Array(

exports[`Blob > toCrossJSONAsync > supports Blob 1`] = `"{"t":25,"i":0,"s":{"type":{"t":1,"s":"text/plain"},"buffer":{"t":19,"i":1,"s":[72,101,108,108,111,32,87,111,114,108,100]}},"c":"seroval-plugins/web/Blob"}"`;

exports[`Blob > toJSONAsync > supports Blob 1`] = `"{"t":{"t":25,"i":0,"s":{"type":{"t":1,"s":"text/plain"},"buffer":{"t":19,"i":1,"s":[72,101,108,108,111,32,87,111,114,108,100]}},"c":"seroval-plugins/web/Blob"},"f":31,"m":[]}"`;
exports[`Blob > toJSONAsync > supports Blob 1`] = `"{"t":{"t":25,"i":0,"s":{"type":{"t":1,"s":"text/plain"},"buffer":{"t":19,"i":1,"s":[72,101,108,108,111,32,87,111,114,108,100]}},"c":"seroval-plugins/web/Blob"},"f":47,"m":[]}"`;
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ exports[`CustomEvent > toCrossJSONStream > supports CustomEvent 1`] = `"{"t":22,

exports[`CustomEvent > toCrossJSONStream > supports CustomEvent 2`] = `"{"t":23,"i":0,"a":[{"t":26,"i":5,"s":2},{"t":25,"i":2,"s":{"type":{"t":1,"s":"example"},"options":{"t":10,"i":3,"p":{"k":["detail","bubbles","cancelable","composed"],"v":[{"t":10,"i":4,"p":{"k":["self"],"v":[{"t":4,"i":4}],"s":1},"o":0},{"t":2,"s":3},{"t":2,"s":3},{"t":2,"s":3}],"s":4},"o":0}},"c":"seroval-plugins/web/CustomEvent"}]}"`;

exports[`CustomEvent > toJSON > supports CustomEvent 1`] = `"{"t":{"t":25,"i":0,"s":{"type":{"t":1,"s":"example"},"options":{"t":10,"i":1,"p":{"k":["detail","bubbles","cancelable","composed"],"v":[{"t":10,"i":2,"p":{"k":["self"],"v":[{"t":4,"i":2}],"s":1},"o":0},{"t":2,"s":3},{"t":2,"s":3},{"t":2,"s":3}],"s":4},"o":0}},"c":"seroval-plugins/web/CustomEvent"},"f":31,"m":[2]}"`;
exports[`CustomEvent > toJSON > supports CustomEvent 1`] = `"{"t":{"t":25,"i":0,"s":{"type":{"t":1,"s":"example"},"options":{"t":10,"i":1,"p":{"k":["detail","bubbles","cancelable","composed"],"v":[{"t":10,"i":2,"p":{"k":["self"],"v":[{"t":4,"i":2}],"s":1},"o":0},{"t":2,"s":3},{"t":2,"s":3},{"t":2,"s":3}],"s":4},"o":0}},"c":"seroval-plugins/web/CustomEvent"},"f":47,"m":[2]}"`;

exports[`CustomEvent > toJSONAsync > supports CustomEvent 1`] = `"{"t":{"t":12,"i":0,"s":1,"f":{"t":25,"i":1,"s":{"type":{"t":1,"s":"example"},"options":{"t":10,"i":2,"p":{"k":["detail","bubbles","cancelable","composed"],"v":[{"t":10,"i":3,"p":{"k":["self"],"v":[{"t":4,"i":3}],"s":1},"o":0},{"t":2,"s":3},{"t":2,"s":3},{"t":2,"s":3}],"s":4},"o":0}},"c":"seroval-plugins/web/CustomEvent"}},"f":31,"m":[3]}"`;
exports[`CustomEvent > toJSONAsync > supports CustomEvent 1`] = `"{"t":{"t":12,"i":0,"s":1,"f":{"t":25,"i":1,"s":{"type":{"t":1,"s":"example"},"options":{"t":10,"i":2,"p":{"k":["detail","bubbles","cancelable","composed"],"v":[{"t":10,"i":3,"p":{"k":["self"],"v":[{"t":4,"i":3}],"s":1},"o":0},{"t":2,"s":3},{"t":2,"s":3},{"t":2,"s":3}],"s":4},"o":0}},"c":"seroval-plugins/web/CustomEvent"}},"f":47,"m":[3]}"`;
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ exports[`DOMException > toCrossJSONStream > supports DOMException 1`] = `"{"t":2

exports[`DOMException > toCrossJSONStream > supports DOMException 2`] = `"{"t":23,"i":0,"a":[{"t":26,"i":3,"s":2},{"t":25,"i":2,"s":{"name":{"t":1,"s":"Example"},"message":{"t":1,"s":"This is an example message."}},"c":"seroval-plugins/web/DOMException"}]}"`;

exports[`DOMException > toJSON > supports DOMException 1`] = `"{"t":{"t":25,"i":0,"s":{"name":{"t":1,"s":"Example"},"message":{"t":1,"s":"This is an example message."}},"c":"seroval-plugins/web/DOMException"},"f":31,"m":[]}"`;
exports[`DOMException > toJSON > supports DOMException 1`] = `"{"t":{"t":25,"i":0,"s":{"name":{"t":1,"s":"Example"},"message":{"t":1,"s":"This is an example message."}},"c":"seroval-plugins/web/DOMException"},"f":47,"m":[]}"`;

exports[`DOMException > toJSONAsync > supports DOMException 1`] = `"{"t":{"t":12,"i":0,"s":1,"f":{"t":25,"i":1,"s":{"name":{"t":1,"s":"Example"},"message":{"t":1,"s":"This is an example message."}},"c":"seroval-plugins/web/DOMException"}},"f":31,"m":[]}"`;
exports[`DOMException > toJSONAsync > supports DOMException 1`] = `"{"t":{"t":12,"i":0,"s":1,"f":{"t":25,"i":1,"s":{"name":{"t":1,"s":"Example"},"message":{"t":1,"s":"This is an example message."}},"c":"seroval-plugins/web/DOMException"}},"f":47,"m":[]}"`;
4 changes: 2 additions & 2 deletions packages/plugins/tests/web/__snapshots__/event.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ exports[`Event > toCrossJSONStream > supports Event 1`] = `"{"t":22,"i":0,"f":{"

exports[`Event > toCrossJSONStream > supports Event 2`] = `"{"t":23,"i":0,"a":[{"t":26,"i":4,"s":2},{"t":25,"i":2,"s":{"type":{"t":1,"s":"example"},"options":{"t":10,"i":3,"p":{"k":["bubbles","cancelable","composed"],"v":[{"t":2,"s":3},{"t":2,"s":3},{"t":2,"s":3}],"s":3},"o":0}},"c":"seroval-plugins/web/Event"}]}"`;

exports[`Event > toJSON > supports Event 1`] = `"{"t":{"t":25,"i":0,"s":{"type":{"t":1,"s":"example"},"options":{"t":10,"i":1,"p":{"k":["bubbles","cancelable","composed"],"v":[{"t":2,"s":3},{"t":2,"s":3},{"t":2,"s":3}],"s":3},"o":0}},"c":"seroval-plugins/web/Event"},"f":31,"m":[]}"`;
exports[`Event > toJSON > supports Event 1`] = `"{"t":{"t":25,"i":0,"s":{"type":{"t":1,"s":"example"},"options":{"t":10,"i":1,"p":{"k":["bubbles","cancelable","composed"],"v":[{"t":2,"s":3},{"t":2,"s":3},{"t":2,"s":3}],"s":3},"o":0}},"c":"seroval-plugins/web/Event"},"f":47,"m":[]}"`;

exports[`Event > toJSONAsync > supports Event 1`] = `"{"t":{"t":12,"i":0,"s":1,"f":{"t":25,"i":1,"s":{"type":{"t":1,"s":"example"},"options":{"t":10,"i":2,"p":{"k":["bubbles","cancelable","composed"],"v":[{"t":2,"s":3},{"t":2,"s":3},{"t":2,"s":3}],"s":3},"o":0}},"c":"seroval-plugins/web/Event"}},"f":31,"m":[]}"`;
exports[`Event > toJSONAsync > supports Event 1`] = `"{"t":{"t":12,"i":0,"s":1,"f":{"t":25,"i":1,"s":{"type":{"t":1,"s":"example"},"options":{"t":10,"i":2,"p":{"k":["bubbles","cancelable","composed"],"v":[{"t":2,"s":3},{"t":2,"s":3},{"t":2,"s":3}],"s":3},"o":0}},"c":"seroval-plugins/web/Event"}},"f":47,"m":[]}"`;
2 changes: 1 addition & 1 deletion packages/plugins/tests/web/__snapshots__/file.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ exports[`File > serializeAsync > supports File 1`] = `"new File([new Uint8Array(

exports[`File > toCrossJSONAsync > supports File 1`] = `"{"t":25,"i":0,"s":{"name":{"t":1,"s":"hello.txt"},"options":{"t":10,"i":1,"p":{"k":["type","lastModified"],"v":[{"t":1,"s":"text/plain"},{"t":0,"s":1681027542680}],"s":2},"o":0},"buffer":{"t":19,"i":2,"s":[72,101,108,108,111,32,87,111,114,108,100]}},"c":"seroval-plugins/web/File"}"`;

exports[`File > toJSONAsync > supports File 1`] = `"{"t":{"t":25,"i":0,"s":{"name":{"t":1,"s":"hello.txt"},"options":{"t":10,"i":1,"p":{"k":["type","lastModified"],"v":[{"t":1,"s":"text/plain"},{"t":0,"s":1681027542680}],"s":2},"o":0},"buffer":{"t":19,"i":2,"s":[72,101,108,108,111,32,87,111,114,108,100]}},"c":"seroval-plugins/web/File"},"f":31,"m":[]}"`;
exports[`File > toJSONAsync > supports File 1`] = `"{"t":{"t":25,"i":0,"s":{"name":{"t":1,"s":"hello.txt"},"options":{"t":10,"i":1,"p":{"k":["type","lastModified"],"v":[{"t":1,"s":"text/plain"},{"t":0,"s":1681027542680}],"s":2},"o":0},"buffer":{"t":19,"i":2,"s":[72,101,108,108,111,32,87,111,114,108,100]}},"c":"seroval-plugins/web/File"},"f":47,"m":[]}"`;
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ exports[`FormData > toCrossJSONStream > supports FormData 1`] = `"{"t":22,"i":0,

exports[`FormData > toCrossJSONStream > supports FormData 2`] = `"{"t":23,"i":0,"a":[{"t":26,"i":7,"s":2},{"t":25,"i":2,"s":{"factory":{"t":25,"i":3,"c":"seroval-plugins/web/FormDataFactory"},"entries":{"t":9,"i":4,"l":2,"a":[{"t":9,"i":5,"l":2,"a":[{"t":1,"s":"hello"},{"t":1,"s":"world"}],"o":0},{"t":9,"i":6,"l":2,"a":[{"t":1,"s":"foo"},{"t":1,"s":"bar"}],"o":0}],"o":0}},"c":"seroval-plugins/web/FormData"}]}"`;

exports[`FormData > toJSON > supports FormData 1`] = `"{"t":{"t":25,"i":0,"s":{"factory":{"t":25,"i":1,"c":"seroval-plugins/web/FormDataFactory"},"entries":{"t":9,"i":2,"l":2,"a":[{"t":9,"i":3,"l":2,"a":[{"t":1,"s":"hello"},{"t":1,"s":"world"}],"o":0},{"t":9,"i":4,"l":2,"a":[{"t":1,"s":"foo"},{"t":1,"s":"bar"}],"o":0}],"o":0}},"c":"seroval-plugins/web/FormData"},"f":31,"m":[]}"`;
exports[`FormData > toJSON > supports FormData 1`] = `"{"t":{"t":25,"i":0,"s":{"factory":{"t":25,"i":1,"c":"seroval-plugins/web/FormDataFactory"},"entries":{"t":9,"i":2,"l":2,"a":[{"t":9,"i":3,"l":2,"a":[{"t":1,"s":"hello"},{"t":1,"s":"world"}],"o":0},{"t":9,"i":4,"l":2,"a":[{"t":1,"s":"foo"},{"t":1,"s":"bar"}],"o":0}],"o":0}},"c":"seroval-plugins/web/FormData"},"f":47,"m":[]}"`;

exports[`FormData > toJSONAsync > supports FormData 1`] = `"{"t":{"t":25,"i":0,"s":{"factory":{"t":25,"i":1,"c":"seroval-plugins/web/FormDataFactory"},"entries":{"t":9,"i":2,"l":2,"a":[{"t":9,"i":3,"l":2,"a":[{"t":1,"s":"hello-world"},{"t":25,"i":4,"s":{"name":{"t":1,"s":"hello.txt"},"options":{"t":10,"i":5,"p":{"k":["type","lastModified"],"v":[{"t":1,"s":"text/plain"},{"t":0,"s":1681027542680}],"s":2},"o":0},"buffer":{"t":19,"i":6,"s":[72,101,108,108,111,32,87,111,114,108,100]}},"c":"seroval-plugins/web/File"}],"o":0},{"t":9,"i":7,"l":2,"a":[{"t":1,"s":"foo-bar"},{"t":25,"i":8,"s":{"name":{"t":1,"s":"foo-bar.txt"},"options":{"t":10,"i":9,"p":{"k":["type","lastModified"],"v":[{"t":1,"s":"text/plain"},{"t":0,"s":1681027542680}],"s":2},"o":0},"buffer":{"t":19,"i":10,"s":[70,111,111,32,66,97,114]}},"c":"seroval-plugins/web/File"}],"o":0}],"o":0}},"c":"seroval-plugins/web/FormData"},"f":31,"m":[]}"`;
exports[`FormData > toJSONAsync > supports FormData 1`] = `"{"t":{"t":25,"i":0,"s":{"factory":{"t":25,"i":1,"c":"seroval-plugins/web/FormDataFactory"},"entries":{"t":9,"i":2,"l":2,"a":[{"t":9,"i":3,"l":2,"a":[{"t":1,"s":"hello-world"},{"t":25,"i":4,"s":{"name":{"t":1,"s":"hello.txt"},"options":{"t":10,"i":5,"p":{"k":["type","lastModified"],"v":[{"t":1,"s":"text/plain"},{"t":0,"s":1681027542680}],"s":2},"o":0},"buffer":{"t":19,"i":6,"s":[72,101,108,108,111,32,87,111,114,108,100]}},"c":"seroval-plugins/web/File"}],"o":0},{"t":9,"i":7,"l":2,"a":[{"t":1,"s":"foo-bar"},{"t":25,"i":8,"s":{"name":{"t":1,"s":"foo-bar.txt"},"options":{"t":10,"i":9,"p":{"k":["type","lastModified"],"v":[{"t":1,"s":"text/plain"},{"t":0,"s":1681027542680}],"s":2},"o":0},"buffer":{"t":19,"i":10,"s":[70,111,111,32,66,97,114]}},"c":"seroval-plugins/web/File"}],"o":0}],"o":0}},"c":"seroval-plugins/web/FormData"},"f":47,"m":[]}"`;
4 changes: 2 additions & 2 deletions packages/plugins/tests/web/__snapshots__/headers.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ exports[`Headers > toCrossJSONStream > supports Headers 1`] = `"{"t":22,"i":0,"f

exports[`Headers > toCrossJSONStream > supports Headers 2`] = `"{"t":23,"i":0,"a":[{"t":26,"i":6,"s":2},{"t":25,"i":2,"s":{"t":9,"i":3,"l":2,"a":[{"t":9,"i":4,"l":2,"a":[{"t":1,"s":"content-encoding"},{"t":1,"s":"gzip"}],"o":0},{"t":9,"i":5,"l":2,"a":[{"t":1,"s":"content-type"},{"t":1,"s":"text/plain"}],"o":0}],"o":0},"c":"seroval-plugins/web/Headers"}]}"`;

exports[`Headers > toJSON > supports Headers 1`] = `"{"t":{"t":25,"i":0,"s":{"t":9,"i":1,"l":2,"a":[{"t":9,"i":2,"l":2,"a":[{"t":1,"s":"content-encoding"},{"t":1,"s":"gzip"}],"o":0},{"t":9,"i":3,"l":2,"a":[{"t":1,"s":"content-type"},{"t":1,"s":"text/plain"}],"o":0}],"o":0},"c":"seroval-plugins/web/Headers"},"f":31,"m":[]}"`;
exports[`Headers > toJSON > supports Headers 1`] = `"{"t":{"t":25,"i":0,"s":{"t":9,"i":1,"l":2,"a":[{"t":9,"i":2,"l":2,"a":[{"t":1,"s":"content-encoding"},{"t":1,"s":"gzip"}],"o":0},{"t":9,"i":3,"l":2,"a":[{"t":1,"s":"content-type"},{"t":1,"s":"text/plain"}],"o":0}],"o":0},"c":"seroval-plugins/web/Headers"},"f":47,"m":[]}"`;

exports[`Headers > toJSONAsync > supports Headers 1`] = `"{"t":{"t":12,"i":0,"s":1,"f":{"t":25,"i":1,"s":{"t":9,"i":2,"l":2,"a":[{"t":9,"i":3,"l":2,"a":[{"t":1,"s":"content-encoding"},{"t":1,"s":"gzip"}],"o":0},{"t":9,"i":4,"l":2,"a":[{"t":1,"s":"content-type"},{"t":1,"s":"text/plain"}],"o":0}],"o":0},"c":"seroval-plugins/web/Headers"}},"f":31,"m":[]}"`;
exports[`Headers > toJSONAsync > supports Headers 1`] = `"{"t":{"t":12,"i":0,"s":1,"f":{"t":25,"i":1,"s":{"t":9,"i":2,"l":2,"a":[{"t":9,"i":3,"l":2,"a":[{"t":1,"s":"content-encoding"},{"t":1,"s":"gzip"}],"o":0},{"t":9,"i":4,"l":2,"a":[{"t":1,"s":"content-type"},{"t":1,"s":"text/plain"}],"o":0}],"o":0},"c":"seroval-plugins/web/Headers"}},"f":47,"m":[]}"`;
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ exports[`ReadableStream > toCrossJSONStream > supports ReadableStream errors 1`]

exports[`ReadableStream > toCrossJSONStream > supports ReadableStream errors 2`] = `"{"t":33,"i":2,"f":{"t":13,"i":4,"s":0,"m":"Oops!","p":{"k":["stack"],"v":[{"t":1,"s":""}],"s":1}}}"`;

exports[`ReadableStream > toJSONAsync > supports ReadableStream 1`] = `"{"t":{"t":25,"i":0,"s":{"factory":{"t":25,"i":1,"c":"seroval-plugins/web/ReadableStreamFactory"},"stream":{"t":31,"i":2,"a":[{"t":32,"i":2,"f":{"t":1,"s":"foo"}},{"t":32,"i":2,"f":{"t":1,"s":"bar"}},{"t":32,"i":2,"f":{"t":1,"s":"baz"}},{"t":34,"i":2,"f":{"t":2,"s":1}}],"f":{"t":26,"i":3,"s":4}}},"c":"seroval/plugins/web/ReadableStream"},"f":31,"m":[2]}"`;
exports[`ReadableStream > toJSONAsync > supports ReadableStream 1`] = `"{"t":{"t":25,"i":0,"s":{"factory":{"t":25,"i":1,"c":"seroval-plugins/web/ReadableStreamFactory"},"stream":{"t":31,"i":2,"a":[{"t":32,"i":2,"f":{"t":1,"s":"foo"}},{"t":32,"i":2,"f":{"t":1,"s":"bar"}},{"t":32,"i":2,"f":{"t":1,"s":"baz"}},{"t":34,"i":2,"f":{"t":2,"s":1}}],"f":{"t":26,"i":3,"s":4}}},"c":"seroval/plugins/web/ReadableStream"},"f":47,"m":[2]}"`;

exports[`ReadableStream > toJSONAsync > supports ReadableStream errors 1`] = `"{"t":{"t":25,"i":0,"s":{"factory":{"t":25,"i":1,"c":"seroval-plugins/web/ReadableStreamFactory"},"stream":{"t":31,"i":2,"a":[{"t":33,"i":2,"f":{"t":13,"i":4,"s":0,"m":"Oops!","p":{"k":["stack"],"v":[{"t":1,"s":""}],"s":1}}}],"f":{"t":26,"i":3,"s":4}}},"c":"seroval/plugins/web/ReadableStream"},"f":31,"m":[2]}"`;
exports[`ReadableStream > toJSONAsync > supports ReadableStream errors 1`] = `"{"t":{"t":25,"i":0,"s":{"factory":{"t":25,"i":1,"c":"seroval-plugins/web/ReadableStreamFactory"},"stream":{"t":31,"i":2,"a":[{"t":33,"i":2,"f":{"t":13,"i":4,"s":0,"m":"Oops!","p":{"k":["stack"],"v":[{"t":1,"s":""}],"s":1}}}],"f":{"t":26,"i":3,"s":4}}},"c":"seroval/plugins/web/ReadableStream"},"f":47,"m":[2]}"`;

exports[`ReadableStream > toJSONAsync > supports ReadableStream errors 2`] = `[Error: Oops!]`;
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ exports[`Request > toCrossJSONStream > supports Request 2`] = `"{"t":32,"i":4,"f

exports[`Request > toCrossJSONStream > supports Request 3`] = `"{"t":34,"i":4,"f":{"t":2,"s":1}}"`;

exports[`Request > toJSONAsync > supports Request 1`] = `"{"t":{"t":25,"i":0,"s":{"url":{"t":1,"s":"http://localhost:3000/"},"options":{"t":10,"i":1,"p":{"k":["body","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy"],"v":[{"t":19,"i":2,"s":[72,101,108,108,111,32,87,111,114,108,100,33]},{"t":1,"s":"default"},{"t":1,"s":"same-origin"},{"t":25,"i":3,"s":{"t":9,"i":4,"l":1,"a":[{"t":9,"i":5,"l":2,"a":[{"t":1,"s":"content-type"},{"t":1,"s":"text/plain;charset=UTF-8"}],"o":0}],"o":0},"c":"seroval-plugins/web/Headers"},{"t":1,"s":""},{"t":2,"s":3},{"t":1,"s":"POST"},{"t":1,"s":"cors"},{"t":1,"s":"follow"},{"t":1,"s":"about:client"},{"t":1,"s":""}],"s":11},"o":0}},"c":"seroval-plugins/web/Request"},"f":31,"m":[]}"`;
exports[`Request > toJSONAsync > supports Request 1`] = `"{"t":{"t":25,"i":0,"s":{"url":{"t":1,"s":"http://localhost:3000/"},"options":{"t":10,"i":1,"p":{"k":["body","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy"],"v":[{"t":19,"i":2,"s":[72,101,108,108,111,32,87,111,114,108,100,33]},{"t":1,"s":"default"},{"t":1,"s":"same-origin"},{"t":25,"i":3,"s":{"t":9,"i":4,"l":1,"a":[{"t":9,"i":5,"l":2,"a":[{"t":1,"s":"content-type"},{"t":1,"s":"text/plain;charset=UTF-8"}],"o":0}],"o":0},"c":"seroval-plugins/web/Headers"},{"t":1,"s":""},{"t":2,"s":3},{"t":1,"s":"POST"},{"t":1,"s":"cors"},{"t":1,"s":"follow"},{"t":1,"s":"about:client"},{"t":1,"s":""}],"s":11},"o":0}},"c":"seroval-plugins/web/Request"},"f":47,"m":[]}"`;

exports[`Request > toJSONAsync > supports Request 2`] = `"{"t":25,"i":0,"s":{"url":{"t":1,"s":"http://localhost:3000/"},"options":{"t":10,"i":1,"p":{"k":["body","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy"],"v":[{"t":19,"i":2,"s":[72,101,108,108,111,32,87,111,114,108,100,33]},{"t":1,"s":"default"},{"t":1,"s":"same-origin"},{"t":25,"i":3,"s":{"t":9,"i":4,"l":1,"a":[{"t":9,"i":5,"l":2,"a":[{"t":1,"s":"content-type"},{"t":1,"s":"text/plain;charset=UTF-8"}],"o":0}],"o":0},"c":"seroval-plugins/web/Headers"},{"t":1,"s":""},{"t":2,"s":3},{"t":1,"s":"POST"},{"t":1,"s":"cors"},{"t":1,"s":"follow"},{"t":1,"s":"about:client"},{"t":1,"s":""}],"s":11},"o":0}},"c":"seroval-plugins/web/Request"}"`;
Loading
Loading