# What changed in @earendil-works/pi-schema

> 22 changes in @earendil-works/pi-schema 1 from its official release notes, upgrade guides and advisories: 1 breaking, 1 security, 13 new APIs and options. Each one cited. Sources checked 2026-11-11. HTML: https://unstale.sh/npm/@earendil-works/pi-schema/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @earendil-works/pi-schema 1

### Breaking changes

- Number and integer schemas reject NaN and infinities, matching TypeBox; errors name the invalid value. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)

### Security

- Compiles JSON Schema drafts 2020-12 and 7 into validators without eval or new Function. (1.5.0) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#150---2026-11-02)

### New APIs and options

- Adds a builder for the BigInt schema type. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)
- Adds JSON equality matching how const, enum and uniqueItems compare, as a drop-in for TypeBox's Value.Equal. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)
- Adds recursive<T>(id, build) for building self-containing schemas with an explicit type. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)
- Adds Static typing support for TypeBox's Enum, Tuple, BigInt and Undefined schemas. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)
- Adds unsafe<T>(schema), which types a schema as accepting T without checking it, like TypeBox's Type.Unsafe. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)
- Adds a non-coercing validation method to every validator, returning either the value or errors. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)
- Enabling coerce adds coerce(value) and parse(value) for loosely typed input; coercion follows the listed TypeBox and Ajv-style rules. (1.5.0) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#150---2026-11-02)
- Adds an optional formats entry point for format checks, including url and json-pointer-uri-fragment. (1.5.0) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#150---2026-11-02)
- Adds builders that return plain JSON Schema typed with the values they accept, including str, num, int, bool, nul, unknown, lit, oneOf, obj, opt, arr, tuple, map, union, nullable, and bytes. (1.5.0) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#150---2026-11-02)
- Provides static types for TypeBox 1.x schemas without importing TypeBox; unsupported TypeBox kinds resolve to unknown. (1.5.0) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#150---2026-11-02)
- Setting unresolvedRefs to reject compiles references that name nothing as false instead of throwing. (1.5.0) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#150---2026-11-02)
- Provides a boolean check and acts as a type guard for schemas built with the builders. (1.5.0) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#150---2026-11-02)
- Reports each validation failure with a JSON Pointer path. (1.5.0) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#150---2026-11-02)

### Performance

- Optimizes several checks without eval; benchmark speed cases improve about 16%, with larger gains for tagged unions and nullable properties. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)

### Behavior and default changes

- Number keywords now apply to numbers and bigints alike, with bounds of either kind. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)
- Copies only paths it changes and returns the original input when nothing changes. (1.5.0) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#150---2026-11-02)

### Fixes and other changes

- Fixes local $ref resolution for schemas with relative root IDs containing a directory, and applies relative IDs once in the noted nested-resource, error-explanation and coercion cases. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)
- A required property set to undefined is valid when its schema accepts undefined; optional properties set to undefined still count as absent. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)
- Moves third-party licenses from LICENSES/ to THIRD_PARTY_NOTICES/ to prevent Vite license notices from treating them as the package license and failing browser builds. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)
- BigInt and Undefined schemas validate and coerce according to TypeBox, including Value.Convert's rules. (1.5.1) — [release notes](https://github.com/earendil-works/pi/blob/c8390defa9b69a05629a1a0877cd91aa18585ecd/packages/schema/CHANGELOG.md#151---2026-11-09)
