@naturalcycles/js-lib 15.22.0 → 15.23.0

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.
@@ -56,6 +56,8 @@
56
56
  // ],
57
57
 
58
58
  // Other
59
+ "incremental": true,
60
+ "tsBuildInfoFile": "${configDir}/node_modules/.cache/src.tsbuildinfo",
59
61
  "jsx": "preserve",
60
62
  "pretty": true,
61
63
  "newLine": "lf",
@@ -18,8 +18,13 @@ export type ValidationFunction<T, ERR extends AppError> = (input: T, opt?: Valid
18
18
  export type ValidationFunctionResult<T, ERR extends AppError> = [err: ERR | null, output: T];
19
19
  export interface ValidationFunctionOptions {
20
20
  /**
21
- * Defaults to false,
22
- * which means that the ValidationFunction IS NOT ALLOWED to mutate the input.
21
+ * Defaults to undefined.
22
+ *
23
+ * Undefined means that it's up for the underlying validation library (implementation)
24
+ * to mutate or not.
25
+ * E.g joi and zod would deep-clone, while ajv would mutate.
26
+ *
27
+ * False means that the ValidationFunction IS NOT ALLOWED to mutate the input.
23
28
  * If set to true - the ValidationFunction HAS TO mutate the input
24
29
  * if it needs to apply transformations, such as:
25
30
  * - stripping unknown properties
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
3
  "type": "module",
4
- "version": "15.22.0",
4
+ "version": "15.23.0",
5
5
  "dependencies": {
6
6
  "tslib": "^2",
7
7
  "zod": "^4"
@@ -12,7 +12,7 @@
12
12
  "@types/semver": "^7",
13
13
  "crypto-js": "^4",
14
14
  "dayjs": "^1",
15
- "@naturalcycles/dev-lib": "19.22.0"
15
+ "@naturalcycles/dev-lib": "18.4.2"
16
16
  },
17
17
  "exports": {
18
18
  ".": "./dist/index.js",
@@ -24,8 +24,13 @@ export type ValidationFunctionResult<T, ERR extends AppError> = [err: ERR | null
24
24
 
25
25
  export interface ValidationFunctionOptions {
26
26
  /**
27
- * Defaults to false,
28
- * which means that the ValidationFunction IS NOT ALLOWED to mutate the input.
27
+ * Defaults to undefined.
28
+ *
29
+ * Undefined means that it's up for the underlying validation library (implementation)
30
+ * to mutate or not.
31
+ * E.g joi and zod would deep-clone, while ajv would mutate.
32
+ *
33
+ * False means that the ValidationFunction IS NOT ALLOWED to mutate the input.
29
34
  * If set to true - the ValidationFunction HAS TO mutate the input
30
35
  * if it needs to apply transformations, such as:
31
36
  * - stripping unknown properties