@pithos/core 2.1.0 → 2.2.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.
Files changed (190) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/arkhe/array/to-array.d.ts +1 -1
  3. package/dist/arkhe/async/parallel.js +1 -1
  4. package/dist/arkhe/async/retry.js +1 -1
  5. package/dist/arkhe/number/parsers/parse-float-def.d.ts +1 -1
  6. package/dist/arkhe/number/parsers/parse-float-def.js +1 -1
  7. package/dist/arkhe/number/parsers/parse-int-def.d.ts +1 -1
  8. package/dist/arkhe/object/defaults-deep.js +1 -1
  9. package/dist/arkhe/object/get.js +1 -1
  10. package/dist/arkhe/object/merge-with.js +1 -1
  11. package/dist/arkhe/object/set.js +2 -2
  12. package/dist/arkhe/string/pascal-case.js +1 -1
  13. package/dist/arkhe/test/console.js +1 -1
  14. package/dist/arkhe/types/common/simple-result.d.ts +31 -0
  15. package/dist/arkhe/types/common/simple-result.d.ts.map +1 -0
  16. package/dist/arkhe/types/common/simple-result.js +2 -0
  17. package/dist/arkhe/types/common/simple-result.js.map +1 -0
  18. package/dist/autocompletion.d.ts +704 -702
  19. package/dist/bridges/ensure.d.ts +2 -2
  20. package/dist/bridges/ensure.js +2 -2
  21. package/dist/bridges/ensureAsync.d.ts +2 -2
  22. package/dist/bridges/ensureAsync.js +2 -2
  23. package/dist/bridges/ensurePromise.d.ts +3 -3
  24. package/dist/bridges/ensurePromise.js +3 -3
  25. package/dist/kanon/core/parser.d.ts +1 -1
  26. package/dist/kanon/core/parser.js +1 -1
  27. package/dist/kanon/helpers/as-zod.d.ts +1 -1
  28. package/dist/kanon/helpers/as-zod.js +2 -2
  29. package/dist/kanon/helpers/as-zod.shim.d.ts +1 -1
  30. package/dist/kanon/helpers/as-zod.shim.js +3 -3
  31. package/dist/kanon/helpers/k.d.ts +42 -42
  32. package/dist/kanon/helpers/k.js +41 -41
  33. package/dist/kanon/index.d.ts +56 -56
  34. package/dist/kanon/index.js +46 -46
  35. package/dist/kanon/jit/builders/coerce.d.ts +2 -2
  36. package/dist/kanon/jit/builders/coerce.js +2 -2
  37. package/dist/kanon/jit/builders/composites/array.d.ts +2 -2
  38. package/dist/kanon/jit/builders/composites/array.js +2 -2
  39. package/dist/kanon/jit/builders/composites/object.d.ts +3 -3
  40. package/dist/kanon/jit/builders/composites/object.js +2 -2
  41. package/dist/kanon/jit/builders/operators/union.d.ts +1 -1
  42. package/dist/kanon/jit/builders/operators/union.js +3 -3
  43. package/dist/kanon/jit/builders/primitives/boolean.d.ts +2 -2
  44. package/dist/kanon/jit/builders/primitives/boolean.js +3 -3
  45. package/dist/kanon/jit/builders/primitives/number.d.ts +2 -2
  46. package/dist/kanon/jit/builders/primitives/number.js +3 -3
  47. package/dist/kanon/jit/builders/primitives/others.d.ts +2 -2
  48. package/dist/kanon/jit/builders/primitives/others.js +3 -3
  49. package/dist/kanon/jit/builders/primitives/string.d.ts +2 -2
  50. package/dist/kanon/jit/builders/primitives/string.js +4 -4
  51. package/dist/kanon/jit/builders/refinements.d.ts +2 -2
  52. package/dist/kanon/jit/builders/refinements.js +2 -2
  53. package/dist/kanon/jit/cache.d.ts +1 -1
  54. package/dist/kanon/jit/compiler.d.ts +4 -4
  55. package/dist/kanon/jit/compiler.js +14 -14
  56. package/dist/kanon/jit/context.d.ts +1 -1
  57. package/dist/kanon/jit/utils/arbitraries.d.ts +1 -1
  58. package/dist/kanon/jit/utils/arbitraries.js +6 -6
  59. package/dist/kanon/jit/utils/code.d.ts +1 -1
  60. package/dist/kanon/jit/utils/code.js +1 -1
  61. package/dist/kanon/schemas/coerce/bigint.d.ts +1 -1
  62. package/dist/kanon/schemas/coerce/bigint.js +2 -2
  63. package/dist/kanon/schemas/coerce/boolean.d.ts +1 -1
  64. package/dist/kanon/schemas/coerce/date.d.ts +1 -1
  65. package/dist/kanon/schemas/coerce/date.js +2 -2
  66. package/dist/kanon/schemas/coerce/number.d.ts +1 -1
  67. package/dist/kanon/schemas/coerce/number.js +2 -2
  68. package/dist/kanon/schemas/coerce/string.d.ts +1 -1
  69. package/dist/kanon/schemas/coerce/string.js +2 -2
  70. package/dist/kanon/schemas/composites/array.d.ts +2 -2
  71. package/dist/kanon/schemas/composites/array.js +3 -3
  72. package/dist/kanon/schemas/composites/map.d.ts +2 -2
  73. package/dist/kanon/schemas/composites/map.js +3 -3
  74. package/dist/kanon/schemas/composites/object.d.ts +2 -2
  75. package/dist/kanon/schemas/composites/object.js +3 -3
  76. package/dist/kanon/schemas/composites/record.d.ts +2 -2
  77. package/dist/kanon/schemas/composites/record.js +2 -2
  78. package/dist/kanon/schemas/composites/set.d.ts +2 -2
  79. package/dist/kanon/schemas/composites/set.js +3 -3
  80. package/dist/kanon/schemas/composites/tuple.d.ts +2 -2
  81. package/dist/kanon/schemas/composites/tuple.js +2 -2
  82. package/dist/kanon/schemas/constraints/array.d.ts +3 -3
  83. package/dist/kanon/schemas/constraints/array.js +2 -2
  84. package/dist/kanon/schemas/constraints/bigint.d.ts +2 -2
  85. package/dist/kanon/schemas/constraints/bigint.js +2 -2
  86. package/dist/kanon/schemas/constraints/date.d.ts +2 -2
  87. package/dist/kanon/schemas/constraints/date.js +2 -2
  88. package/dist/kanon/schemas/constraints/map.d.ts +3 -3
  89. package/dist/kanon/schemas/constraints/map.js +2 -2
  90. package/dist/kanon/schemas/constraints/number.d.ts +2 -2
  91. package/dist/kanon/schemas/constraints/number.js +2 -2
  92. package/dist/kanon/schemas/constraints/object.d.ts +3 -3
  93. package/dist/kanon/schemas/constraints/object.js +2 -2
  94. package/dist/kanon/schemas/constraints/refine/array.d.ts +3 -3
  95. package/dist/kanon/schemas/constraints/refine/array.js +2 -2
  96. package/dist/kanon/schemas/constraints/refine/bigint.d.ts +2 -2
  97. package/dist/kanon/schemas/constraints/refine/date.d.ts +2 -2
  98. package/dist/kanon/schemas/constraints/refine/map.d.ts +3 -3
  99. package/dist/kanon/schemas/constraints/refine/map.js +2 -2
  100. package/dist/kanon/schemas/constraints/refine/number.d.ts +2 -2
  101. package/dist/kanon/schemas/constraints/refine/object.d.ts +3 -3
  102. package/dist/kanon/schemas/constraints/refine/object.js +2 -2
  103. package/dist/kanon/schemas/constraints/refine/set.d.ts +3 -3
  104. package/dist/kanon/schemas/constraints/refine/set.js +2 -2
  105. package/dist/kanon/schemas/constraints/refine/string.d.ts +2 -2
  106. package/dist/kanon/schemas/constraints/set.d.ts +3 -3
  107. package/dist/kanon/schemas/constraints/set.js +2 -2
  108. package/dist/kanon/schemas/constraints/string.d.ts +2 -2
  109. package/dist/kanon/schemas/constraints/string.js +3 -3
  110. package/dist/kanon/schemas/operators/intersection.d.ts +2 -2
  111. package/dist/kanon/schemas/operators/union.d.ts +2 -2
  112. package/dist/kanon/schemas/operators/union.js +1 -1
  113. package/dist/kanon/schemas/primitives/any.d.ts +1 -1
  114. package/dist/kanon/schemas/primitives/bigint.d.ts +1 -1
  115. package/dist/kanon/schemas/primitives/bigint.js +2 -2
  116. package/dist/kanon/schemas/primitives/boolean.d.ts +1 -1
  117. package/dist/kanon/schemas/primitives/boolean.js +1 -1
  118. package/dist/kanon/schemas/primitives/date.d.ts +1 -1
  119. package/dist/kanon/schemas/primitives/date.js +2 -2
  120. package/dist/kanon/schemas/primitives/enum.d.ts +1 -1
  121. package/dist/kanon/schemas/primitives/enum.js +1 -1
  122. package/dist/kanon/schemas/primitives/int.d.ts +1 -1
  123. package/dist/kanon/schemas/primitives/int.js +1 -1
  124. package/dist/kanon/schemas/primitives/literal.d.ts +1 -1
  125. package/dist/kanon/schemas/primitives/literal.js +1 -1
  126. package/dist/kanon/schemas/primitives/nativeEnum.d.ts +1 -1
  127. package/dist/kanon/schemas/primitives/nativeEnum.js +1 -1
  128. package/dist/kanon/schemas/primitives/never.d.ts +1 -1
  129. package/dist/kanon/schemas/primitives/never.js +1 -1
  130. package/dist/kanon/schemas/primitives/null.d.ts +1 -1
  131. package/dist/kanon/schemas/primitives/null.js +1 -1
  132. package/dist/kanon/schemas/primitives/number.d.ts +1 -1
  133. package/dist/kanon/schemas/primitives/number.js +2 -2
  134. package/dist/kanon/schemas/primitives/string.d.ts +1 -1
  135. package/dist/kanon/schemas/primitives/string.js +2 -2
  136. package/dist/kanon/schemas/primitives/symbol.d.ts +1 -1
  137. package/dist/kanon/schemas/primitives/symbol.js +1 -1
  138. package/dist/kanon/schemas/primitives/undefined.d.ts +1 -1
  139. package/dist/kanon/schemas/primitives/undefined.js +1 -1
  140. package/dist/kanon/schemas/primitives/unknown.d.ts +1 -1
  141. package/dist/kanon/schemas/primitives/void.d.ts +1 -1
  142. package/dist/kanon/schemas/primitives/void.js +1 -1
  143. package/dist/kanon/schemas/transforms/keyof.d.ts +4 -4
  144. package/dist/kanon/schemas/transforms/keyof.js +1 -1
  145. package/dist/kanon/schemas/transforms/omit.d.ts +4 -4
  146. package/dist/kanon/schemas/transforms/omit.js +1 -1
  147. package/dist/kanon/schemas/transforms/partial.d.ts +4 -4
  148. package/dist/kanon/schemas/transforms/partial.js +1 -1
  149. package/dist/kanon/schemas/transforms/pick.d.ts +4 -4
  150. package/dist/kanon/schemas/transforms/pick.js +1 -1
  151. package/dist/kanon/schemas/transforms/required.d.ts +4 -4
  152. package/dist/kanon/schemas/transforms/required.js +1 -1
  153. package/dist/kanon/schemas/wrappers/default.d.ts +2 -2
  154. package/dist/kanon/schemas/wrappers/lazy.d.ts +2 -2
  155. package/dist/kanon/schemas/wrappers/nullable.d.ts +2 -2
  156. package/dist/kanon/schemas/wrappers/nullish.d.ts +2 -2
  157. package/dist/kanon/schemas/wrappers/optional.d.ts +2 -2
  158. package/dist/kanon/schemas/wrappers/readonly.d.ts +2 -2
  159. package/dist/kanon/types/composites.d.ts +1 -1
  160. package/dist/kanon/types/constraints.d.ts +1 -1
  161. package/dist/kanon/types/guards.d.ts +7 -7
  162. package/dist/kanon/types/operators.d.ts +2 -2
  163. package/dist/kanon/types/primitives.d.ts +1 -1
  164. package/dist/kanon/types/transforms.d.ts +1 -1
  165. package/dist/kanon/types/wrappers.d.ts +1 -1
  166. package/dist/kanon/validation.d.ts +1 -1
  167. package/dist/kanon/validation.js +1 -1
  168. package/dist/taphos/array/nth.js +1 -1
  169. package/dist/taphos/array/pull-all.js +1 -1
  170. package/dist/taphos/array/pullAllBy.js +1 -1
  171. package/dist/taphos/array/pullAllWith.js +1 -1
  172. package/dist/taphos/array/without.js +1 -1
  173. package/dist/taphos/object/at.js +1 -1
  174. package/dist/taphos/object/extend.js +1 -1
  175. package/dist/taphos/object/invoke.js +1 -1
  176. package/dist/taphos/object/unset.js +2 -2
  177. package/dist/taphos/object/update.js +2 -2
  178. package/dist/taphos/util/rangeRight.js +1 -1
  179. package/dist/zygos/either.d.ts +1 -1
  180. package/dist/zygos/either.js +1 -1
  181. package/dist/zygos/option.d.ts +1 -1
  182. package/dist/zygos/result/result-async.d.ts +5 -5
  183. package/dist/zygos/result/result-async.js +5 -5
  184. package/dist/zygos/result/result.d.ts +3 -3
  185. package/dist/zygos/result/result.js +4 -4
  186. package/dist/zygos/safe.d.ts +1 -1
  187. package/dist/zygos/safe.js +1 -1
  188. package/dist/zygos/task-either.d.ts +3 -3
  189. package/dist/zygos/task-either.js +3 -3
  190. package/package.json +2 -1
@@ -13,9 +13,9 @@
13
13
  * @since 2.0.0
14
14
  * @experimental
15
15
  */
16
- import type { GeneratorContext } from "../../context";
17
- import type { GenericSchema } from "../../../types/base";
18
- import { type CodeGenResult } from "../../utils/code";
16
+ import type { GeneratorContext } from "../../context.js";
17
+ import type { GenericSchema } from "../../../types/base.js";
18
+ import { type CodeGenResult } from "../../utils/code.js";
19
19
  /**
20
20
  * Property definition for object schema.
21
21
  *
@@ -13,8 +13,8 @@
13
13
  * @since 2.0.0
14
14
  * @experimental
15
15
  */
16
- import { formatPath, getIndent, pushPath, nextVar, increaseIndent, } from "../../context";
17
- import { escapeString, debugComment } from "../../utils/code";
16
+ import { formatPath, getIndent, pushPath, nextVar, increaseIndent, } from "../../context.js";
17
+ import { escapeString, debugComment } from "../../utils/code.js";
18
18
  // ============================================================================
19
19
  // Type check generators
20
20
  // ============================================================================
@@ -11,7 +11,7 @@
11
11
  * @since 2.0.0
12
12
  * @experimental
13
13
  */
14
- import type { GeneratorContext } from "../../context";
14
+ import type { GeneratorContext } from "../../context.js";
15
15
  /**
16
16
  * Union branch definition for code generation.
17
17
  *
@@ -11,9 +11,9 @@
11
11
  * @since 2.0.0
12
12
  * @experimental
13
13
  */
14
- import { formatPath, getIndent, nextVar, } from "../../context";
15
- import { escapeString, debugComment } from "../../utils/code";
16
- import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages";
14
+ import { formatPath, getIndent, nextVar, } from "../../context.js";
15
+ import { escapeString, debugComment } from "../../utils/code.js";
16
+ import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages.js";
17
17
  // ============================================================================
18
18
  // Primitive typeof optimization
19
19
  // ============================================================================
@@ -9,8 +9,8 @@
9
9
  * @since 2.0.0
10
10
  * @experimental
11
11
  */
12
- import type { GeneratorContext } from "../../context";
13
- import { type CodeGenResult } from "../../utils/code";
12
+ import type { GeneratorContext } from "../../context.js";
13
+ import { type CodeGenResult } from "../../utils/code.js";
14
14
  /**
15
15
  * Generates the type check code for a boolean value.
16
16
  *
@@ -9,9 +9,9 @@
9
9
  * @since 2.0.0
10
10
  * @experimental
11
11
  */
12
- import { formatPath, getIndent } from "../../context";
13
- import { escapeString, debugComment } from "../../utils/code";
14
- import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages";
12
+ import { formatPath, getIndent } from "../../context.js";
13
+ import { escapeString, debugComment } from "../../utils/code.js";
14
+ import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages.js";
15
15
  /**
16
16
  * Generates the type check code for a boolean value.
17
17
  *
@@ -12,8 +12,8 @@
12
12
  * @since 2.0.0
13
13
  * @experimental
14
14
  */
15
- import type { GeneratorContext } from "../../context";
16
- import { type CodeGenResult } from "../../utils/code";
15
+ import type { GeneratorContext } from "../../context.js";
16
+ import { type CodeGenResult } from "../../utils/code.js";
17
17
  /**
18
18
  * Number constraint metadata for JIT compilation.
19
19
  * These are extracted from the schema's refinements for inline code generation.
@@ -12,9 +12,9 @@
12
12
  * @since 2.0.0
13
13
  * @experimental
14
14
  */
15
- import { formatPath, getIndent } from "../../context";
16
- import { escapeString, debugComment } from "../../utils/code";
17
- import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages";
15
+ import { formatPath, getIndent } from "../../context.js";
16
+ import { escapeString, debugComment } from "../../utils/code.js";
17
+ import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages.js";
18
18
  // ============================================================================
19
19
  // Base constraint generators (from number-base.ts)
20
20
  // ============================================================================
@@ -9,8 +9,8 @@
9
9
  * @since 2.0.0
10
10
  * @experimental
11
11
  */
12
- import type { GeneratorContext } from "../../context";
13
- import { type CodeGenResult } from "../../utils/code";
12
+ import type { GeneratorContext } from "../../context.js";
13
+ import { type CodeGenResult } from "../../utils/code.js";
14
14
  /**
15
15
  * Generates the type check code for a null value.
16
16
  *
@@ -9,9 +9,9 @@
9
9
  * @since 2.0.0
10
10
  * @experimental
11
11
  */
12
- import { formatPath, getIndent } from "../../context";
13
- import { escapeString } from "../../utils/code";
14
- import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages";
12
+ import { formatPath, getIndent } from "../../context.js";
13
+ import { escapeString } from "../../utils/code.js";
14
+ import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages.js";
15
15
  // ============================================================================
16
16
  // Null type
17
17
  // ============================================================================
@@ -10,8 +10,8 @@
10
10
  * @since 2.0.0
11
11
  * @experimental
12
12
  */
13
- import type { GeneratorContext } from "../../context";
14
- import { type CodeGenResult } from "../../utils/code";
13
+ import type { GeneratorContext } from "../../context.js";
14
+ import { type CodeGenResult } from "../../utils/code.js";
15
15
  /**
16
16
  * String constraint metadata for JIT compilation.
17
17
  * These are extracted from the schema's refinements for inline code generation.
@@ -10,10 +10,10 @@
10
10
  * @since 2.0.0
11
11
  * @experimental
12
12
  */
13
- import { formatPath, getIndent, addExternal } from "../../context";
14
- import { escapeString, debugComment } from "../../utils/code";
15
- import { EMAIL_REGEX, URL_REGEX, UUID_REGEX } from "../../../core/consts/patterns";
16
- import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages";
13
+ import { formatPath, getIndent, addExternal } from "../../context.js";
14
+ import { escapeString, debugComment } from "../../utils/code.js";
15
+ import { EMAIL_REGEX, URL_REGEX, UUID_REGEX } from "../../../core/consts/patterns.js";
16
+ import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages.js";
17
17
  // ============================================================================
18
18
  // Base constraint generators
19
19
  // ============================================================================
@@ -11,8 +11,8 @@
11
11
  * @since 2.0.0
12
12
  * @experimental
13
13
  */
14
- import type { GeneratorContext } from "../context";
15
- import { type CodeGenResult } from "../utils/code";
14
+ import type { GeneratorContext } from "../context.js";
15
+ import { type CodeGenResult } from "../utils/code.js";
16
16
  /**
17
17
  * Refinement function type.
18
18
  * Returns true for valid values, or an error message string for invalid values.
@@ -11,8 +11,8 @@
11
11
  * @since 2.0.0
12
12
  * @experimental
13
13
  */
14
- import { formatPath, getIndent, addExternal } from "../context";
15
- import { escapeString } from "../utils/code";
14
+ import { formatPath, getIndent, addExternal } from "../context.js";
15
+ import { escapeString } from "../utils/code.js";
16
16
  /**
17
17
  * Generates code to call a single refinement function.
18
18
  *
@@ -9,7 +9,7 @@
9
9
  * @since 2.0.0
10
10
  * @experimental
11
11
  */
12
- import type { Schema, ValidatorResult } from "../types/base";
12
+ import type { Schema, ValidatorResult } from "../types/base.js";
13
13
  /**
14
14
  * Compiled validator function type.
15
15
  *
@@ -32,7 +32,7 @@
32
32
  * They are stored as external functions and called via the externals map.
33
33
  * This introduces function call overhead but preserves correctness.
34
34
  */
35
- import type { Schema, ValidatorResult } from "../types/base";
35
+ import type { Schema, ValidatorResult } from "../types/base.js";
36
36
  /**
37
37
  * Compiled validator function with metadata.
38
38
  *
@@ -161,7 +161,7 @@ export interface CompileOptions {
161
161
  *
162
162
  * @example Basic usage
163
163
  * ```typescript
164
- * import { object, string, number, compile } from "../index";
164
+ * import { object, string, number, compile } from "../index.js";
165
165
  *
166
166
  * const userSchema = object({ name: string(), age: number() });
167
167
  * const validate = compile(userSchema);
@@ -229,7 +229,7 @@ export declare function compile<T>(schema: Schema<T>, options?: CompileOptions):
229
229
  *
230
230
  * @example
231
231
  * ```typescript
232
- * import { isJITAvailable, compile } from "../index";
232
+ * import { isJITAvailable, compile } from "../index.js";
233
233
  *
234
234
  * if (isJITAvailable()) {
235
235
  * const validate = compile(schema);
@@ -257,7 +257,7 @@ export declare function isJITAvailable(): boolean;
257
257
  *
258
258
  * @example
259
259
  * ```typescript
260
- * import { compile, clearCache } from "../index";
260
+ * import { compile, clearCache } from "../index.js";
261
261
  *
262
262
  * const validate1 = compile(schema);
263
263
  * const validate2 = compile(schema);
@@ -32,21 +32,21 @@
32
32
  * They are stored as external functions and called via the externals map.
33
33
  * This introduces function call overhead but preserves correctness.
34
34
  */
35
- import { createGeneratorContext } from "./context";
36
- import { globalValidatorCache } from "./cache";
37
- import { hasRefinements, getRefinements, generateRefinementsValidation, } from "./builders/refinements";
35
+ import { createGeneratorContext } from "./context.js";
36
+ import { globalValidatorCache } from "./cache.js";
37
+ import { hasRefinements, getRefinements, generateRefinementsValidation, } from "./builders/refinements.js";
38
38
  // Import primitive builders
39
- import { generateStringValidation } from "./builders/primitives/string";
40
- import { generateNumberValidation } from "./builders/primitives/number";
41
- import { generateBooleanValidation } from "./builders/primitives/boolean";
42
- import { generateNullValidation, generateUndefinedValidation, generateAnyValidation, generateUnknownValidation, generateNeverValidation, generateVoidValidation, generateSymbolValidation, } from "./builders/primitives/others";
39
+ import { generateStringValidation } from "./builders/primitives/string.js";
40
+ import { generateNumberValidation } from "./builders/primitives/number.js";
41
+ import { generateBooleanValidation } from "./builders/primitives/boolean.js";
42
+ import { generateNullValidation, generateUndefinedValidation, generateAnyValidation, generateUnknownValidation, generateNeverValidation, generateVoidValidation, generateSymbolValidation, } from "./builders/primitives/others.js";
43
43
  // Import composite builders
44
- import { generateObjectValidation } from "./builders/composites/object";
45
- import { generateArrayValidation } from "./builders/composites/array";
44
+ import { generateObjectValidation } from "./builders/composites/object.js";
45
+ import { generateArrayValidation } from "./builders/composites/array.js";
46
46
  // Import operator builders
47
- import { generateUnionValidation } from "./builders/operators/union";
47
+ import { generateUnionValidation } from "./builders/operators/union.js";
48
48
  // Import coercion builders
49
- import { generateCoerceStringValidation, generateCoerceNumberValidation, generateCoerceBooleanValidation, generateCoerceDateValidation, isCoerceType, } from "./builders/coerce";
49
+ import { generateCoerceStringValidation, generateCoerceNumberValidation, generateCoerceBooleanValidation, generateCoerceDateValidation, isCoerceType, } from "./builders/coerce.js";
50
50
  // ============================================================================
51
51
  // Schema Type Detection
52
52
  // ============================================================================
@@ -380,7 +380,7 @@ function generateValidatorCode(schema, options) {
380
380
  *
381
381
  * @example Basic usage
382
382
  * ```typescript
383
- * import { object, string, number, compile } from "../index";
383
+ * import { object, string, number, compile } from "../index.js";
384
384
  *
385
385
  * const userSchema = object({ name: string(), age: number() });
386
386
  * const validate = compile(userSchema);
@@ -502,7 +502,7 @@ export function compile(schema, options) {
502
502
  *
503
503
  * @example
504
504
  * ```typescript
505
- * import { isJITAvailable, compile } from "../index";
505
+ * import { isJITAvailable, compile } from "../index.js";
506
506
  *
507
507
  * if (isJITAvailable()) {
508
508
  * const validate = compile(schema);
@@ -541,7 +541,7 @@ export function isJITAvailable() {
541
541
  *
542
542
  * @example
543
543
  * ```typescript
544
- * import { compile, clearCache } from "../index";
544
+ * import { compile, clearCache } from "../index.js";
545
545
  *
546
546
  * const validate1 = compile(schema);
547
547
  * const validate2 = compile(schema);
@@ -13,7 +13,7 @@
13
13
  * @since 2.0.0
14
14
  * @experimental
15
15
  */
16
- import type { GenericSchema } from "../types/base";
16
+ import type { GenericSchema } from "../types/base.js";
17
17
  /**
18
18
  * Type for external values that can be stored in the context.
19
19
  * Can be either a refinement function or a RegExp pattern.
@@ -10,7 +10,7 @@
10
10
  * @experimental
11
11
  */
12
12
  import * as fc from "fast-check";
13
- import type { GenericSchema } from "../../types/base";
13
+ import type { GenericSchema } from "../../types/base.js";
14
14
  /**
15
15
  * Schema with metadata for value generation.
16
16
  *
@@ -10,12 +10,12 @@
10
10
  * @experimental
11
11
  */
12
12
  import * as fc from "fast-check";
13
- import { string } from "../../schemas/primitives/string";
14
- import { number } from "../../schemas/primitives/number";
15
- import { boolean } from "../../schemas/primitives/boolean";
16
- import { object } from "../../schemas/composites/object";
17
- import { array } from "../../schemas/composites/array";
18
- import { unionOf, unionOf3 } from "../../schemas/operators/union";
13
+ import { string } from "../../schemas/primitives/string.js";
14
+ import { number } from "../../schemas/primitives/number.js";
15
+ import { boolean } from "../../schemas/primitives/boolean.js";
16
+ import { object } from "../../schemas/composites/object.js";
17
+ import { array } from "../../schemas/composites/array.js";
18
+ import { unionOf, unionOf3 } from "../../schemas/operators/union.js";
19
19
  // ============================================================================
20
20
  // Primitive Schema Arbitraries
21
21
  // ============================================================================
@@ -6,7 +6,7 @@
6
6
  * @since 2.0.0
7
7
  * @experimental
8
8
  */
9
- import type { GeneratorContext } from "../context";
9
+ import type { GeneratorContext } from "../context.js";
10
10
  /**
11
11
  * Result of code generation containing the generated code and updated context.
12
12
  *
@@ -6,7 +6,7 @@
6
6
  * @since 2.0.0
7
7
  * @experimental
8
8
  */
9
- import { getIndent } from "../context";
9
+ import { getIndent } from "../context.js";
10
10
  /**
11
11
  * Escapes special characters in a string for use in generated code.
12
12
  *
@@ -1,4 +1,4 @@
1
- import { BigIntConstraint } from "../../types/constraints";
1
+ import { BigIntConstraint } from "../../types/constraints.js";
2
2
  /**
3
3
  * Coerce BigInt schema - converts values to bigint with constraints.
4
4
  *
@@ -1,5 +1,5 @@
1
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
2
- import { addBigIntConstraints } from "../../schemas/constraints/bigint";
1
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
2
+ import { addBigIntConstraints } from "../../schemas/constraints/bigint.js";
3
3
  /**
4
4
  * Coerce BigInt schema - converts values to bigint with constraints.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { BooleanSchema } from "../../types/primitives";
1
+ import { BooleanSchema } from "../../types/primitives.js";
2
2
  /**
3
3
  * Coerce Boolean schema - converts to boolean.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { DateConstraint } from "../../types/constraints";
1
+ import { DateConstraint } from "../../types/constraints.js";
2
2
  /**
3
3
  * Coerce Date schema - converts to Date with constraints.
4
4
  *
@@ -1,5 +1,5 @@
1
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
2
- import { addDateConstraints } from "../../schemas/constraints/date";
1
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
2
+ import { addDateConstraints } from "../../schemas/constraints/date.js";
3
3
  /**
4
4
  * Coerce Date schema - converts to Date with constraints.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { NumberConstraint } from "../../types/constraints";
1
+ import { NumberConstraint } from "../../types/constraints.js";
2
2
  /**
3
3
  * Coerce Number schema - converts to number with constraints.
4
4
  *
@@ -1,5 +1,5 @@
1
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
2
- import { addNumberConstraints } from "../../schemas/constraints/number";
1
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
2
+ import { addNumberConstraints } from "../../schemas/constraints/number.js";
3
3
  /**
4
4
  * Coerce Number schema - converts to number with constraints.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { StringConstraint } from "../../types/constraints";
1
+ import { StringConstraint } from "../../types/constraints.js";
2
2
  /**
3
3
  * Coerce String schema - converts anything to string with constraints.
4
4
  *
@@ -1,5 +1,5 @@
1
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
2
- import { addStringConstraints } from "../../schemas/constraints/string";
1
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
2
+ import { addStringConstraints } from "../../schemas/constraints/string.js";
3
3
  /**
4
4
  * Coerce String schema - converts anything to string with constraints.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { GenericSchema } from "../../types/base";
2
- import { ArrayConstraint } from "../../types/constraints";
1
+ import { GenericSchema } from "../../types/base.js";
2
+ import { ArrayConstraint } from "../../types/constraints.js";
3
3
  /**
4
4
  * Array schema with composition and constraints.
5
5
  *
@@ -1,6 +1,6 @@
1
- import { isCoerced } from "../../types/base";
2
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
3
- import { addArrayConstraints } from "../../schemas/constraints/array";
1
+ import { isCoerced } from "../../types/base.js";
2
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
3
+ import { addArrayConstraints } from "../../schemas/constraints/array.js";
4
4
  /**
5
5
  * Array schema with composition and constraints.
6
6
  *
@@ -1,5 +1,5 @@
1
- import { GenericSchema } from "../../types/base";
2
- import { MapConstraint } from "../../types/constraints";
1
+ import { GenericSchema } from "../../types/base.js";
2
+ import { MapConstraint } from "../../types/constraints.js";
3
3
  /**
4
4
  * Map schema - validates a Map with typed keys and values.
5
5
  *
@@ -1,6 +1,6 @@
1
- import { isCoerced } from "../../types/base";
2
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
3
- import { addMapConstraints } from "../../schemas/constraints/map";
1
+ import { isCoerced } from "../../types/base.js";
2
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
3
+ import { addMapConstraints } from "../../schemas/constraints/map.js";
4
4
  /**
5
5
  * Map schema - validates a Map with typed keys and values.
6
6
  *
@@ -1,5 +1,5 @@
1
- import { Schema } from "../../types/base";
2
- import { ObjectConstraint } from "../../types/constraints";
1
+ import { Schema } from "../../types/base.js";
2
+ import { ObjectConstraint } from "../../types/constraints.js";
3
3
  type AnySchema = Schema<any>;
4
4
  /**
5
5
  * Object schema with composition and constraints.
@@ -1,6 +1,6 @@
1
- import { isCoerced } from "../../types/base";
2
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
3
- import { addObjectConstraints } from "../../schemas/constraints/object";
1
+ import { isCoerced } from "../../types/base.js";
2
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
3
+ import { addObjectConstraints } from "../../schemas/constraints/object.js";
4
4
  /**
5
5
  * Object schema with composition and constraints.
6
6
  *
@@ -1,5 +1,5 @@
1
- import { GenericSchema } from "../../types/base";
2
- import { RecordSchema } from "../../types/composites";
1
+ import { GenericSchema } from "../../types/base.js";
2
+ import { RecordSchema } from "../../types/composites.js";
3
3
  /**
4
4
  * Record schema - validates an object with typed keys and values.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { isCoerced } from "../../types/base";
2
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
1
+ import { isCoerced } from "../../types/base.js";
2
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
3
3
  /**
4
4
  * Record schema - validates an object with typed keys and values.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { GenericSchema } from "../../types/base";
2
- import { SetConstraint } from "../../types/constraints";
1
+ import { GenericSchema } from "../../types/base.js";
2
+ import { SetConstraint } from "../../types/constraints.js";
3
3
  /**
4
4
  * Set schema - validates a Set with typed elements.
5
5
  *
@@ -1,6 +1,6 @@
1
- import { isCoerced } from "../../types/base";
2
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
3
- import { addSetConstraints } from "../../schemas/constraints/set";
1
+ import { isCoerced } from "../../types/base.js";
2
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
3
+ import { addSetConstraints } from "../../schemas/constraints/set.js";
4
4
  /**
5
5
  * Set schema - validates a Set with typed elements.
6
6
  *
@@ -1,5 +1,5 @@
1
- import { GenericSchema } from "../../types/base";
2
- import { TupleSchema, TupleWithRestSchema } from "../../types/composites";
1
+ import { GenericSchema } from "../../types/base.js";
2
+ import { TupleSchema, TupleWithRestSchema } from "../../types/composites.js";
3
3
  /**
4
4
  * Tuple schema - validates an array with specific types at each position.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { isCoerced } from "../../types/base";
2
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
1
+ import { isCoerced } from "../../types/base.js";
2
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
3
3
  /**
4
4
  * Tuple schema - validates an array with specific types at each position.
5
5
  *
@@ -1,6 +1,6 @@
1
- import { ArrayConstraint } from "../../types/constraints";
2
- import { ArraySchema } from "../../types/composites";
3
- import { GenericSchema } from "../../types/base";
1
+ import { ArrayConstraint } from "../../types/constraints.js";
2
+ import { ArraySchema } from "../../types/composites.js";
3
+ import { GenericSchema } from "../../types/base.js";
4
4
  /**
5
5
  * Adds array constraints to a base schema.
6
6
  *
@@ -1,5 +1,5 @@
1
- import { refineArray } from "../../schemas/constraints/refine/array";
2
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
1
+ import { refineArray } from "../../schemas/constraints/refine/array.js";
2
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
3
3
  /**
4
4
  * Adds array constraints to a base schema.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { BigIntConstraint } from "../../types/constraints";
2
- import { BigIntSchema } from "../../types/primitives";
1
+ import { BigIntConstraint } from "../../types/constraints.js";
2
+ import { BigIntSchema } from "../../types/primitives.js";
3
3
  /**
4
4
  * Adds bigint constraints to a base schema.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { refineBigInt } from "../../schemas/constraints/refine/bigint";
2
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
1
+ import { refineBigInt } from "../../schemas/constraints/refine/bigint.js";
2
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
3
3
  /**
4
4
  * Adds bigint constraints to a base schema.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { DateConstraint } from "../../types/constraints";
2
- import { DateSchema } from "../../types/primitives";
1
+ import { DateConstraint } from "../../types/constraints.js";
2
+ import { DateSchema } from "../../types/primitives.js";
3
3
  /**
4
4
  * Adds date constraints to a base schema.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { refineDate } from "../../schemas/constraints/refine/date";
2
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
1
+ import { refineDate } from "../../schemas/constraints/refine/date.js";
2
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
3
3
  /**
4
4
  * Adds date constraints to a base schema.
5
5
  *
@@ -1,6 +1,6 @@
1
- import { MapConstraint } from "../../types/constraints";
2
- import { MapSchema } from "../../types/composites";
3
- import { GenericSchema } from "../../types/base";
1
+ import { MapConstraint } from "../../types/constraints.js";
2
+ import { MapSchema } from "../../types/composites.js";
3
+ import { GenericSchema } from "../../types/base.js";
4
4
  /**
5
5
  * Adds map constraints to a base schema.
6
6
  *