Skip to content

⬆️ Update dependency ua-parser-js to ^2.0.10 - #1682

Merged
renovate[bot] merged 1 commit into
mainfrom
renovate/ua-parser-js-2.x
Jun 1, 2026
Merged

renovate[bot] merged 1 commit into
mainfrom
renovate/ua-parser-js-2.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
ua-parser-js (source) ^2.0.9 → ^2.0.10 age confidence

Release Notes

faisalman/ua-parser-js (ua-parser-js)

v2.0.10

Compare Source

  • Fix ReDoS vulnerability by limiting Client Hints input length (GHSA-9h5v-pfqq-x599)
  • Add new method useExtension() in UAParser to extend custom detection rules
  • Add new device vendor: Blackview, Coolpad, CUBOT, T-Mobile
  • Improve browser detection: Huawei Browser, UCBrowser
  • Improve OS detection: iOS
  • Identify WebView user-agent as inapp browser
  • extensions submodule:
    • Add new crawler: atlassian-bot, Audisto Crawler, AwarioBot, AwarioRssBot, AwarioSmartBot, BrightEdge Crawler, HubSpot Crawler, Meta-ExternalAds, Meta-WebIndexer, proximic, yacybot
    • Add new fetcher: Feedly, GoogleDocs, UptimeBot, virustotal
    • Add new library: phpcrawl
  • helpers submodule:
    • Fix isElectron() function return itself

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:06:10 UTC 2026] Downloading the Android app preview from Diawi:

QR code

https://i.diawi.com/tyA4ko

@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.28 MB (-31.63 kB)
12.11 MB → 12.1 MB (gzip)
-0.06%
Changeset
File Δ Size
metadata/constraints.ts 🆕 +1.99 kB 0 B → 1.99 kB
legacy/legacy-client.js 🆕 +1.04 kB 0 B → 1.04 kB
microdiff/dist/index.js 🆕 +740 B 0 B → 740 B
url-alphabet/index.js 🆕 +83 B 0 B → 83 B
schema.js 📈 +990 B (+1031.25%) 96 B → 1.06 kB
errors.js 📈 +822 B (+428.13%) 192 B → 1014 B
warnings.js 📈 +554 B (+344.10%) 161 B → 715 B
string.js 📈 +614 B (+339.23%) 181 B → 795 B
equality.js 📈 +626 B (+326.04%) 192 B → 818 B
fflate/esm/browser.js 📈 +6.36 kB (+118.87%) 5.35 kB → 11.71 kB
types.js 📈 +229 B (+99.57%) 230 B → 459 B
tiny-jsonc/dist/index.js 📈 +82 B (+41.21%) 199 B → 281 B
idb/build/index.js 📈 +1.02 kB (+30.84%) 3.31 kB → 4.33 kB
boundary.js 📈 +780 B (+26.48%) 2.88 kB → 3.64 kB
ua-parser-js/src/main/ua-parser.mjs 📈 +429 B (+1.59%) 26.29 kB → 26.71 kB
base.js 📈 +22 B (+1.38%) 1.55 kB → 1.57 kB
identity.js 📉 -6 B (-0.69%) 866 B → 860 B
conversions/types.js 📉 -22 B (-4.79%) 459 B → 437 B
json/schema.js 📉 -121 B (-11.14%) 1.06 kB → 965 B
client.js 📉 -4.02 kB (-85.96%) 4.67 kB → 672 B
main/ua-parser.mjs 🔥 -32.03 kB (-100%) 32.03 kB → 0 B
browser.js 🔥 -11.71 kB (-100%) 11.71 kB → 0 B
blocks/boundary.js 🔥 -3.64 kB (-100%) 3.64 kB → 0 B
constraints.ts 🔥 -1.99 kB (-100%) 1.99 kB → 0 B
View detailed bundle breakdown

Added

Asset File Size % Changed
_app/immutable/chunks/D_R8YE3d2.js 0 B → 9.73 kB (+9.73 kB)
0 B → 3.91 kB (gzip)
-
_app/immutable/nodes/0.DVZDw_r5.js 0 B 0%
_app/immutable/nodes/5.BUDHA4J1.js 0 B 0%

Removed

Asset File Size % Changed
_app/immutable/chunks/CaiHqXDG2.js 9.73 kB → 0 B (-9.73 kB)
3.91 kB → 0 B (gzip)
-100%
_app/immutable/nodes/0.Mcvtsu09.js 0 B 0%
_app/immutable/nodes/5.v5tbsBPl.js 0 B 0%

Bigger

Asset File Size % Changed
_app/immutable/chunks/BXOjG3XF.js 134.17 kB → 134.59 kB (+429 B)
59.98 kB → 60.15 kB (gzip)
+0.31%

Smaller

Asset File Size % Changed
_app/immutable/workers/start-[hash].js 1.96 MB → 1.93 MB (-32.05 kB)
671.15 kB → 658.67 kB (gzip)
-1.59%

@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 309,8 ms 8 858,2 ms 🔺+16,39 %
startup Total 10 003,2 ms 10 013 ms
chromium startup @blank DOM 554,28 518,88
Load 554,6 519,16
Bytes 7 846 063,4 8 284 008
LCP 14 698,4 12 542,4 🔺+17,19
TBT 2 760,4 1 895,8 🔺+45,61
CLS 0,16 0,11 🔺+42,93
Total 14 832,8 ms 13 225,4 ms 🔺+12,15 %
startup DOM 536,16 559,84
Load 537,22 560,02
Bytes 18 630 016 18 578 199
LCP 7 922,4 7 879,2
TBT 2 044,6 1 993,8
CLS 0,11 0,09 🔺+25,7
Total 8 399,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 b173797 into main Jun 1, 2026
55 checks passed
@renovate
renovate Bot deleted the renovate/ua-parser-js-2.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