yuppee v1.0.0 is a lightweight, zero-dependency migration utility for migrating JSON objects between schema versions. It provides type-safe migrations using TypeScript generics, allowing developers to define incremental migrations from one version to the next. The library is designed for small state or settings objects stored as JSON, and is suitable for Node.js environments (requires Node >=22). Unlike heavier migration tools for databases, yuppee focuses on client-side or edge-case schema evolution with minimal overhead. It ships with TypeScript definitions and is ESM-only.
npm install yuppeeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a type-safe migration chain from version 1 to 3 using createMigrator and createMigration.
Upgrade Node.js to version 22 or later.
Use import statements and ensure your project is configured for ESM (e.g., type: 'module' in package.json).
Provide an init function that returns a valid state for the earliest version.
Ensure migrations form a linear chain: 1->2, 2->3, etc.
Define a union type of all versions that can be passed to migrate().
Use import instead: import { createMigrator } from 'yuppee';Ensure the generic types match the actual migration chain: the output of one migration must be compatible with the input of the next.
const migrate = createMigrator(...); then call migrate(state).
No dependency data recorded yet.