Skip to content

⬆️ Update dependency marked to ^18.0.4 - #1681

Merged
renovate[bot] merged 1 commit into
mainfrom
renovate/marked-18.x
Jun 1, 2026
Merged

renovate[bot] merged 1 commit into
mainfrom
renovate/marked-18.x

Conversation

@renovate

@renovate renovate Bot commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
marked (source) ^18.0.3 → ^18.0.4 age confidence

Release Notes

markedjs/marked (marked)

v18.0.4

Compare Source

Bug Fixes

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Between 09:00 PM and 11:59 PM, only on Sunday (* 21-23 * * 7)
    • Between 12:00 AM and 04:59 PM, only on Monday (* 0-16 * * 1)
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

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:

QR code

https://i.diawi.com/c2UEMh

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Bundle Stats

Hey 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

Files count Total bundle size % Changed
268 48.31 MB → 48.31 MB (+43 B)
12.11 MB → 12.11 MB (gzip)
+0.00%
Changeset
File Δ Size
candidates/+page.svelte 🆕 +1.05 kB 0 B → 1.05 kB
node_modules/marked/lib/marked.esm.js 📈 +38 B (+0.17%) 22.48 kB → 22.51 kB
ModalSubmitIssue.svelte 📈 +4 B (+0.12%) 3.26 kB → 3.27 kB
lib/Markdown.svelte 📈 +1 B (+0.09%) 1.06 kB → 1.06 kB
legacy/legacy-client.js 🔥 -1.04 kB (-100%) 1.04 kB → 0 B
load-utils/index.js 🔥 -608 B (-100%) 608 B → 0 B
View detailed bundle breakdown

Added

Asset File Size % Changed
_app/immutable/nodes/19.CMfklnPV.js 0 B → 2.12 kB (+2.12 kB)
0 B → 1.23 kB (gzip)
-
_app/immutable/nodes/5.DYFD6oiz.js 0 B 0%

Removed

Asset File Size % Changed
_app/immutable/nodes/19.4A1FfbJq.js 2.12 kB → 0 B (-2.12 kB)
1.23 kB → 0 B (gzip)
-100%
_app/immutable/nodes/5.v5tbsBPl.js 0 B 0%

Bigger

Asset File Size % Changed
_app/immutable/chunks/2PiCZO5e.js 26.8 kB → 26.84 kB (+43 B)
9.84 kB → 9.88 kB (gzip)
+0.16%

Smaller

No assets were smaller

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Performance changes with main

Browser Test Metric Head Base Change
webkit startup @blank Total 10 887,4 ms 8 858,2 ms 🔺+22,91 %
startup Total 10 844 ms 10 013 ms
chromium startup @blank DOM 687,78 518,88 🔺+32,55
Load 688,02 519,16 🔺+32,53
Bytes 7 847 057,8 8 284 008
LCP 14 804 12 542,4 🔺+18,03
TBT 2 778,2 1 895,8 🔺+46,54
CLS 0,13 0,11 🔺+19,51
Total 14 962,2 ms 13 225,4 ms 🔺+13,13 %
startup DOM 637,84 559,84 🔺+13,93
Load 638,02 560,02 🔺+13,93
Bytes 18 627 016 18 578 199
LCP 8 193,6 7 879,2
TBT 2 115,2 1 993,8
CLS 0,16 0,09 🔺+85,56
Total 8 686,8 ms 8 447,2 ms

Total: total, DOM: domCompleteTiming, Load: pageloadTiming, Bytes: totalBytes, LCP: largestContentfulPaint, TBT: totalBlockingTime, CLS: cumulativeLayoutShift,

@renovate
renovate Bot merged commit a07f0b8 into main Jun 1, 2026
56 of 57 checks passed
@renovate
renovate Bot deleted the renovate/marked-18.x branch June 1, 2026 14:17
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

7 active deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants