@mui/codemod 6.4.7 → 6.4.9

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.
package/README.md CHANGED
@@ -11,8 +11,6 @@ Some of the codemods also run [postcss](https://github.com/postcss/postcss) plug
11
11
 
12
12
  ## Setup & run
13
13
 
14
- <!-- #default-branch-switch -->
15
-
16
14
  ```bash
17
15
  npx @mui/codemod@latest <codemod> <paths...>
18
16
 
@@ -2595,8 +2593,6 @@ Renames `Autocomplete`'s `closeIcon` prop to `clearIcon`.
2595
2593
  +<Autocomplete clearIcon={defaultClearIcon} />
2596
2594
  ```
2597
2595
 
2598
- <!-- #default-branch-switch -->
2599
-
2600
2596
  ```bash
2601
2597
  npx @mui/codemod@latest v5.0.0/autocomplete-rename-closeicon <path>
2602
2598
  ```
@@ -2614,8 +2610,6 @@ Renames `Autocomplete`'s `getOptionSelected` to `isOptionEqualToValue`.
2614
2610
  />
2615
2611
  ```
2616
2612
 
2617
- <!-- #default-branch-switch -->
2618
-
2619
2613
  ```bash
2620
2614
  npx @mui/codemod@latest v5.0.0/autocomplete-rename-option <path>
2621
2615
  ```
@@ -2633,8 +2627,6 @@ Updates the `Avatar`'s `variant` value and `classes` key from 'circle' to 'circu
2633
2627
  +<Avatar classes={{ circular: 'className' }} />
2634
2628
  ```
2635
2629
 
2636
- <!-- #default-branch-switch -->
2637
-
2638
2630
  ```bash
2639
2631
  npx @mui/codemod@latest v5.0.0/avatar-circle-circular <path>
2640
2632
  ```
@@ -2668,8 +2660,6 @@ Renames the badge's props.
2668
2660
  }}>
2669
2661
  ```
2670
2662
 
2671
- <!-- #default-branch-switch -->
2672
-
2673
2663
  ```bash
2674
2664
  npx @mui/codemod@latest v5.0.0/badge-overlap-value <path>
2675
2665
  ```
@@ -2692,8 +2682,6 @@ This change only affects Base UI components.
2692
2682
  />;
2693
2683
  ```
2694
2684
 
2695
- <!-- #default-branch-switch -->
2696
-
2697
2685
  ```bash
2698
2686
  npx @mui/codemod@latest v5.0.0/base-rename-components-to-slots <path>
2699
2687
  ```
@@ -2711,8 +2699,6 @@ Updates the Box API from separate system props to `sx`.
2711
2699
  +<Box borderRadius="16px">
2712
2700
  ```
2713
2701
 
2714
- <!-- #default-branch-switch -->
2715
-
2716
2702
  ```bash
2717
2703
  npx @mui/codemod@latest v5.0.0/box-borderradius-values <path>
2718
2704
  ```
@@ -2747,8 +2733,6 @@ Renames the Box `grid*Gap` props.
2747
2733
  +<Box rowGap={4}>Item 5</Box>
2748
2734
  ```
2749
2735
 
2750
- <!-- #default-branch-switch -->
2751
-
2752
2736
  ```bash
2753
2737
  npx @mui/codemod@latest v5.0.0/box-rename-gap <path>
2754
2738
  ```
@@ -2764,8 +2748,6 @@ Removes the outdated `color` prop values.
2764
2748
  +<Button>
2765
2749
  ```
2766
2750
 
2767
- <!-- #default-branch-switch -->
2768
-
2769
2751
  ```bash
2770
2752
  npx @mui/codemod@latest v5.0.0/button-color-prop <path>
2771
2753
  ```
@@ -2781,8 +2763,6 @@ Removes the Chip `variant` prop if the value is `"default"`.
2781
2763
  +<Chip>
2782
2764
  ```
2783
2765
 
2784
- <!-- #default-branch-switch -->
2785
-
2786
2766
  ```bash
2787
2767
  npx @mui/codemod@latest v5.0.0/chip-variant-prop <path>
2788
2768
  ```
@@ -2798,8 +2778,6 @@ Renames the CircularProgress `static` variant to `determinate`.
2798
2778
  +<CircularProgress variant="determinate" classes={{ determinate: 'className' }} />
2799
2779
  ```
2800
2780
 
2801
- <!-- #default-branch-switch -->
2802
-
2803
2781
  ```bash
2804
2782
  npx @mui/codemod@latest v5.0.0/circularprogress-variant <path>
2805
2783
  ```
@@ -2817,8 +2795,6 @@ Renames `Collapse`'s `collapsedHeight` prop to `collapsedSize`.
2817
2795
  +<Collapse classes={{ root: 'collapse' }} />
2818
2796
  ```
2819
2797
 
2820
- <!-- #default-branch-switch -->
2821
-
2822
2798
  ```bash
2823
2799
  npx @mui/codemod@latest v5.0.0/collapse-rename-collapsedheight <path>
2824
2800
  ```
@@ -2836,8 +2812,6 @@ A generic codemod to rename any component prop.
2836
2812
  +<Component newProp />
2837
2813
  ```
2838
2814
 
2839
- <!-- #default-branch-switch -->
2840
-
2841
2815
  ```bash
2842
2816
  npx @mui/codemod@latest v5.0.0/component-rename-prop <path> -- --component=Grid --from=prop --to=newProp
2843
2817
  ```
@@ -2948,8 +2922,6 @@ Renames the `fade` style utility import and calls to `alpha()`.
2948
2922
  +const foo = alpha('#aaa');
2949
2923
  ```
2950
2924
 
2951
- <!-- #default-branch-switch -->
2952
-
2953
2925
  ```bash
2954
2926
  npx @mui/codemod@latest v5.0.0/fade-rename-alpha <path>
2955
2927
  ```
@@ -2965,8 +2937,6 @@ Renames `Grid`'s `justify` prop to `justifyContent`.
2965
2937
  +<Grid item justifyContent="left">Item</Grid>
2966
2938
  ```
2967
2939
 
2968
- <!-- #default-branch-switch -->
2969
-
2970
2940
  ```bash
2971
2941
  npx @mui/codemod@latest v5.0.0/grid-justify-justifycontent <path>
2972
2942
  ```
@@ -3249,8 +3219,6 @@ or
3249
3219
  +import { SpeedDial } from '@material-ui/core';
3250
3220
  ```
3251
3221
 
3252
- <!-- #default-branch-switch -->
3253
-
3254
3222
  ```bash
3255
3223
  npx @mui/codemod@latest v5.0.0/moved-lab-modules <path>
3256
3224
  ```
@@ -3293,8 +3261,6 @@ Fix private import paths.
3293
3261
  +import { createTheme } from '@material-ui/core/styles';
3294
3262
  ```
3295
3263
 
3296
- <!-- #default-branch-switch -->
3297
-
3298
3264
  ```bash
3299
3265
  npx @mui/codemod@latest v5.0.0/optimal-imports <path>
3300
3266
  ```
@@ -3422,8 +3388,6 @@ Updates breakpoint values to match new logic. ⚠️ This mod is not idempotent,
3422
3388
  +theme.breakpoints.between('sm', 'lg')
3423
3389
  ```
3424
3390
 
3425
- <!-- #default-branch-switch -->
3426
-
3427
3391
  ```bash
3428
3392
  npx @mui/codemod@latest v5.0.0/theme-breakpoints <path>
3429
3393
  ```
@@ -3496,8 +3460,6 @@ Removes the 'px' suffix from some template strings.
3496
3460
  +`${theme.spacing(2)} ${theme.spacing(4)}`
3497
3461
  ```
3498
3462
 
3499
- <!-- #default-branch-switch -->
3500
-
3501
3463
  ```bash
3502
3464
  npx @mui/codemod@latest v5.0.0/theme-spacing <path>
3503
3465
  ```
@@ -3529,8 +3491,6 @@ Converts all `@mui/material` submodule imports to the root module:
3529
3491
  +import { List, Grid } from '@mui/material';
3530
3492
  ```
3531
3493
 
3532
- <!-- #default-branch-switch -->
3533
-
3534
3494
  ```bash
3535
3495
  npx @mui/codemod@latest v5.0.0/top-level-imports <path>
3536
3496
  ```
@@ -3581,8 +3541,6 @@ Updates Dialog, Menu, Popover, and Snackbar to use the `TransitionProps` prop to
3581
3541
  />
3582
3542
  ```
3583
3543
 
3584
- <!-- #default-branch-switch -->
3585
-
3586
3544
  ```bash
3587
3545
  npx @mui/codemod@latest v5.0.0/use-transitionprops <path>
3588
3546
  ```
@@ -3611,8 +3569,6 @@ The diff should look like this:
3611
3569
  +<FormControl value="Standard" variant="standard" />
3612
3570
  ```
3613
3571
 
3614
- <!-- #default-branch-switch -->
3615
-
3616
3572
  ```bash
3617
3573
  npx @mui/codemod@latest v5.0.0/variant-prop <path>
3618
3574
  ```
@@ -3722,8 +3678,6 @@ The diff should look like this:
3722
3678
  +const spacing = theme.spacing(1);
3723
3679
  ```
3724
3680
 
3725
- <!-- #default-branch-switch -->
3726
-
3727
3681
  ```bash
3728
3682
  npx @mui/codemod@latest v4.0.0/theme-spacing-api <path>
3729
3683
  ```
@@ -3749,8 +3703,6 @@ Converts all `@material-ui/core` imports more than 1 level deep to the optimal f
3749
3703
  +import { withStyles, createTheme } from '@material-ui/core/styles';
3750
3704
  ```
3751
3705
 
3752
- <!-- #default-branch-switch -->
3753
-
3754
3706
  ```bash
3755
3707
  npx @mui/codemod@latest v4.0.0/optimal-imports <path>
3756
3708
  ```
@@ -3767,8 +3719,6 @@ Converts all `@material-ui/core` submodule imports to the root module:
3767
3719
  +import { List, withStyles } from '@material-ui/core';
3768
3720
  ```
3769
3721
 
3770
- <!-- #default-branch-switch -->
3771
-
3772
3722
  ```bash
3773
3723
  npx @mui/codemod@latest v4.0.0/top-level-imports <path>
3774
3724
  ```
@@ -3788,8 +3738,6 @@ The diff should look like this:
3788
3738
  +import MenuItem from '@material-ui/core/MenuItem';
3789
3739
  ```
3790
3740
 
3791
- <!-- #default-branch-switch -->
3792
-
3793
3741
  ```bash
3794
3742
  npx @mui/codemod@latest v1.0.0/import-path <path>
3795
3743
  ```
@@ -3815,16 +3763,12 @@ The diff should look like this:
3815
3763
  +const teal500 = teal['500'];
3816
3764
  ```
3817
3765
 
3818
- <!-- #default-branch-switch -->
3819
-
3820
3766
  ```bash
3821
3767
  npx @mui/codemod@latest v1.0.0/color-imports <path>
3822
3768
  ```
3823
3769
 
3824
3770
  **additional options**
3825
3771
 
3826
- <!-- #default-branch-switch -->
3827
-
3828
3772
  ```bash
3829
3773
  npx @mui/codemod@latest v1.0.0/color-imports <path> -- --importPath='mui/styles/colors' --targetPath='mui/colors'
3830
3774
  ```
@@ -3841,8 +3785,6 @@ The diff should look like this:
3841
3785
  +import ThreeDRotation from '@material-ui/icons/ThreeDRotation';
3842
3786
  ```
3843
3787
 
3844
- <!-- #default-branch-switch -->
3845
-
3846
3788
  ```bash
3847
3789
  npx @mui/codemod@latest v1.0.0/svg-icon-imports <path>
3848
3790
  ```
@@ -3859,8 +3801,6 @@ The diff should look like this:
3859
3801
  +<MenuItem>{"Profile" + "!"}</MenuItem>
3860
3802
  ```
3861
3803
 
3862
- <!-- #default-branch-switch -->
3863
-
3864
3804
  ```bash
3865
3805
  npx @mui/codemod@latest v1.0.0/menu-item-primary-text <path>
3866
3806
  ```
@@ -3883,8 +3823,6 @@ The diff should look like this:
3883
3823
  +import RaisedButton from 'material-ui/RaisedButton';
3884
3824
  ```
3885
3825
 
3886
- <!-- #default-branch-switch -->
3887
-
3888
3826
  ```bash
3889
3827
  npx @mui/codemod@latest v0.15.0/import-path <path>
3890
3828
  ```
@@ -8,6 +8,7 @@ exports.default = deprecationsAll;
8
8
  var _accordionSummaryClasses = _interopRequireDefault(require("../accordion-summary-classes"));
9
9
  var _accordionProps = _interopRequireDefault(require("../accordion-props"));
10
10
  var _alertClasses = _interopRequireDefault(require("../alert-classes"));
11
+ var _alertProps = _interopRequireDefault(require("../alert-props"));
11
12
  var _avatarGroupProps = _interopRequireDefault(require("../avatar-group-props"));
12
13
  var _autocompleteProps = _interopRequireDefault(require("../autocomplete-props"));
13
14
  var _avatarProps = _interopRequireDefault(require("../avatar-props"));
@@ -28,7 +29,9 @@ var _listItemTextProps = _interopRequireDefault(require("../list-item-text-props
28
29
  var _linearProgressClasses = _interopRequireDefault(require("../linear-progress-classes"));
29
30
  var _modalProps = _interopRequireDefault(require("../modal-props"));
30
31
  var _outlinedInputProps = _interopRequireDefault(require("../outlined-input-props"));
32
+ var _paginationItemProps = _interopRequireDefault(require("../pagination-item-props"));
31
33
  var _paginationItemClasses = _interopRequireDefault(require("../pagination-item-classes"));
34
+ var _popperProps = _interopRequireDefault(require("../popper-props"));
32
35
  var _speedDialProps = _interopRequireDefault(require("../speed-dial-props"));
33
36
  var _tableSortLabelClasses = _interopRequireDefault(require("../table-sort-label-classes"));
34
37
  var _selectClasses = _interopRequireDefault(require("../select-classes"));
@@ -42,14 +45,16 @@ var _tooltipProps = _interopRequireDefault(require("../tooltip-props"));
42
45
  var _tablePaginationProps = _interopRequireDefault(require("../table-pagination-props"));
43
46
  var _cardHeaderProps = _interopRequireDefault(require("../card-header-props"));
44
47
  var _popoverProps = _interopRequireDefault(require("../popover-props"));
48
+ var _snackbarProps = _interopRequireDefault(require("../snackbar-props"));
49
+ var _sliderProps = _interopRequireDefault(require("../slider-props"));
45
50
  var _sliderClasses = _interopRequireDefault(require("../slider-classes"));
46
51
  var _mobileStepperProps = _interopRequireDefault(require("../mobile-stepper-props"));
47
- var _snackbarProps = _interopRequireDefault(require("../snackbar-props"));
48
52
  var _tabsProps = _interopRequireDefault(require("../tabs-props"));
49
53
  var _tabsClasses = _interopRequireDefault(require("../tabs-classes"));
50
54
  var _drawerProps = _interopRequireDefault(require("../drawer-props"));
51
55
  var _menuProps = _interopRequireDefault(require("../menu-props"));
52
56
  var _ratingProps = _interopRequireDefault(require("../rating-props"));
57
+ var _typographyProps = _interopRequireDefault(require("../typography-props"));
53
58
  /**
54
59
  * @param {import('jscodeshift').FileInfo} file
55
60
  * @param {import('jscodeshift').API} api
@@ -58,6 +63,7 @@ function deprecationsAll(file, api, options) {
58
63
  file.source = (0, _accordionSummaryClasses.default)(file, api, options);
59
64
  file.source = (0, _accordionProps.default)(file, api, options);
60
65
  file.source = (0, _alertClasses.default)(file, api, options);
66
+ file.source = (0, _alertProps.default)(file, api, options);
61
67
  file.source = (0, _avatarGroupProps.default)(file, api, options);
62
68
  file.source = (0, _autocompleteProps.default)(file, api, options);
63
69
  file.source = (0, _avatarProps.default)(file, api, options);
@@ -79,6 +85,8 @@ function deprecationsAll(file, api, options) {
79
85
  file.source = (0, _modalProps.default)(file, api, options);
80
86
  file.source = (0, _outlinedInputProps.default)(file, api, options);
81
87
  file.source = (0, _paginationItemClasses.default)(file, api, options);
88
+ file.source = (0, _paginationItemProps.default)(file, api, options);
89
+ file.source = (0, _popperProps.default)(file, api, options);
82
90
  file.source = (0, _speedDialProps.default)(file, api, options);
83
91
  file.source = (0, _stepConnectorClasses.default)(file, api, options);
84
92
  file.source = (0, _stepContentProps.default)(file, api, options);
@@ -92,6 +100,8 @@ function deprecationsAll(file, api, options) {
92
100
  file.source = (0, _tablePaginationProps.default)(file, api, options);
93
101
  file.source = (0, _cardHeaderProps.default)(file, api, options);
94
102
  file.source = (0, _popoverProps.default)(file, api, options);
103
+ file.source = (0, _snackbarProps.default)(file, api, options);
104
+ file.source = (0, _sliderProps.default)(file, api, options);
95
105
  file.source = (0, _sliderClasses.default)(file, api, options);
96
106
  file.source = (0, _mobileStepperProps.default)(file, api, options);
97
107
  file.source = (0, _snackbarProps.default)(file, api, options);
@@ -100,5 +110,6 @@ function deprecationsAll(file, api, options) {
100
110
  file.source = (0, _drawerProps.default)(file, api, options);
101
111
  file.source = (0, _menuProps.default)(file, api, options);
102
112
  file.source = (0, _ratingProps.default)(file, api, options);
113
+ file.source = (0, _typographyProps.default)(file, api, options);
103
114
  return file.source;
104
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/codemod",
3
- "version": "6.4.7",
3
+ "version": "6.4.9",
4
4
  "bin": "./codemod.js",
5
5
  "private": false,
6
6
  "author": "MUI Team",