You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: polaris-migrator/README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,12 @@ Codemod transformations to help upgrade your Polaris codebase.
10
10
npx @shopify/polaris-migrator <transform><path>
11
11
```
12
12
13
-
-`transform` - name of transform, see available transforms below.
14
-
-`path` - files or directory to transform
13
+
-`transform` - name of migration, see available migrations on the docs site below.
14
+
-`path` - files or directory to perform migration
15
15
-`--dry` Do a dry-run, no code will be edited
16
16
-`--print` Prints the changed output for comparison
17
+
-`--force` Ignores the safety check for a clean git status
17
18
18
19
## Documentation
19
20
20
-
Visit [polaris.shopify.com/docs/advanced-features/migrations](https://polaris.shopify.com/docs/advanced-features/migrations) to view available migrations.
21
+
Visit [polaris.shopify.com/docs/advanced-features/migrations](https://polaris.shopify.com/docs/migrations) to view available migrations.
description: Polaris provides Codemod migrations to help upgrade your codebase when a feature is deprecated.
4
+
keywords:
5
+
- codemod
6
+
- migration
7
+
- migrator
8
+
- upgrade
9
+
- updated
10
+
- version
11
+
- components
12
+
- transform
13
+
---
14
+
15
+
Polaris provides Codemod migrations to help upgrade your codebase.
16
+
17
+
Codemods are transformations that run on your codebase programmatically. This allows for a large amount of changes to be applied without having to manually go through every file.
-`migration` - name of migration, see available migrations below.
24
+
-`path` - files or directory to perform migration (supports globs)
25
+
-`--dry` Do a dry-run, no code will be edited
26
+
-`--print` Prints the changed output for comparison
27
+
-`--force` Ignores the safety check for a clean git status
28
+
29
+
## Polaris v10
30
+
31
+
### `replace-text-component`
32
+
33
+
Replaces legacy text components `DisplayText`, `Heading`, `Subheading`, `Caption`, `TextStyle`, `VisuallyHidden` with the new `Text` component. This migration will include the proper styling props to match the replaced component.
'At Shopify, we empower commerce at a global scale. We build products, tools, and services for people to start, manage, and scale their businesses. We manage enormous complexity for commerce giants, and give new entrepreneurs the best chance to succeed.',
"Design patterns provide repeatable UX solutions to common merchant situations.",
207
+
'Design patterns provide repeatable UX solutions to common merchant situations.',
208
208
},
209
209
{
210
-
title: "Loading",
211
-
url: "/foundations/patterns/loading",
212
-
icon: "ClockMajor",
210
+
title: 'Loading',
211
+
url: '/foundations/patterns/loading',
212
+
icon: 'ClockMajor',
213
213
description:
214
214
"Navigating the Shopify admin should be fast, meaningful, and focused, but unintentional loading can get in the way and break a merchant's flow. To deliver a continuous experience, we need to consider loading states when planning and prototyping.",
0 commit comments