npm / @earendil-works/pi-schema
@earendil-works/pi-schema
What changed in @earendil-works/pi-schema 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-11.
1 breaking1 security13 new APIs and options1 performance2 behavior and defaults4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@earendil-works/pi-schema 122 changes
Breaking changes 1
Number and integer schemas reject NaN and infinities, matching TypeBox; errors name the invalid value.
Security 1
Compiles JSON Schema drafts 2020-12 and 7 into validators without eval or new Function.
New APIs and options 13
Adds a builder for the BigInt schema type.
Adds JSON equality matching how const, enum and uniqueItems compare, as a drop-in for TypeBox's Value.Equal.
Adds recursive<T>(id, build) for building self-containing schemas with an explicit type.
Adds Static typing support for TypeBox's Enum, Tuple, BigInt and Undefined schemas.
Adds unsafe<T>(schema), which types a schema as accepting T without checking it, like TypeBox's Type.Unsafe.
Adds a non-coercing validation method to every validator, returning either the value or errors.
Enabling coerce adds coerce(value) and parse(value) for loosely typed input; coercion follows the listed TypeBox and Ajv-style rules.
Adds an optional formats entry point for format checks, including url and json-pointer-uri-fragment.
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.
Provides static types for TypeBox 1.x schemas without importing TypeBox; unsupported TypeBox kinds resolve to unknown.
Setting unresolvedRefs to reject compiles references that name nothing as false instead of throwing.
Provides a boolean check and acts as a type guard for schemas built with the builders.
Reports each validation failure with a JSON Pointer path.
Performance 1
Optimizes several checks without eval; benchmark speed cases improve about 16%, with larger gains for tagged unions and nullable properties.
Behavior and default changes 2
Number keywords now apply to numbers and bigints alike, with bounds of either kind.
Copies only paths it changes and returns the original input when nothing changes.
Fixes and other changes 4
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.
A required property set to undefined is valid when its schema accepts undefined; optional properties set to undefined still count as absent.
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.
BigInt and Undefined schemas validate and coerce according to TypeBox, including Value.Convert's rules.