Skip to content

v8.0.0

Choose a tag to compare

@sanjay1909 sanjay1909 released this 08 Jun 20:34
· 76 commits to main since this release

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 footprintjs or
    footprintjs/advanced.
    They moved to the new footprintjs/zod entry.

    Why: re-exporting them from the core barrels forced every consumer to load
    zod eagerly — a plain footprintjs install 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: footprintjs and footprintjs/advanced
    load with zod completely absent.

    Migration — import from the subpath and add zod to 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/zod subpath export — the opt-in home for defineScopeFromZod,
    defineScopeSchema, isScopeSchema, createScopeProxyFromZod,
    ZodScopeResolver, and the DefineScopeOptions type.

Tests

  • api-conformance/zod-subpath — locks the contract: the core barrels never
    export the zod helpers; the footprintjs/zod entry exports all of them.