
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@nanocollective/json-up
Advanced tools
A fast, type-safe JSON migration tool with Zod schema validation — built by the Nano Collective, a community collective building AI tooling not for profit, but for the community. Everything we build is open, transparent, and driven by the people who use it.
npm install @nanocollective/json-up zod
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" }
When your migrations need to perform async operations, use the async API:
import { createAsyncMigrations, migrateAsync } from "@nanocollective/json-up";
import { z } from "zod";
const migrations = createAsyncMigrations()
.add({
version: 1,
schema: z.object({ name: z.string() }),
up: (data) => ({ name: data.name ?? "" }),
})
.add({
version: 2,
schema: z.object({ name: z.string(), key: z.string() }),
up: async (data) => ({
name: data.name,
key: await generateKey(),
}),
})
.build();
const result = await migrateAsync({ state, migrations });
For full documentation, see docs/index.md:
The Nano Collective is a community collective building AI tooling for the community, not for profit. We'd love your help.
FAQs
A TypeScript JSON migration tool with Zod schema validation
The npm package @nanocollective/json-up receives a total of 186 weekly downloads. As such, @nanocollective/json-up popularity was classified as not popular.
We found that @nanocollective/json-up demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.