seroval 1.5.5 → 1.5.6
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/dist/cjs/development/index.cjs +3 -1
- package/dist/cjs/development/index.cjs.map +2 -2
- package/dist/cjs/production/index.cjs +2 -2
- package/dist/esm/development/index.mjs +3 -1
- package/dist/esm/development/index.mjs.map +2 -2
- package/dist/esm/production/index.mjs +2 -2
- package/dist/types/core/constructors.d.ts +3 -3
- package/dist/types/core/constructors.d.ts.map +1 -1
- package/dist/types/core/context/async-parser.d.ts.map +1 -1
- package/dist/types/core/opaque-reference.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/core/context/async-parser.ts +4 -1
|
@@ -1856,6 +1856,9 @@ async function parseFunctionAsync(ctx, depth, current) {
|
|
|
1856
1856
|
throw new SerovalUnsupportedTypeError(current);
|
|
1857
1857
|
}
|
|
1858
1858
|
async function parseAsync(ctx, depth, current) {
|
|
1859
|
+
if (depth >= ctx.base.depthLimit) {
|
|
1860
|
+
throw new SerovalDepthLimitError(ctx.base.depthLimit);
|
|
1861
|
+
}
|
|
1859
1862
|
switch (typeof current) {
|
|
1860
1863
|
case "boolean":
|
|
1861
1864
|
return current ? TRUE_NODE : FALSE_NODE;
|
|
@@ -2456,7 +2459,6 @@ function deserialize(ctx, depth, node) {
|
|
|
2456
2459
|
return deserializeIteratorFactory(ctx, depth, node);
|
|
2457
2460
|
case 29 /* AsyncIteratorFactory */:
|
|
2458
2461
|
return deserializeAsyncIteratorFactory(ctx, depth, node);
|
|
2459
|
-
// case SerovalNodeType.SpecialReference:
|
|
2460
2462
|
case 35 /* Sequence */:
|
|
2461
2463
|
return deserializeSequence(ctx, depth, node);
|
|
2462
2464
|
default:
|