Repository navigation
⬆️ Update dependency marked to ^18.0.4 - #1681
Merged
Merged
Conversation
Contributor
Bundle StatsHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded
Removed
Bigger
Smaller No assets were smaller |
Contributor
Performance changes with
|
renovate Bot
added a commit
that referenced
this pull request
Oct 19, 2026
##### [v2.2.8](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#228) ##### Add `string.base58` Validates base58-encoded strings, which use the Bitcoin alphabet (no `0`, `O`, `I` or `l`): ```ts const Base58 = type("string.base58") // valid Base58("3mJr7AoUXx2Wqd") // ArkErrors: must be base58-encoded (was "0OIl") Base58("0OIl") ``` Thanks to [@WolfieLeader](https://github.com/WolfieLeader). ##### Return empty `props` for `object` `type("object").props` threw instead of returning the empty list of properties, like `type({}).props` does ([#1682](arktypeio/arktype#1682), fixes [#1177](arktypeio/arktype#1177)). Thanks to [@SunilRathod27](https://github.com/SunilRathod27). ##### Keep object values from meta in JSON Schema Meta values that aren't primitives, like an object or array `default` or a custom key like `x-unit`, were emitted as internal `$ark` references instead of their JSON values ([#1677](arktypeio/arktype#1677)). Defaults that aren't valid JSON, including functions, now go through the `defaultValue` fallback. Thanks to [@lprnmns](https://github.com/lprnmns). ##### Report invalid generic definitions on TypeScript 7 TypeScript 7 only reports the error of the last overload that fails, which for an invalid generic definition was the tuple expression signature rather than ArkType's own message ([#1681](arktypeio/arktype#1681)): ```ts // TypeScript 7 previously: Argument of type '"<n extends nummer>"' is not assignable to parameter of type '"Array" | ... // now: 'nummer' is unresolvable type("<n extends nummer>", "n > 0") ``` The generic and tuple expression signatures of `type` are now a single signature, so TypeScript 6 and 7 report the same errors directly, and errors in a generic's body point at the invalid property.
renovate Bot
added a commit
that referenced
this pull request
Oct 19, 2026
##### [v2.2.8](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#228) ##### Add `string.base58` Validates base58-encoded strings, which use the Bitcoin alphabet (no `0`, `O`, `I` or `l`): ```ts const Base58 = type("string.base58") // valid Base58("3mJr7AoUXx2Wqd") // ArkErrors: must be base58-encoded (was "0OIl") Base58("0OIl") ``` Thanks to [@WolfieLeader](https://github.com/WolfieLeader). ##### Return empty `props` for `object` `type("object").props` threw instead of returning the empty list of properties, like `type({}).props` does ([#1682](arktypeio/arktype#1682), fixes [#1177](arktypeio/arktype#1177)). Thanks to [@SunilRathod27](https://github.com/SunilRathod27). ##### Keep object values from meta in JSON Schema Meta values that aren't primitives, like an object or array `default` or a custom key like `x-unit`, were emitted as internal `$ark` references instead of their JSON values ([#1677](arktypeio/arktype#1677)). Defaults that aren't valid JSON, including functions, now go through the `defaultValue` fallback. Thanks to [@lprnmns](https://github.com/lprnmns). ##### Report invalid generic definitions on TypeScript 7 TypeScript 7 only reports the error of the last overload that fails, which for an invalid generic definition was the tuple expression signature rather than ArkType's own message ([#1681](arktypeio/arktype#1681)): ```ts // TypeScript 7 previously: Argument of type '"<n extends nummer>"' is not assignable to parameter of type '"Array" | ... // now: 'nummer' is unresolvable type("<n extends nummer>", "n > 0") ``` The generic and tuple expression signatures of `type` are now a single signature, so TypeScript 6 and 7 report the same errors directly, and errors in a generic's body point at the invalid property.
renovate Bot
added a commit
that referenced
this pull request
Oct 25, 2026
##### [v2.2.8](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#228) ##### Add `string.base58` Validates base58-encoded strings, which use the Bitcoin alphabet (no `0`, `O`, `I` or `l`): ```ts const Base58 = type("string.base58") // valid Base58("3mJr7AoUXx2Wqd") // ArkErrors: must be base58-encoded (was "0OIl") Base58("0OIl") ``` Thanks to [@WolfieLeader](https://github.com/WolfieLeader). ##### Return empty `props` for `object` `type("object").props` threw instead of returning the empty list of properties, like `type({}).props` does ([#1682](arktypeio/arktype#1682), fixes [#1177](arktypeio/arktype#1177)). Thanks to [@SunilRathod27](https://github.com/SunilRathod27). ##### Keep object values from meta in JSON Schema Meta values that aren't primitives, like an object or array `default` or a custom key like `x-unit`, were emitted as internal `$ark` references instead of their JSON values ([#1677](arktypeio/arktype#1677)). Defaults that aren't valid JSON, including functions, now go through the `defaultValue` fallback. Thanks to [@lprnmns](https://github.com/lprnmns). ##### Report invalid generic definitions on TypeScript 7 TypeScript 7 only reports the error of the last overload that fails, which for an invalid generic definition was the tuple expression signature rather than ArkType's own message ([#1681](arktypeio/arktype#1681)): ```ts // TypeScript 7 previously: Argument of type '"<n extends nummer>"' is not assignable to parameter of type '"Array" | ... // now: 'nummer' is unresolvable type("<n extends nummer>", "n > 0") ``` The generic and tuple expression signatures of `type` are now a single signature, so TypeScript 6 and 7 report the same errors directly, and errors in a generic's body point at the invalid property.
renovate Bot
added a commit
that referenced
this pull request
Oct 26, 2026
##### [v2.2.8](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#228) ##### Add `string.base58` Validates base58-encoded strings, which use the Bitcoin alphabet (no `0`, `O`, `I` or `l`): ```ts const Base58 = type("string.base58") // valid Base58("3mJr7AoUXx2Wqd") // ArkErrors: must be base58-encoded (was "0OIl") Base58("0OIl") ``` Thanks to [@WolfieLeader](https://github.com/WolfieLeader). ##### Return empty `props` for `object` `type("object").props` threw instead of returning the empty list of properties, like `type({}).props` does ([#1682](arktypeio/arktype#1682), fixes [#1177](arktypeio/arktype#1177)). Thanks to [@SunilRathod27](https://github.com/SunilRathod27). ##### Keep object values from meta in JSON Schema Meta values that aren't primitives, like an object or array `default` or a custom key like `x-unit`, were emitted as internal `$ark` references instead of their JSON values ([#1677](arktypeio/arktype#1677)). Defaults that aren't valid JSON, including functions, now go through the `defaultValue` fallback. Thanks to [@lprnmns](https://github.com/lprnmns). ##### Report invalid generic definitions on TypeScript 7 TypeScript 7 only reports the error of the last overload that fails, which for an invalid generic definition was the tuple expression signature rather than ArkType's own message ([#1681](arktypeio/arktype#1681)): ```ts // TypeScript 7 previously: Argument of type '"<n extends nummer>"' is not assignable to parameter of type '"Array" | ... // now: 'nummer' is unresolvable type("<n extends nummer>", "n > 0") ``` The generic and tuple expression signatures of `type` are now a single signature, so TypeScript 6 and 7 report the same errors directly, and errors in a generic's body point at the invalid property.
renovate Bot
added a commit
that referenced
this pull request
Nov 2, 2026
##### [v2.2.9](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#229) ##### Keep tuple elements around defaults in `.in` and `.out` Combining a tuple's defaultable elements with its other elements dropped some of them, depending on key order: ```ts const T = type(["string", "number = 5", "boolean?"]) // was: [string, boolean?] // now: [string, number?, boolean?] T.in.expression // was: number[] // now: [number, string, ...number[]] type(["number", "string = 'foo'", "...", "number[]"]).out.expression ``` A bound that narrows two existing length constraints at once also no longer throws "multiple distinct intersection results": ```ts // was: throws // now: string == 2 type("1 <= string <= 2").and("string >= 2") ``` Thanks to [@ybai08](https://github.com/ybai08) ([#1696](arktypeio/arktype#1696)). ##### Reject `NaN` in unions discriminated by `typeof` `number` rejects `NaN`, but compiled unions like `number | null` dropped that check when they discriminated by `typeof`, so `NaN` was only rejected with `jitless` ([#1702](arktypeio/arktype#1702)). ```ts const T = type("number | null") // was: NaN // now: ArkErrors: must be a number (was NaN) T(NaN) ``` Thanks to [@thecotne](https://github.com/thecotne). ##### Don't treat `Object.prototype` keys as declared Inherited names like `toString` or `constructor`, and an own `__proto__` key like the one `JSON.parse` creates, were treated as declared keys, so `"+": "delete"` kept them and `"+": "reject"` accepted them ([#1701](arktypeio/arktype#1701)). ```ts const T = type({ a: "string", "+": "reject" }) // was: { a: "x", constructor: 1 } // now: ArkErrors: constructor must be removed T({ a: "x", constructor: 1 }) ``` Thanks to [@thecotne](https://github.com/thecotne). ##### Only emit referenced `$defs` in `toJsonSchema` With `useRefs`, or for a cyclic type, every node a type referenced was written to `$defs`, including discriminated union cases that never appear in the output. Some of those couldn't be converted, so `toJsonSchema()` threw `Unexpected JSON Schema input for structure: {}` ([#1689](arktypeio/arktype#1689), fixes [#1612](arktypeio/arktype#1612), [#1511](arktypeio/arktype#1511) and [#1546](arktypeio/arktype#1546)). ```ts const T = type.or( { a: type.enumerated("a", "b", "c"), b: "1" }, { a: type.enumerated("a", "e", "f"), b: "2" } ) // was: throws // now: only the $defs that a $ref points to T.toJsonSchema({ useRefs: true }) ``` Thanks to [@giaBaoJS](https://github.com/giaBaoJS). ##### Convert unrepresentable types in `~standard.jsonSchema` instead of throwing `~standard.jsonSchema.input` and `.output` now throw only for an unsupported `target`, i.e. one other than `draft-2020-12` or `draft-07`. Parts of a type that JSON Schema can't represent are converted instead ([#1694](arktypeio/arktype#1694)): - a predicate, a second pattern, a `Date` bound or an array's non-index props is dropped from the schema it constrains - `bigint`, `symbol`, a non-JSON unit like `undefined` and any prototype other than `Array` become `{}` - a variadic tuple with postfix elements keeps its prefix and `minItems`, but not its `items` - a default that isn't JSON is omitted ```ts const T = type({ big: "bigint", even: type("number").narrow(n => n % 2 === 0) }) // was: throws // now: { type: "object", properties: { big: {}, even: { type: "number" } }, ... } T["~standard"].jsonSchema.input({ target: "draft-2020-12" }) ``` Fallbacks from a scope's `toJsonSchema` config or from `libraryOptions` still take precedence, and `toJsonSchema()` itself still throws by default. A `defaultValue` fallback can now return `undefined` to omit the default rather than writing `default: undefined`. ##### [v2.2.8](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#228) ##### Add `string.base58` Validates base58-encoded strings, which use the Bitcoin alphabet (no `0`, `O`, `I` or `l`): ```ts const Base58 = type("string.base58") // valid Base58("3mJr7AoUXx2Wqd") // ArkErrors: must be base58-encoded (was "0OIl") Base58("0OIl") ``` Thanks to [@WolfieLeader](https://github.com/WolfieLeader). ##### Return empty `props` for `object` `type("object").props` threw instead of returning the empty list of properties, like `type({}).props` does ([#1682](arktypeio/arktype#1682), fixes [#1177](arktypeio/arktype#1177)). Thanks to [@SunilRathod27](https://github.com/SunilRathod27). ##### Keep object values from meta in JSON Schema Meta values that aren't primitives, like an object or array `default` or a custom key like `x-unit`, were emitted as internal `$ark` references instead of their JSON values ([#1677](arktypeio/arktype#1677)). Defaults that aren't valid JSON, including functions, now go through the `defaultValue` fallback. Thanks to [@lprnmns](https://github.com/lprnmns). ##### Report invalid generic definitions on TypeScript 7 TypeScript 7 only reports the error of the last overload that fails, which for an invalid generic definition was the tuple expression signature rather than ArkType's own message ([#1681](arktypeio/arktype#1681)): ```ts // TypeScript 7 previously: Argument of type '"<n extends nummer>"' is not assignable to parameter of type '"Array" | ... // now: 'nummer' is unresolvable type("<n extends nummer>", "n > 0") ``` The generic and tuple expression signatures of `type` are now a single signature, so TypeScript 6 and 7 report the same errors directly, and errors in a generic's body point at the invalid property.
renovate Bot
added a commit
that referenced
this pull request
Nov 2, 2026
##### [v2.2.9](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#229) ##### Keep tuple elements around defaults in `.in` and `.out` Combining a tuple's defaultable elements with its other elements dropped some of them, depending on key order: ```ts const T = type(["string", "number = 5", "boolean?"]) // was: [string, boolean?] // now: [string, number?, boolean?] T.in.expression // was: number[] // now: [number, string, ...number[]] type(["number", "string = 'foo'", "...", "number[]"]).out.expression ``` A bound that narrows two existing length constraints at once also no longer throws "multiple distinct intersection results": ```ts // was: throws // now: string == 2 type("1 <= string <= 2").and("string >= 2") ``` Thanks to [@ybai08](https://github.com/ybai08) ([#1696](arktypeio/arktype#1696)). ##### Reject `NaN` in unions discriminated by `typeof` `number` rejects `NaN`, but compiled unions like `number | null` dropped that check when they discriminated by `typeof`, so `NaN` was only rejected with `jitless` ([#1702](arktypeio/arktype#1702)). ```ts const T = type("number | null") // was: NaN // now: ArkErrors: must be a number (was NaN) T(NaN) ``` Thanks to [@thecotne](https://github.com/thecotne). ##### Don't treat `Object.prototype` keys as declared Inherited names like `toString` or `constructor`, and an own `__proto__` key like the one `JSON.parse` creates, were treated as declared keys, so `"+": "delete"` kept them and `"+": "reject"` accepted them ([#1701](arktypeio/arktype#1701)). ```ts const T = type({ a: "string", "+": "reject" }) // was: { a: "x", constructor: 1 } // now: ArkErrors: constructor must be removed T({ a: "x", constructor: 1 }) ``` Thanks to [@thecotne](https://github.com/thecotne). ##### Only emit referenced `$defs` in `toJsonSchema` With `useRefs`, or for a cyclic type, every node a type referenced was written to `$defs`, including discriminated union cases that never appear in the output. Some of those couldn't be converted, so `toJsonSchema()` threw `Unexpected JSON Schema input for structure: {}` ([#1689](arktypeio/arktype#1689), fixes [#1612](arktypeio/arktype#1612), [#1511](arktypeio/arktype#1511) and [#1546](arktypeio/arktype#1546)). ```ts const T = type.or( { a: type.enumerated("a", "b", "c"), b: "1" }, { a: type.enumerated("a", "e", "f"), b: "2" } ) // was: throws // now: only the $defs that a $ref points to T.toJsonSchema({ useRefs: true }) ``` Thanks to [@giaBaoJS](https://github.com/giaBaoJS). ##### Convert unrepresentable types in `~standard.jsonSchema` instead of throwing `~standard.jsonSchema.input` and `.output` now throw only for an unsupported `target`, i.e. one other than `draft-2020-12` or `draft-07`. Parts of a type that JSON Schema can't represent are converted instead ([#1694](arktypeio/arktype#1694)): - a predicate, a second pattern, a `Date` bound or an array's non-index props is dropped from the schema it constrains - `bigint`, `symbol`, a non-JSON unit like `undefined` and any prototype other than `Array` become `{}` - a variadic tuple with postfix elements keeps its prefix and `minItems`, but not its `items` - a default that isn't JSON is omitted ```ts const T = type({ big: "bigint", even: type("number").narrow(n => n % 2 === 0) }) // was: throws // now: { type: "object", properties: { big: {}, even: { type: "number" } }, ... } T["~standard"].jsonSchema.input({ target: "draft-2020-12" }) ``` Fallbacks from a scope's `toJsonSchema` config or from `libraryOptions` still take precedence, and `toJsonSchema()` itself still throws by default. A `defaultValue` fallback can now return `undefined` to omit the default rather than writing `default: undefined`. ##### [v2.2.8](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#228) ##### Add `string.base58` Validates base58-encoded strings, which use the Bitcoin alphabet (no `0`, `O`, `I` or `l`): ```ts const Base58 = type("string.base58") // valid Base58("3mJr7AoUXx2Wqd") // ArkErrors: must be base58-encoded (was "0OIl") Base58("0OIl") ``` Thanks to [@WolfieLeader](https://github.com/WolfieLeader). ##### Return empty `props` for `object` `type("object").props` threw instead of returning the empty list of properties, like `type({}).props` does ([#1682](arktypeio/arktype#1682), fixes [#1177](arktypeio/arktype#1177)). Thanks to [@SunilRathod27](https://github.com/SunilRathod27). ##### Keep object values from meta in JSON Schema Meta values that aren't primitives, like an object or array `default` or a custom key like `x-unit`, were emitted as internal `$ark` references instead of their JSON values ([#1677](arktypeio/arktype#1677)). Defaults that aren't valid JSON, including functions, now go through the `defaultValue` fallback. Thanks to [@lprnmns](https://github.com/lprnmns). ##### Report invalid generic definitions on TypeScript 7 TypeScript 7 only reports the error of the last overload that fails, which for an invalid generic definition was the tuple expression signature rather than ArkType's own message ([#1681](arktypeio/arktype#1681)): ```ts // TypeScript 7 previously: Argument of type '"<n extends nummer>"' is not assignable to parameter of type '"Array" | ... // now: 'nummer' is unresolvable type("<n extends nummer>", "n > 0") ``` The generic and tuple expression signatures of `type` are now a single signature, so TypeScript 6 and 7 report the same errors directly, and errors in a generic's body point at the invalid property.
renovate Bot
added a commit
that referenced
this pull request
Nov 8, 2026
##### [v2.2.9](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#229) ##### Keep tuple elements around defaults in `.in` and `.out` Combining a tuple's defaultable elements with its other elements dropped some of them, depending on key order: ```ts const T = type(["string", "number = 5", "boolean?"]) // was: [string, boolean?] // now: [string, number?, boolean?] T.in.expression // was: number[] // now: [number, string, ...number[]] type(["number", "string = 'foo'", "...", "number[]"]).out.expression ``` A bound that narrows two existing length constraints at once also no longer throws "multiple distinct intersection results": ```ts // was: throws // now: string == 2 type("1 <= string <= 2").and("string >= 2") ``` Thanks to [@ybai08](https://github.com/ybai08) ([#1696](arktypeio/arktype#1696)). ##### Reject `NaN` in unions discriminated by `typeof` `number` rejects `NaN`, but compiled unions like `number | null` dropped that check when they discriminated by `typeof`, so `NaN` was only rejected with `jitless` ([#1702](arktypeio/arktype#1702)). ```ts const T = type("number | null") // was: NaN // now: ArkErrors: must be a number (was NaN) T(NaN) ``` Thanks to [@thecotne](https://github.com/thecotne). ##### Don't treat `Object.prototype` keys as declared Inherited names like `toString` or `constructor`, and an own `__proto__` key like the one `JSON.parse` creates, were treated as declared keys, so `"+": "delete"` kept them and `"+": "reject"` accepted them ([#1701](arktypeio/arktype#1701)). ```ts const T = type({ a: "string", "+": "reject" }) // was: { a: "x", constructor: 1 } // now: ArkErrors: constructor must be removed T({ a: "x", constructor: 1 }) ``` Thanks to [@thecotne](https://github.com/thecotne). ##### Only emit referenced `$defs` in `toJsonSchema` With `useRefs`, or for a cyclic type, every node a type referenced was written to `$defs`, including discriminated union cases that never appear in the output. Some of those couldn't be converted, so `toJsonSchema()` threw `Unexpected JSON Schema input for structure: {}` ([#1689](arktypeio/arktype#1689), fixes [#1612](arktypeio/arktype#1612), [#1511](arktypeio/arktype#1511) and [#1546](arktypeio/arktype#1546)). ```ts const T = type.or( { a: type.enumerated("a", "b", "c"), b: "1" }, { a: type.enumerated("a", "e", "f"), b: "2" } ) // was: throws // now: only the $defs that a $ref points to T.toJsonSchema({ useRefs: true }) ``` Thanks to [@giaBaoJS](https://github.com/giaBaoJS). ##### Convert unrepresentable types in `~standard.jsonSchema` instead of throwing `~standard.jsonSchema.input` and `.output` now throw only for an unsupported `target`, i.e. one other than `draft-2020-12` or `draft-07`. Parts of a type that JSON Schema can't represent are converted instead ([#1694](arktypeio/arktype#1694)): - a predicate, a second pattern, a `Date` bound or an array's non-index props is dropped from the schema it constrains - `bigint`, `symbol`, a non-JSON unit like `undefined` and any prototype other than `Array` become `{}` - a variadic tuple with postfix elements keeps its prefix and `minItems`, but not its `items` - a default that isn't JSON is omitted ```ts const T = type({ big: "bigint", even: type("number").narrow(n => n % 2 === 0) }) // was: throws // now: { type: "object", properties: { big: {}, even: { type: "number" } }, ... } T["~standard"].jsonSchema.input({ target: "draft-2020-12" }) ``` Fallbacks from a scope's `toJsonSchema` config or from `libraryOptions` still take precedence, and `toJsonSchema()` itself still throws by default. A `defaultValue` fallback can now return `undefined` to omit the default rather than writing `default: undefined`. ##### [v2.2.8](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#228) ##### Add `string.base58` Validates base58-encoded strings, which use the Bitcoin alphabet (no `0`, `O`, `I` or `l`): ```ts const Base58 = type("string.base58") // valid Base58("3mJr7AoUXx2Wqd") // ArkErrors: must be base58-encoded (was "0OIl") Base58("0OIl") ``` Thanks to [@WolfieLeader](https://github.com/WolfieLeader). ##### Return empty `props` for `object` `type("object").props` threw instead of returning the empty list of properties, like `type({}).props` does ([#1682](arktypeio/arktype#1682), fixes [#1177](arktypeio/arktype#1177)). Thanks to [@SunilRathod27](https://github.com/SunilRathod27). ##### Keep object values from meta in JSON Schema Meta values that aren't primitives, like an object or array `default` or a custom key like `x-unit`, were emitted as internal `$ark` references instead of their JSON values ([#1677](arktypeio/arktype#1677)). Defaults that aren't valid JSON, including functions, now go through the `defaultValue` fallback. Thanks to [@lprnmns](https://github.com/lprnmns). ##### Report invalid generic definitions on TypeScript 7 TypeScript 7 only reports the error of the last overload that fails, which for an invalid generic definition was the tuple expression signature rather than ArkType's own message ([#1681](arktypeio/arktype#1681)): ```ts // TypeScript 7 previously: Argument of type '"<n extends nummer>"' is not assignable to parameter of type '"Array" | ... // now: 'nummer' is unresolvable type("<n extends nummer>", "n > 0") ``` The generic and tuple expression signatures of `type` are now a single signature, so TypeScript 6 and 7 report the same errors directly, and errors in a generic's body point at the invalid property.
renovate Bot
added a commit
that referenced
this pull request
Nov 9, 2026
##### [v2.2.9](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#229) ##### Keep tuple elements around defaults in `.in` and `.out` Combining a tuple's defaultable elements with its other elements dropped some of them, depending on key order: ```ts const T = type(["string", "number = 5", "boolean?"]) // was: [string, boolean?] // now: [string, number?, boolean?] T.in.expression // was: number[] // now: [number, string, ...number[]] type(["number", "string = 'foo'", "...", "number[]"]).out.expression ``` A bound that narrows two existing length constraints at once also no longer throws "multiple distinct intersection results": ```ts // was: throws // now: string == 2 type("1 <= string <= 2").and("string >= 2") ``` Thanks to [@ybai08](https://github.com/ybai08) ([#1696](arktypeio/arktype#1696)). ##### Reject `NaN` in unions discriminated by `typeof` `number` rejects `NaN`, but compiled unions like `number | null` dropped that check when they discriminated by `typeof`, so `NaN` was only rejected with `jitless` ([#1702](arktypeio/arktype#1702)). ```ts const T = type("number | null") // was: NaN // now: ArkErrors: must be a number (was NaN) T(NaN) ``` Thanks to [@thecotne](https://github.com/thecotne). ##### Don't treat `Object.prototype` keys as declared Inherited names like `toString` or `constructor`, and an own `__proto__` key like the one `JSON.parse` creates, were treated as declared keys, so `"+": "delete"` kept them and `"+": "reject"` accepted them ([#1701](arktypeio/arktype#1701)). ```ts const T = type({ a: "string", "+": "reject" }) // was: { a: "x", constructor: 1 } // now: ArkErrors: constructor must be removed T({ a: "x", constructor: 1 }) ``` Thanks to [@thecotne](https://github.com/thecotne). ##### Only emit referenced `$defs` in `toJsonSchema` With `useRefs`, or for a cyclic type, every node a type referenced was written to `$defs`, including discriminated union cases that never appear in the output. Some of those couldn't be converted, so `toJsonSchema()` threw `Unexpected JSON Schema input for structure: {}` ([#1689](arktypeio/arktype#1689), fixes [#1612](arktypeio/arktype#1612), [#1511](arktypeio/arktype#1511) and [#1546](arktypeio/arktype#1546)). ```ts const T = type.or( { a: type.enumerated("a", "b", "c"), b: "1" }, { a: type.enumerated("a", "e", "f"), b: "2" } ) // was: throws // now: only the $defs that a $ref points to T.toJsonSchema({ useRefs: true }) ``` Thanks to [@giaBaoJS](https://github.com/giaBaoJS). ##### Convert unrepresentable types in `~standard.jsonSchema` instead of throwing `~standard.jsonSchema.input` and `.output` now throw only for an unsupported `target`, i.e. one other than `draft-2020-12` or `draft-07`. Parts of a type that JSON Schema can't represent are converted instead ([#1694](arktypeio/arktype#1694)): - a predicate, a second pattern, a `Date` bound or an array's non-index props is dropped from the schema it constrains - `bigint`, `symbol`, a non-JSON unit like `undefined` and any prototype other than `Array` become `{}` - a variadic tuple with postfix elements keeps its prefix and `minItems`, but not its `items` - a default that isn't JSON is omitted ```ts const T = type({ big: "bigint", even: type("number").narrow(n => n % 2 === 0) }) // was: throws // now: { type: "object", properties: { big: {}, even: { type: "number" } }, ... } T["~standard"].jsonSchema.input({ target: "draft-2020-12" }) ``` Fallbacks from a scope's `toJsonSchema` config or from `libraryOptions` still take precedence, and `toJsonSchema()` itself still throws by default. A `defaultValue` fallback can now return `undefined` to omit the default rather than writing `default: undefined`. ##### [v2.2.8](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#228) ##### Add `string.base58` Validates base58-encoded strings, which use the Bitcoin alphabet (no `0`, `O`, `I` or `l`): ```ts const Base58 = type("string.base58") // valid Base58("3mJr7AoUXx2Wqd") // ArkErrors: must be base58-encoded (was "0OIl") Base58("0OIl") ``` Thanks to [@WolfieLeader](https://github.com/WolfieLeader). ##### Return empty `props` for `object` `type("object").props` threw instead of returning the empty list of properties, like `type({}).props` does ([#1682](arktypeio/arktype#1682), fixes [#1177](arktypeio/arktype#1177)). Thanks to [@SunilRathod27](https://github.com/SunilRathod27). ##### Keep object values from meta in JSON Schema Meta values that aren't primitives, like an object or array `default` or a custom key like `x-unit`, were emitted as internal `$ark` references instead of their JSON values ([#1677](arktypeio/arktype#1677)). Defaults that aren't valid JSON, including functions, now go through the `defaultValue` fallback. Thanks to [@lprnmns](https://github.com/lprnmns). ##### Report invalid generic definitions on TypeScript 7 TypeScript 7 only reports the error of the last overload that fails, which for an invalid generic definition was the tuple expression signature rather than ArkType's own message ([#1681](arktypeio/arktype#1681)): ```ts // TypeScript 7 previously: Argument of type '"<n extends nummer>"' is not assignable to parameter of type '"Array" | ... // now: 'nummer' is unresolvable type("<n extends nummer>", "n > 0") ``` The generic and tuple expression signatures of `type` are now a single signature, so TypeScript 6 and 7 report the same errors directly, and errors in a generic's body point at the invalid property.
renovate Bot
added a commit
that referenced
this pull request
Nov 16, 2026
##### [v2.2.9](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#229) ##### Keep tuple elements around defaults in `.in` and `.out` Combining a tuple's defaultable elements with its other elements dropped some of them, depending on key order: ```ts const T = type(["string", "number = 5", "boolean?"]) // was: [string, boolean?] // now: [string, number?, boolean?] T.in.expression // was: number[] // now: [number, string, ...number[]] type(["number", "string = 'foo'", "...", "number[]"]).out.expression ``` A bound that narrows two existing length constraints at once also no longer throws "multiple distinct intersection results": ```ts // was: throws // now: string == 2 type("1 <= string <= 2").and("string >= 2") ``` Thanks to [@ybai08](https://github.com/ybai08) ([#1696](https://redirect.github.com/arktypeio/arktype/issues/1696)). ##### Reject `NaN` in unions discriminated by `typeof` `number` rejects `NaN`, but compiled unions like `number | null` dropped that check when they discriminated by `typeof`, so `NaN` was only rejected with `jitless` ([#1702](https://redirect.github.com/arktypeio/arktype/issues/1702)). ```ts const T = type("number | null") // was: NaN // now: ArkErrors: must be a number (was NaN) T(NaN) ``` Thanks to [@thecotne](https://github.com/thecotne). ##### Don't treat `Object.prototype` keys as declared Inherited names like `toString` or `constructor`, and an own `__proto__` key like the one `JSON.parse` creates, were treated as declared keys, so `"+": "delete"` kept them and `"+": "reject"` accepted them ([#1701](https://redirect.github.com/arktypeio/arktype/issues/1701)). ```ts const T = type({ a: "string", "+": "reject" }) // was: { a: "x", constructor: 1 } // now: ArkErrors: constructor must be removed T({ a: "x", constructor: 1 }) ``` Thanks to [@thecotne](https://github.com/thecotne). ##### Only emit referenced `$defs` in `toJsonSchema` With `useRefs`, or for a cyclic type, every node a type referenced was written to `$defs`, including discriminated union cases that never appear in the output. Some of those couldn't be converted, so `toJsonSchema()` threw `Unexpected JSON Schema input for structure: {}` ([#1689](https://redirect.github.com/arktypeio/arktype/issues/1689), fixes [#1612](https://redirect.github.com/arktypeio/arktype/issues/1612), [#1511](https://redirect.github.com/arktypeio/arktype/issues/1511) and [#1546](https://redirect.github.com/arktypeio/arktype/issues/1546)). ```ts const T = type.or( { a: type.enumerated("a", "b", "c"), b: "1" }, { a: type.enumerated("a", "e", "f"), b: "2" } ) // was: throws // now: only the $defs that a $ref points to T.toJsonSchema({ useRefs: true }) ``` Thanks to [@giaBaoJS](https://github.com/giaBaoJS). ##### Convert unrepresentable types in `~standard.jsonSchema` instead of throwing `~standard.jsonSchema.input` and `.output` now throw only for an unsupported `target`, i.e. one other than `draft-2020-12` or `draft-07`. Parts of a type that JSON Schema can't represent are converted instead ([#1694](https://redirect.github.com/arktypeio/arktype/issues/1694)): - a predicate, a second pattern, a `Date` bound or an array's non-index props is dropped from the schema it constrains - `bigint`, `symbol`, a non-JSON unit like `undefined` and any prototype other than `Array` become `{}` - a variadic tuple with postfix elements keeps its prefix and `minItems`, but not its `items` - a default that isn't JSON is omitted ```ts const T = type({ big: "bigint", even: type("number").narrow(n => n % 2 === 0) }) // was: throws // now: { type: "object", properties: { big: {}, even: { type: "number" } }, ... } T["~standard"].jsonSchema.input({ target: "draft-2020-12" }) ``` Fallbacks from a scope's `toJsonSchema` config or from `libraryOptions` still take precedence, and `toJsonSchema()` itself still throws by default. A `defaultValue` fallback can now return `undefined` to omit the default rather than writing `default: undefined`. ##### [v2.2.8](https://github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#228) ##### Add `string.base58` Validates base58-encoded strings, which use the Bitcoin alphabet (no `0`, `O`, `I` or `l`): ```ts const Base58 = type("string.base58") // valid Base58("3mJr7AoUXx2Wqd") // ArkErrors: must be base58-encoded (was "0OIl") Base58("0OIl") ``` Thanks to [@WolfieLeader](https://github.com/WolfieLeader). ##### Return empty `props` for `object` `type("object").props` threw instead of returning the empty list of properties, like `type({}).props` does ([#1682](https://redirect.github.com/arktypeio/arktype/issues/1682), fixes [#1177](https://redirect.github.com/arktypeio/arktype/issues/1177)). Thanks to [@SunilRathod27](https://github.com/SunilRathod27). ##### Keep object values from meta in JSON Schema Meta values that aren't primitives, like an object or array `default` or a custom key like `x-unit`, were emitted as internal `$ark` references instead of their JSON values ([#1677](https://redirect.github.com/arktypeio/arktype/issues/1677)). Defaults that aren't valid JSON, including functions, now go through the `defaultValue` fallback. Thanks to [@lprnmns](https://github.com/lprnmns). ##### Report invalid generic definitions on TypeScript 7 TypeScript 7 only reports the error of the last overload that fails, which for an invalid generic definition was the tuple expression signature rather than ArkType's own message ([#1681](https://redirect.github.com/arktypeio/arktype/issues/1681)): ```ts // TypeScript 7 previously: Argument of type '"<n extends nummer>"' is not assignable to parameter of type '"Array" | ... // now: 'nummer' is unresolvable type("<n extends nummer>", "n > 0") ``` The generic and tuple expression signatures of `type` are now a single signature, so TypeScript 6 and 7 report the same errors directly, and errors in a generic's body point at the invalid property.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^18.0.3→^18.0.4Release Notes
markedjs/marked (marked)
v18.0.4Compare Source
Bug Fixes
Configuration
📅 Schedule: (UTC)
* 21-23 * * 7)* 0-16 * * 1)🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
[Mon Jun 1 12:02:28 UTC 2026] Downloading the Android app preview from Diawi:
https://i.diawi.com/c2UEMh