Skip to content

Codemod breaks z.brand #1501

Description

@simon04
import { z } from "zod/v4";

export const StationNumberSchema = z.string().brand("StationNumber");

The result is

import * as v from "valibot";

export const StationNumberSchema = v.string()("StationNumber");

The expected result is

import * as v from "valibot";

const StationNumberSchema = v.pipe(v.string(), v.brand("StationNumber"));
> pnpx @valibot/zod-to-valibot --version
jscodeshift: 17.3.0
 - babel: 7.29.7
 - babylon: 7.29.7
 - flow: 0.318.0
 - recast: 0.23.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions