Skip to content

Commit 3cb9fde

Browse files
committed
Update codemod commands and dependencies to use @valibot scope
1 parent df7152a commit 3cb9fde

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

codemod/zod-to-valibot/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ Official codemod for automatically converting Zod schemas to Valibot schemas.
55
## Usage
66

77
```bash
8-
npx zod-to-valibot src/**/*
8+
npx @valibot/zod-to-valibot src/**/*
99
```
1010

1111
## Options
1212

1313
```bash
1414
# Dry run (preview changes)
15-
npx zod-to-valibot --dry src/**/*
15+
npx @valibot/zod-to-valibot --dry src/**/*
1616

1717
# Verbose output
18-
npx zod-to-valibot --verbose=2 src/**/*
18+
npx @valibot/zod-to-valibot --verbose=2 src/**/*
1919

2020
# Use a different parser (default is --parser=ts)
21-
npx zod-to-valibot --parser=babel src/**/*
21+
npx @valibot/zod-to-valibot --parser=babel src/**/*
2222

2323
# Use different extensions (default is --extensions=ts,tsx,js,jsx)
24-
npx zod-to-valibot --extensions=ts src/**/*
24+
npx @valibot/zod-to-valibot --extensions=ts src/**/*
2525
```
2626

2727
For all available options, see [jscodeshift documentation](https://github.com/facebook/jscodeshift#options).

codemod/zod-to-valibot/cli.mjs

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ if (!hasExtensionsArg) {
2626

2727
if (args.length === 0) {
2828
console.log(`
29-
Usage: zod-to-valibot [options] <files>
29+
Usage: @valibot/zod-to-valibot [options] <files>
3030
3131
Convert Zod schemas to Valibot schemas
3232
3333
Examples:
34-
zod-to-valibot src/**/*.ts
35-
zod-to-valibot --dry src/schemas.ts
36-
zod-to-valibot --no-babel src/**/*.{ts,tsx}
34+
@valibot/zod-to-valibot src/**/*.ts
35+
@valibot/zod-to-valibot --dry src/schemas.ts
36+
@valibot/zod-to-valibot --no-babel src/**/*.{ts,tsx}
3737
3838
Common jscodeshift options:
3939
--dry Run without making changes

pnpm-lock.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"vite-tsconfig-paths": "^5.1.4"
6161
},
6262
"dependencies": {
63+
"@valibot/zod-to-valibot": "workspace:*",
6364
"@vercel/og": "0.7.2",
6465
"@vercel/speed-insights": "^1.2.0",
6566
"clsx": "^2.1.1",
@@ -71,8 +72,7 @@
7172
"onigasm": "^2.2.5",
7273
"satori-html": "^0.3.2",
7374
"sucrase": "^3.35.1",
74-
"valibot": "workspace:*",
75-
"zod-to-valibot": "workspace:*"
75+
"valibot": "workspace:*"
7676
},
7777
"engines": {
7878
"node": ">=20.0.0"

website/src/routes/guides/(migration)/migrate-from-zod/CodemodEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import {
55
useSignal,
66
useVisibleTask$,
77
} from '@builder.io/qwik';
8+
import transform from '@valibot/zod-to-valibot';
89
import jscodeshift from 'jscodeshift';
910
import * as monaco from 'monaco-editor';
10-
import transform from 'zod-to-valibot';
1111
import { CodeEditor, IconButton } from '~/components';
1212
import { useResetSignal } from '~/hooks';
1313
import { CheckIcon, CopyIcon, PlayIcon } from '~/icons';

0 commit comments

Comments
 (0)