tsondb 0.5.13 → 0.5.14

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.
@@ -1,4 +1,6 @@
1
1
  import { discriminatorKey } from "../../../../shared/enum.js";
2
+ import { parallelizeErrors } from "../../../../shared/utils/validation.js";
3
+ import { wrapErrorsIfAny } from "../../../utils/error.js";
2
4
  import { json, key } from "../../../utils/errorFormatting.js";
3
5
  import { getNestedDeclarations } from "../../declarations/Declaration.js";
4
6
  import { NodeKind } from "../../Node.js";
@@ -47,7 +49,9 @@ export const validateEnumType = (helpers, type, value) => {
47
49
  TypeError(`missing required associated value for case ${key(`"${caseName}"`, helpers.useStyling)}`),
48
50
  ];
49
51
  }
50
- return validate(helpers, associatedType, value[caseName]);
52
+ return parallelizeErrors([
53
+ wrapErrorsIfAny(`at enum key ${key(`"${caseName}"`, helpers.useStyling)}`, validate(helpers, associatedType, value[caseName])),
54
+ ]);
51
55
  }
52
56
  return [];
53
57
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsondb",
3
- "version": "0.5.13",
3
+ "version": "0.5.14",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Lukas Obermann",