Skip to content

Commit 121dfc5

Browse files
committed
docs: add yellow-sdk-codemod reference to compat SDK pages
Add callout boxes linking to the codemod tool on the compat overview and migration overview pages so developers migrating from v0.5.3 can discover and use the automated migration tooling.
1 parent a1fb886 commit 121dfc5

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

docs/build/sdk/typescript-compat/migration-overview.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ This guide explains how to migrate your Nitrolite dApp from the v0.5.3 SDK to th
1212

1313
A direct migration from v0.5.3 to v1.0.0 touches **20+ files** per app with deep, scattered rewrites. The compat layer reduces this to **~5 file changes** per app.
1414

15+
:::tip Automate with Codemod
16+
Before migrating manually, try the [yellow-sdk-codemod](https://github.com/layer-3/yellow-sdk-codemod). It rewrites imports, renames auth fields, migrates client constructors, updates `package.json`, and flags RPC patterns with `// TODO [codemod]` comments for the remaining manual steps.
17+
:::
18+
1519
## Installation
1620

1721
```bash

docs/build/sdk/typescript-compat/overview.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,24 @@ const nextConfig = {
228228
};
229229
```
230230

231+
## Automated Migration with Codemod
232+
233+
If you are migrating an existing codebase from `@erc7824/nitrolite` (v0.4–v0.5.3) or `@layer-3/nitrolite`, the [yellow-sdk-codemod](https://github.com/layer-3/yellow-sdk-codemod) tool can automate much of the upgrade for you.
234+
235+
:::tip Codemod available
236+
Run the codemod to handle import rewrites, client constructor migration, auth field renames, and package.json updates automatically. Patterns that require manual judgment (RPC call collapse, WebSocket removal) are flagged with `// TODO [codemod]` comments pointing to the exact replacement.
237+
238+
```bash
239+
# Scan your codebase for old patterns (no changes made)
240+
npx tsx src/cli.ts scan --path ./src
241+
242+
# Apply all transforms + update dependencies
243+
npx tsx src/cli.ts run --path ./src --update-deps
244+
```
245+
246+
See the [codemod README](https://github.com/layer-3/yellow-sdk-codemod#readme) for the full list of transforms and options.
247+
:::
248+
231249
## Migration Guides
232250

233251
- [Migration Overview](./migration-overview) — Pattern changes, import swaps

0 commit comments

Comments
 (0)