🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@nanocollective/json-up

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nanocollective/json-up

A TypeScript JSON migration tool with Zod schema validation

Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
247
20.49%
Maintainers
2
Weekly downloads
 
Created
Source

json-up

A fast, type-safe JSON migration tool with Zod schema validation.

Features

  • Type-safe migrations for JSON with full TypeScript inference
  • Zod schema validation at every step
  • Fluent builder API for migration chains
  • Automatic version tracking
  • Zero runtime dependencies (only Zod as peer)

Installation

npm install @nanocollective/json-up zod

Quick Start

import { createMigrations, migrate } from "@nanocollective/json-up";
import { z } from "zod";

const migrations = createMigrations()
  .add({
    version: 1,
    schema: z.object({ name: z.string() }),
    up: (data) => ({ name: data.name ?? "Unknown" }),
  })
  .add({
    version: 2,
    schema: z.object({ firstName: z.string(), lastName: z.string() }),
    up: (data) => {
      const [firstName = "", lastName = ""] = data.name.split(" ");
      return { firstName, lastName };
    },
  })
  .build();

const result = migrate({
  state: { _version: 1, name: "Jane Doe" },
  migrations,
});

console.log(result);
// { _version: 2, firstName: "Jane", lastName: "Doe" }

Documentation

For full documentation, see docs/index.md:

Community

We're a small community-led team building local and privacy-first AI solutions under the Nano Collective.

Keywords

json

FAQs

Package last updated on 25 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts