|
1
|
--- |
|
2
|
sidebar_label: "codemod" |
|
3
|
sidebar_position: 10 |
|
4
|
--- |
|
5
|
|
|
6
|
import { Table } from "docs-ui" |
|
7
|
|
|
8
|
export const metadata = { |
|
9
|
title: `codemod Command - Medusa CLI Reference`, |
|
10
|
} |
|
11
|
|
|
12
|
# {metadata.title} |
|
13
|
|
|
14
|
<Note> |
|
15
|
|
|
16
|
The `codemod` command is available from [Medusa v2.13.0](https://github.com/medusajs/medusa/releases/tag/v2.13.0). |
|
17
|
|
|
18
|
</Note> |
|
19
|
|
|
20
|
Run a codemod to update your Medusa project to the latest version. |
|
21
|
|
|
22
|
Learn more about codemods and available transformations in the [Codemods](!docs!/learn/codemods) guide. |
|
23
|
|
|
24
|
```bash npx2yarn |
|
25
|
npx medusa codemod <transformation> |
|
26
|
``` |
|
27
|
|
|
28
|
## Arguments |
|
29
|
|
|
30
|
<Table> |
|
31
|
<Table.Header> |
|
32
|
<Table.Row> |
|
33
|
<Table.HeaderCell> |
|
34
|
Argument |
|
35
|
</Table.HeaderCell> |
|
36
|
<Table.HeaderCell> |
|
37
|
Description |
|
38
|
</Table.HeaderCell> |
|
39
|
</Table.Row> |
|
40
|
</Table.Header> |
|
41
|
<Table.Body> |
|
42
|
<Table.Row> |
|
43
|
<Table.Cell> |
|
44
|
|
|
45
|
`<transformation>` |
|
46
|
|
|
47
|
</Table.Cell> |
|
48
|
<Table.Cell> |
|
49
|
|
|
50
|
The name of the codemod transformation to run. For example, `replace-zod-imports`. |
|
51
|
|
|
52
|
</Table.Cell> |
|
53
|
</Table.Row> |
|
54
|
</Table.Body> |
|
55
|
</Table> |