Skip to content

⬆️ Update dependency tinykeys to v4 - #1694

Merged
gwennlbh merged 2 commits into
mainfrom
renovate/tinykeys-4.x
Jun 3, 2026
Merged

gwennlbh merged 2 commits into
mainfrom
renovate/tinykeys-4.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
tinykeys ^3.0.0 → ^4.0.0 age confidence

Release Notes

jamiebuilds/tinykeys (tinykeys)

v4.0.0

Compare Source

v3.1.0

Compare Source


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: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, 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.

[Tue Jun 2 11:59:41 UTC 2026] Downloading the Android app preview from Diawi:

QR code

https://i.diawi.com/6sjDUj

@renovate
renovate Bot temporarily deployed to 1694: App preview June 1, 2026 11:54 Inactive
@renovate
renovate Bot temporarily deployed to 1694: Android problems report June 1, 2026 12:00 Inactive
@renovate
renovate Bot temporarily deployed to 1694: Coverage June 1, 2026 12:08 Inactive
@renovate
renovate Bot temporarily deployed to 1694: Unit tests June 1, 2026 12:08 Inactive
@renovate
renovate Bot temporarily deployed to 1694: Bundle analyzer June 1, 2026 12:30 Inactive
@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.28 MB → 48.28 MB (+226 B)
12.1 MB → 12.1 MB (gzip)
+0.00%
Changeset
File Δ Size
tinykeys/dist/tinykeys.mjs 🆕 +1.99 kB 0 B → 1.99 kB
candidates/+page.svelte 🆕 +1.05 kB 0 B → 1.05 kB
main.proxy.js 🆕 +181 B 0 B → 181 B
string.js 📈 +8.29 kB (+1067.30%) 795 B → 9.06 kB
KeyboardShortcuts.svelte 📈 +16 B (+0.20%) 7.99 kB → 8.01 kB
tinykeys/dist/tinykeys.module.js 🔥 -1.68 kB (-100%) 1.68 kB → 0 B
.wuchale/main.proxy.js 🔥 -181 B (-100%) 181 B → 0 B
View detailed bundle breakdown

Added

Asset File Size % Changed
_app/immutable/nodes/2.BQSJ8rz4.js 0 B → 35.98 kB (+35.98 kB)
0 B → 14.86 kB (gzip)
-

Removed

Asset File Size % Changed
_app/immutable/nodes/2.CYPGOlAA.js 35.74 kB → 0 B (-35.74 kB)
14.66 kB → 0 B (gzip)
-100%

Bigger

No assets were bigger

Smaller

Asset File Size % Changed
_app/immutable/nodes/22.BJnDEONJ.js 12.1 kB → 12.08 kB (-15 B)
5.32 kB → 5.32 kB (gzip)
-0.12%

@renovate
renovate Bot temporarily deployed to 1694: E2E tests June 1, 2026 13:41 Inactive
@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 9 842,8 ms 10 706,8 ms
startup Total 10 010,8 ms 10 038,2 ms
chromium startup @blank DOM 688,68 705,66
Load 688,94 705,9
Bytes 8 325 246 8 285 367
LCP 14 790,4 14 844
TBT 2 700,8 2 782,6
CLS 0,12 0,15 🔻-18,52
Total 14 924,8 ms 15 138,8 ms
startup DOM 618,4 662,18
Load 618,54 662,34
Bytes 18 643 214 18 581 308
LCP 7 750,4 7 748
TBT 1 942,6 1 897,2
CLS 0,12 0,11 🔺+14,25
Total 8 455,6 ms 8 384,8 ms

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

@renovate
renovate Bot force-pushed the renovate/tinykeys-4.x branch from f4962c0 to 40d5bf7 Compare June 1, 2026 14:17
@renovate
renovate Bot temporarily deployed to 1694: App preview June 1, 2026 14:20 Inactive
@renovate
renovate Bot temporarily deployed to 1694: Coverage June 1, 2026 14:26 Inactive
@renovate
renovate Bot temporarily deployed to 1694: Unit tests June 1, 2026 14:26 Inactive
@renovate
renovate Bot temporarily deployed to 1694: Android problems report June 1, 2026 14:26 Inactive
@renovate
renovate Bot temporarily deployed to 1694: Bundle analyzer June 1, 2026 14:33 Inactive
@renovate
renovate Bot temporarily deployed to 1694: E2E tests June 1, 2026 14:58 Inactive
@renovate

renovate Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@gwennlbh
gwennlbh deleted the renovate/tinykeys-4.x branch September 15, 2026 21:35
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
1694: E2E tests — df0f90c9 Deployed Jun 3, 2026 by gwennlbh via E2E / Upload report / Deploy #7625
1694: Bundle analyzer — df0f90c9 Deployed Jun 2, 2026 by gwennlbh via Bundle size / Breakdown site / Deploy #7625
1694: Android problems report — df0f90c9 Deployed Jun 2, 2026 by gwennlbh via PR Preview / Android app / Upload problems report / Deploy #7625
1694: Unit tests — df0f90c9 Deployed Jun 2, 2026 by gwennlbh via Unit tests / Test report / Deploy #7625
1694: App preview — df0f90c9 Deployed Jun 2, 2026 by gwennlbh via PR Preview / Deploy / Deploy #7625
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.

1 participant