@carbon/upgrade 11.1.0-rc.0 → 11.3.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +29 -2
  2. package/cli.js +1785 -1027
  3. package/package.json +6 -4
package/README.md CHANGED
@@ -25,7 +25,7 @@ You can install `@carbon/upgrade` in your project, or use a tool like
25
25
  by running the following command in your project:
26
26
 
27
27
  ```bash
28
- npx @carbon/upgrade -d
28
+ npx @carbon/upgrade
29
29
  ```
30
30
 
31
31
  Below is a full output of the options and commands available:
@@ -33,19 +33,46 @@ Below is a full output of the options and commands available:
33
33
  ```bash
34
34
  Usage: @carbon/upgrade [options]
35
35
 
36
+ Commands:
37
+ @carbon/upgrade upgrade upgrade your project [default]
38
+ @carbon/upgrade migrate <migration> run a Carbon migration on your
39
+ [paths...] source files
40
+ @carbon/upgrade migrate list list all available migrations
41
+
36
42
  Options:
37
43
  --help Show help [boolean]
38
44
  --version Show version number [boolean]
39
45
  --force force execution if the cli encounters an error while doing
40
46
  safety checks [boolean] [default: false]
41
47
  -w, --write update the files with changes found by running the migration
42
- [default: false]
48
+ [boolean] [default: false]
43
49
  -v, --verbose optionally include additional logs, useful for debugging
44
50
  [boolean] [default: false]
45
51
  ```
46
52
 
53
+ ### Migrations
54
+
55
+ Included within the CLI are a number of migrations available to you to be ran on
56
+ your project's source files.
57
+
58
+ Migrations are automated scripts (codemods) ran using the
59
+ [jscodeshift](https://github.com/facebook/jscodeshift) runner, that will apply
60
+ intelligent transformations to your code.
61
+
62
+ These migrations range from simple automations like a find and replace of import
63
+ statements, to more sophisticated migrations that rewrite component prop usage,
64
+ configuration, and set up. The source of these migrations can be viewed within
65
+ the
66
+ [transforms folder](https://github.com/carbon-design-system/carbon/tree/main/packages/upgrade/transforms).
67
+ Each is tested against a series of test fixtures to ensure transforms are
68
+ predictable and consistently provide the intended output.
69
+
47
70
  ## 🙌 Contributing
48
71
 
72
+ If you have ideas on how we could make your migration experience easier, please
73
+ reach out by
74
+ [opening a new discussion](https://github.com/carbon-design-system/carbon/discussions/new).
75
+
49
76
  We're always looking for contributors to help us fix bugs, build new features,
50
77
  or help us improve the project documentation. If you're interested, definitely
51
78
  check out our [Contributing Guide](/.github/CONTRIBUTING.md)! 👀