Commit b0ccc7d
authored
chore(deps): update dependency arktype to v2.1.28 (#2255)
This PR contains the following updates:
| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [arktype](https://redirect.github.com/arktypeio/arktype)
([source](https://redirect.github.com/arktypeio/arktype/tree/HEAD/ark/type))
| [`2.1.27` ->
`2.1.28`](https://renovatebot.com/diffs/npm/arktype/2.1.27/2.1.28) |

|

|
---
### Release Notes
<details>
<summary>arktypeio/arktype (arktype)</summary>
###
[`v2.1.28`](https://redirect.github.com/arktypeio/arktype/blob/HEAD/ark/type/CHANGELOG.md#2128)
[Compare
Source](https://redirect.github.com/arktypeio/arktype/compare/arktype@2.1.27...arktype@2.1.28)
##### JSON Schema improvements
- Adds support for the new Standard JSON Schema interface (see
standardschema.dev)
- Now accepts a `target` option and can generate draft-07 in addition to
draft-2020-12
##### Standard Schema is now a valid definition
Any Standard Schema compliant validator can now be passed directly to
`type`, either directly or nested in a structural ArkType definition,
and will be fully inferred and validated.
```ts
import { type } from "arktype"
import * as v from "valibot"
import z from "zod"
const ZodAddress = z.object({
street: z.string(),
city: z.string()
})
const User = type({
name: "string",
age: v.number(),
address: ZodAddress
})
```
##### e(x)ec mode for regex types
```ts
const User = type({
// x-prefix a regex literal to parse its type-safe capture groups
birthday: "x/^(?<month>\\d{2})-(?<day>\\d{2})-(?<year>\\d{4})$/"
})
const data = User.assert({ birthday: "05-21-1993" })
// fully type-safe via arkregex
console.log(data.birthday.groups) // { month: "05", day: "21", year: "1993" }
```
##### more flexible `type.declare`
Optionality can now be expressed via a property value in addition to its
key:
```ts
type Expected = { f?: string }
const T = type.declare<Expected>().type({
// previously failed with `"f?" is missing`
f: "string?"
})
```
##### fixed a bug causing predicate errors after the first to not be
reported
```ts
import { type } from "arktype"
const Dates = type({
date1: "string.date",
date2: "string.date",
date3: "string.date"
})
// now correctly reports the errors on `date2` and `date3` in addition to `date1`
Dates.assert({
date1: "",
date2: "",
date3: ""
})
```
See
[#​1557](https://redirect.github.com/arktypeio/arktype/issues/1557)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "every weekend" (UTC), 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.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/graphql/graphql.github.io).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4zMi4yIiwidXBkYXRlZEluVmVyIjoiNDIuMzIuMiIsInRhcmdldEJyYW5jaCI6InNvdXJjZSIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>1 parent d3972c1 commit b0ccc7d
1 file changed
+18
-18
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments