v8.0.0
Major — zod becomes a truly optional peer. One breaking change: the zod-based
scope helpers move to a new opt-in footprintjs/zod entry.
Changed (BREAKING)
-
The zod scope helpers are no longer re-exported from
footprintjsor
footprintjs/advanced. They moved to the newfootprintjs/zodentry.Why: re-exporting them from the core barrels forced every consumer to load
zod eagerly — a plainfootprintjsinstall would crash at load with
ERR_MODULE_NOT_FOUND: 'zod'if zod wasn't installed, even when the consumer
never used a zod schema. zod is declared as an optional peer, so the core
must not import it. Now it doesn't:footprintjsandfootprintjs/advanced
load with zod completely absent.Migration — import from the subpath and add
zodto your dependencies:// before import { defineScopeFromZod, defineScopeSchema } from 'footprintjs'; import { createScopeProxyFromZod, isScopeSchema, ZodScopeResolver } from 'footprintjs/advanced'; // after import { defineScopeFromZod, defineScopeSchema, createScopeProxyFromZod, isScopeSchema, ZodScopeResolver, type DefineScopeOptions, } from 'footprintjs/zod';
Added
footprintjs/zodsubpath export — the opt-in home fordefineScopeFromZod,
defineScopeSchema,isScopeSchema,createScopeProxyFromZod,
ZodScopeResolver, and theDefineScopeOptionstype.
Tests
api-conformance/zod-subpath— locks the contract: the core barrels never
export the zod helpers; thefootprintjs/zodentry exports all of them.