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.
@@ -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: