diff --git a/CHANGELOG.md b/CHANGELOG.md index 960fd41fcdcae6..1d9e653ef74204 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1369,7 +1369,7 @@ A big thanks to the 18 contributors who made this release possible. Here are som A codemod is provided to help with the migration: ```bash - npx @mui/codemod v5.0.0/base-use-named-exports + npx @mui/codemod@latest v5.0.0/base-use-named-exports ``` #### Changes @@ -2251,7 +2251,7 @@ A big thanks to the 18 contributors who made this release possible. Here are som There is codemod that you can run in your project to do the transformation: ```bash - npx @mui/codemod v5.0.0/base-remove-component-prop + npx @mui/codemod@latest v5.0.0/base-remove-component-prop ``` The full documentation about the codemod can be found [here](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#base-remove-component-prop). @@ -2350,7 +2350,7 @@ A big thanks to the 12 contributors who made this release possible. Here are som You can use this [codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/src/v5.0.0/base-remove-unstyled-suffix.js) to help with the migration: ```bash - npx @mui/codemod v5.0.0/base-remove-unstyled-suffix + npx @mui/codemod@latest v5.0.0/base-remove-unstyled-suffix ``` #### Changes diff --git a/docs/data/joy/components/text-field/text-field.md b/docs/data/joy/components/text-field/text-field.md index 88b18384352dc6..d2adcae1ab4a5f 100644 --- a/docs/data/joy/components/text-field/text-field.md +++ b/docs/data/joy/components/text-field/text-field.md @@ -21,7 +21,7 @@ To learn more why it has been removed, visit the [RFC](https://github.com/mui/ma Run this [codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#joy-text-field-to-input) in your project's terminal: ```bash -npx @mui/codemod v5.0.0/joy-text-field-to-input +npx @mui/codemod@latest v5.0.0/joy-text-field-to-input ``` It will go through all files under `` and replace `` with the `` composition. diff --git a/docs/data/material/migration/migration-v4/migrating-from-jss.md b/docs/data/material/migration/migration-v4/migrating-from-jss.md index 9ed857bf113fe0..921eaaff70ab90 100644 --- a/docs/data/material/migration/migration-v4/migrating-from-jss.md +++ b/docs/data/material/migration/migration-v4/migrating-from-jss.md @@ -39,7 +39,7 @@ If you want to refine them later, you can refer to the examples shown in the sec ::: ```bash -npx @mui/codemod v5.0.0/jss-to-styled +npx @mui/codemod@latest v5.0.0/jss-to-styled ``` Example transformation: @@ -216,7 +216,7 @@ yarn add tss-react We provide [a codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#jss-to-tss-react) to help migrate JSS styles to the `tss-react` API. ```bash -npx @mui/codemod v5.0.0/jss-to-tss-react +npx @mui/codemod@latest v5.0.0/jss-to-tss-react ``` Example transformation: diff --git a/docs/data/material/migration/migration-v4/migration-v4.md b/docs/data/material/migration/migration-v4/migration-v4.md index b5a34eeee31209..e04775e1f20589 100644 --- a/docs/data/material/migration/migration-v4/migration-v4.md +++ b/docs/data/material/migration/migration-v4/migration-v4.md @@ -299,7 +299,7 @@ Make sure that your application still runs without errors after running each cod This codemod contains most of the transformers that are necessary for migration. It should be only applied **once per folder.** ```bash -npx @mui/codemod v5.0.0/preset-safe +npx @mui/codemod@latest v5.0.0/preset-safe ``` :::info @@ -331,7 +331,7 @@ createMuiTheme({ If you want to keep `variant="standard"` in your components, run this codemod or else configure the corresponding default theme props. ```bash -npx @mui/codemod v5.0.0/variant-prop +npx @mui/codemod@latest v5.0.0/variant-prop ``` For more details, check out the [variant-prop codemod README](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#variant-prop). @@ -361,7 +361,7 @@ createMuiTheme({ If you want to keep `underline="hover"`, run this codemod or else configure the corresponding default theme props. ```bash -npx @mui/codemod v5.0.0/link-underline-hover +npx @mui/codemod@latest v5.0.0/link-underline-hover ``` For more details, check out the [link-underline-hover codemod README](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#link-underline-hover). diff --git a/docs/data/material/migration/migration-v4/troubleshooting.md b/docs/data/material/migration/migration-v4/troubleshooting.md index b8b46052733f4c..072f8515197b84 100644 --- a/docs/data/material/migration/migration-v4/troubleshooting.md +++ b/docs/data/material/migration/migration-v4/troubleshooting.md @@ -204,7 +204,7 @@ For more details, see [this GitHub issue](https://github.com/mui/material-ui/iss We recommend using this codemod to fix all imports in your project: ```bash -npx @mui/codemod v5.0.0/optimal-imports +npx @mui/codemod@latest v5.0.0/optimal-imports ``` You can fix it manually like this: diff --git a/docs/pages/blog/lab-date-pickers-to-mui-x.md b/docs/pages/blog/lab-date-pickers-to-mui-x.md index 3eb9c73a93a00b..ed76ce6dcd54f3 100644 --- a/docs/pages/blog/lab-date-pickers-to-mui-x.md +++ b/docs/pages/blog/lab-date-pickers-to-mui-x.md @@ -84,7 +84,7 @@ Follow the [migration steps](/x/migration/migration-pickers-lab/) by updating th We have prepared a codemod to help you migrate your codebase from `@mui/lab` to `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`: ```bash -npx @mui/codemod v5.0.0/date-pickers-moved-to-x +npx @mui/codemod@latest v5.0.0/date-pickers-moved-to-x ``` ## Where is the Date and Time Picker documentation? diff --git a/docs/pages/blog/lab-tree-view-to-mui-x.md b/docs/pages/blog/lab-tree-view-to-mui-x.md index 20fb856215f140..bcc416bc133f42 100644 --- a/docs/pages/blog/lab-tree-view-to-mui-x.md +++ b/docs/pages/blog/lab-tree-view-to-mui-x.md @@ -71,7 +71,7 @@ or We have prepared a codemod to help you migrate your codebase from `@mui/lab` to `@mui/x-tree-view`: ```bash -npx @mui/codemod v5.0.0/tree-view-moved-to-x +npx @mui/codemod@latest v5.0.0/tree-view-moved-to-x ``` ## Where is the Tree View documentation? diff --git a/packages/mui-codemod/README.md b/packages/mui-codemod/README.md index b9f00044d96993..8399a52c2ee36b 100644 --- a/packages/mui-codemod/README.md +++ b/packages/mui-codemod/README.md @@ -13,7 +13,7 @@ This repository contains a collection of codemod scripts based for use with ```bash -npx @mui/codemod +npx @mui/codemod@latest Applies a `@mui/codemod` to the specified paths @@ -33,10 +33,10 @@ Options: --jscodeshift [string] [default: false] Examples: - npx @mui/codemod v4.0.0/theme-spacing-api src - npx @mui/codemod v5.0.0/component-rename-prop src -- + npx @mui/codemod@latest v4.0.0/theme-spacing-api src + npx @mui/codemod@latest v5.0.0/component-rename-prop src -- --component=Grid --from=prop --to=newProp - npx @mui/codemod v5.0.0/preset-safe src --parser=flow + npx @mui/codemod@latest v5.0.0/preset-safe src --parser=flow ``` ### jscodeshift options @@ -44,7 +44,7 @@ Examples: To pass more options directly to jscodeshift, use `--jscodeshift="..."`. For example: ```bash -npx @mui/codemod --jscodeshift="--run-in-band --verbose=2" +npx @mui/codemod@latest --jscodeshift="--run-in-band --verbose=2" ``` See all available options [here](https://github.com/facebook/jscodeshift#usage-cli). @@ -55,7 +55,7 @@ Options to [recast](https://github.com/benjamn/recast)'s printer can be provided through jscodeshift's `printOptions` command line argument ```bash -npx @mui/codemod --jscodeshift="--printOptions='{\"quote\":\"double\"}'" +npx @mui/codemod@latest --jscodeshift="--printOptions='{\"quote\":\"double\"}'" ``` ## Included scripts @@ -78,7 +78,7 @@ This codemod updates the import and re-export statements. ``` ```bash -npx @mui/codemod v5.0.0/base-use-named-exports +npx @mui/codemod@latest v5.0.0/base-use-named-exports ``` ### `base-remove-unstyled-suffix` @@ -91,7 +91,7 @@ The `Unstyled` suffix has been removed from all Base UI component names, includi ``` ```bash -npx @mui/codemod v5.0.0/base-remove-unstyled-suffix +npx @mui/codemod@latest v5.0.0/base-remove-unstyled-suffix ``` #### `base-remove-component-prop` @@ -106,7 +106,7 @@ This change only affects Base UI components. ``` ```bash -npx @mui/codemod v5.0.0/base-remove-component-prop +npx @mui/codemod@latest v5.0.0/base-remove-component-prop ``` #### `rename-css-variables` @@ -121,7 +121,7 @@ Updates the names of the CSS variables of the Joy UI components to adapt to the ``` ```bash -npx @mui/codemod v5.0.0/rename-css-variables +npx @mui/codemod@latest v5.0.0/rename-css-variables ``` #### `base-hook-imports` @@ -134,7 +134,7 @@ Updates the sources of the imports of the Base UI hooks to adapt to the new dire ``` ```bash -npx @mui/codemod v5.0.0/base-hook-imports +npx @mui/codemod@latest v5.0.0/base-hook-imports ``` #### `joy-rename-classname-prefix` @@ -149,7 +149,7 @@ Renames the classname prefix from `'Joy'` to `'Mui'` for Joy UI components. ``` ```bash -npx @mui/codemod v5.0.0/joy-rename-classname-prefix +npx @mui/codemod@latest v5.0.0/joy-rename-classname-prefix ``` #### `joy-rename-row-prop` @@ -164,7 +164,7 @@ Transforms `row` prop to `orientation` prop across `Card`, `List` and `RadioGrou ``` ```bash -npx @mui/codemod v5.0.0/joy-rename-row-prop +npx @mui/codemod@latest v5.0.0/joy-rename-row-prop ``` #### `joy-avatar-remove-imgProps` @@ -182,7 +182,7 @@ This change only affects Joy UI Avatar component. ``` ```bash -npx @mui/codemod v5.0.0/joy-avatar-remove-imgProps +npx @mui/codemod@latest v5.0.0/joy-avatar-remove-imgProps ``` #### `joy-text-field-to-input` @@ -240,7 +240,7 @@ This change only affects Joy UI components. ``` ```bash -npx @mui/codemod v5.0.0/joy-text-field-to-input +npx @mui/codemod@latest v5.0.0/joy-text-field-to-input ``` #### `joy-rename-components-to-slots` @@ -259,7 +259,7 @@ This change only affects Joy UI components. ``` ```bash -npx @mui/codemod v5.0.0/joy-rename-components-to-slots +npx @mui/codemod@latest v5.0.0/joy-rename-components-to-slots ``` The associated breaking change was done in [#34997](https://github.com/mui/material-ui/pull/34997). @@ -269,7 +269,7 @@ The associated breaking change was done in [#34997](https://github.com/mui/mater Rename the imports of Date and Time Pickers from `@mui/lab` to `@mui/x-date-pickers` and `@mui/x-date-pickers-pro`. ```bash -npx @mui/codemod v5.0.0/date-pickers-moved-to-x +npx @mui/codemod@latest v5.0.0/date-pickers-moved-to-x ``` #### `tree-view-moved-to-x` @@ -277,7 +277,7 @@ npx @mui/codemod v5.0.0/date-pickers-moved-to-x Rename the imports of Tree View from `@mui/lab` to `@mui/x-tree-view`. ```bash -npx @mui/codemod v5.0.0/tree-view-moved-to-x +npx @mui/codemod@latest v5.0.0/tree-view-moved-to-x ``` #### 🚀 `preset-safe` @@ -285,7 +285,7 @@ npx @mui/codemod v5.0.0/tree-view-moved-to-x A combination of all important transformers for migrating v4 to v5. ⚠️ This codemod should be run only once. ```bash -npx @mui/codemod v5.0.0/preset-safe +npx @mui/codemod@latest v5.0.0/preset-safe ``` The list includes these transformers @@ -352,7 +352,7 @@ Imports and inserts `adaptV4Theme` into `createTheme` (or `createMuiTheme`) ``` ```bash -npx @mui/codemod v5.0.0/adapter-v4 +npx @mui/codemod@latest v5.0.0/adapter-v4 ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme). @@ -369,7 +369,7 @@ Renames `Autocomplete`'s `closeIcon` prop to `clearIcon`. ```bash -npx @mui/codemod v5.0.0/autocomplete-rename-closeicon +npx @mui/codemod@latest v5.0.0/autocomplete-rename-closeicon ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#autocomplete). @@ -388,7 +388,7 @@ Renames `Autocomplete`'s `getOptionSelected` to `isOptionEqualToValue`. ```bash -npx @mui/codemod v5.0.0/autocomplete-rename-option +npx @mui/codemod@latest v5.0.0/autocomplete-rename-option ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#autocomplete). @@ -407,7 +407,7 @@ Updates the `Avatar`'s `variant` value and `classes` key from 'circle' to 'circu ```bash -npx @mui/codemod v5.0.0/avatar-circle-circular +npx @mui/codemod@latest v5.0.0/avatar-circle-circular ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#avatar). @@ -442,7 +442,7 @@ Renames the badge's props. ```bash -npx @mui/codemod v5.0.0/badge-overlap-value +npx @mui/codemod@latest v5.0.0/badge-overlap-value ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#badge). @@ -466,7 +466,7 @@ This change only affects Base UI components. ```bash -npx @mui/codemod v5.0.0/base-rename-components-to-slots +npx @mui/codemod@latest v5.0.0/base-rename-components-to-slots ``` The associated breaking change was done in [#34693](https://github.com/mui/material-ui/pull/34693). @@ -485,7 +485,7 @@ Updates the Box API from separate system props to `sx`. ```bash -npx @mui/codemod v5.0.0/box-borderradius-values +npx @mui/codemod@latest v5.0.0/box-borderradius-values ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#box). @@ -500,7 +500,7 @@ Renames the Box `css` prop to `sx` ``` ```bash -npx @mui/codemod v5.0.0/box-rename-css +npx @mui/codemod@latest v5.0.0/box-rename-css ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#box). @@ -521,7 +521,7 @@ Renames the Box `grid*Gap` props. ```bash -npx @mui/codemod v5.0.0/box-rename-gap +npx @mui/codemod@latest v5.0.0/box-rename-gap ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#box). @@ -538,7 +538,7 @@ Removes the outdated `color` prop values. ```bash -npx @mui/codemod v5.0.0/button-color-prop +npx @mui/codemod@latest v5.0.0/button-color-prop ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#button). @@ -555,7 +555,7 @@ Removes the Chip `variant` prop if the value is `"default"`. ```bash -npx @mui/codemod v5.0.0/chip-variant-prop +npx @mui/codemod@latest v5.0.0/chip-variant-prop ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#chip). @@ -572,7 +572,7 @@ Renames the CircularProgress `static` variant to `determinate`. ```bash -npx @mui/codemod v5.0.0/circularprogress-variant +npx @mui/codemod@latest v5.0.0/circularprogress-variant ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#circularprogress). @@ -591,7 +591,7 @@ Renames `Collapse`'s `collapsedHeight` prop to `collapsedSize`. ```bash -npx @mui/codemod v5.0.0/collapse-rename-collapsedheight +npx @mui/codemod@latest v5.0.0/collapse-rename-collapsedheight ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#collapse). @@ -610,7 +610,7 @@ A generic codemod to rename any component prop. ```bash -npx @mui/codemod v5.0.0/component-rename-prop -- --component=Grid --from=prop --to=newProp +npx @mui/codemod@latest v5.0.0/component-rename-prop -- --component=Grid --from=prop --to=newProp ``` #### `core-styles-import` @@ -623,7 +623,7 @@ Renames private import from `core/styles/*` to `core/styles` ``` ```bash -npx @mui/codemod v5.0.0/core-styles-import +npx @mui/codemod@latest v5.0.0/core-styles-import ``` #### `create-theme` @@ -636,7 +636,7 @@ Renames the function `createMuiTheme` to `createTheme` ``` ```bash -npx @mui/codemod v5.0.0/create-theme +npx @mui/codemod@latest v5.0.0/create-theme ``` #### `dialog-props` @@ -649,7 +649,7 @@ Remove `disableBackdropClick` prop from `` ``` ```bash -npx @mui/codemod v5.0.0/dialog-props +npx @mui/codemod@latest v5.0.0/dialog-props ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#dialog). @@ -664,7 +664,7 @@ Remove `disableTypography` prop from `` ``` ```bash -npx @mui/codemod v5.0.0/dialog-title-props +npx @mui/codemod@latest v5.0.0/dialog-title-props ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#dialog). @@ -681,7 +681,7 @@ Adds `prepend: true` to Emotion `createCache` ``` ```bash -npx @mui/codemod v5.0.0/create-theme +npx @mui/codemod@latest v5.0.0/create-theme ``` #### `expansion-panel-component` @@ -689,7 +689,7 @@ npx @mui/codemod v5.0.0/create-theme Renames `ExpansionPanel*` to `Accordion*` ```bash -npx @mui/codemod v5.0.0/expansion-panel-component +npx @mui/codemod@latest v5.0.0/expansion-panel-component ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#expansionpanel). @@ -702,7 +702,7 @@ You can find more details about this breaking change in [the migration guide](ht ``` ```bash -npx @mui/codemod v5.0.0/fab-variant +npx @mui/codemod@latest v5.0.0/fab-variant ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#fab). @@ -722,7 +722,7 @@ Renames the `fade` style utility import and calls to `alpha`. ```bash -npx @mui/codemod v5.0.0/fade-rename-alpha +npx @mui/codemod@latest v5.0.0/fade-rename-alpha ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#styles). @@ -739,7 +739,7 @@ Renames `Grid`'s `justify` prop to `justifyContent`. ```bash -npx @mui/codemod v5.0.0/grid-justify-justifycontent +npx @mui/codemod@latest v5.0.0/grid-justify-justifycontent ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#grid). @@ -749,7 +749,7 @@ You can find more details about this breaking change in [the migration guide](ht Renames `GridList*` to `ImageList*` ```bash -npx @mui/codemod v5.0.0/grid-list-component +npx @mui/codemod@latest v5.0.0/grid-list-component ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#gridlist). @@ -766,7 +766,7 @@ Adds `size="large"` if `size` is not defined to get the same appearance as v4. ``` ```bash -npx @mui/codemod v5.0.0/icon-button-size +npx @mui/codemod@latest v5.0.0/icon-button-size ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#iconbutton). @@ -831,7 +831,7 @@ Replace JSS styling with `makeStyles` or `withStyles` to `styled` API. ``` ```bash -npx @mui/codemod v5.0.0/jss-to-styled +npx @mui/codemod@latest v5.0.0/jss-to-styled ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#1-use-styled-or-sx-api). @@ -903,7 +903,7 @@ Migrate JSS styling with `makeStyles` or `withStyles` to the corresponding `tss- ``` ```bash -npx @mui/codemod v5.0.0/jss-to-tss-react +npx @mui/codemod@latest v5.0.0/jss-to-tss-react ``` The following scenarios are not currently handled by this codemod and will be marked with a @@ -931,7 +931,7 @@ Apply `underline="hover"` to `` that does not define `underline` prop (t ``` ```bash -npx @mui/codemod v5.0.0/link-underline-hover +npx @mui/codemod@latest v5.0.0/link-underline-hover ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#link). @@ -969,7 +969,7 @@ Moves JSS imports to `@material-ui/styles` ``` ```bash -npx @mui/codemod v5.0.0/material-ui-styles +npx @mui/codemod@latest v5.0.0/material-ui-styles ``` #### `material-ui-types` @@ -982,7 +982,7 @@ Renames `Omit` import from `@material-ui/types` to `DistributiveOmit` ``` ```bash -npx @mui/codemod v5.0.0/material-ui-types +npx @mui/codemod@latest v5.0.0/material-ui-types ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#material-ui-types). @@ -999,7 +999,7 @@ Removes `disableBackdropClick` and `onEscapeKeyDown` from `` ``` ```bash -npx @mui/codemod v5.0.0/modal-props +npx @mui/codemod@latest v5.0.0/modal-props ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#modal). @@ -1023,7 +1023,7 @@ or ```bash -npx @mui/codemod v5.0.0/moved-lab-modules +npx @mui/codemod@latest v5.0.0/moved-lab-modules ``` You can find more details about this breaking change in the migration guide. @@ -1048,7 +1048,7 @@ Renames `Pagination*`'s `shape` values from 'round' to 'circular'. ``` ```bash -npx @mui/codemod v5.0.0/pagination-round-circular +npx @mui/codemod@latest v5.0.0/pagination-round-circular ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#pagination). @@ -1067,7 +1067,7 @@ Fix private import paths. ```bash -npx @mui/codemod v5.0.0/optimal-imports +npx @mui/codemod@latest v5.0.0/optimal-imports ``` #### `root-ref` @@ -1075,7 +1075,7 @@ npx @mui/codemod v5.0.0/optimal-imports Removes `RootRef` from the codebase. ```bash -npx @mui/codemod v5.0.0/root-ref +npx @mui/codemod@latest v5.0.0/root-ref ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#rootref). @@ -1090,7 +1090,7 @@ You can find more details about this breaking change in [the migration guide](ht ``` ```bash -npx @mui/codemod v5.0.0/skeleton-variant +npx @mui/codemod@latest v5.0.0/skeleton-variant ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#skeleton). @@ -1100,7 +1100,7 @@ You can find more details about this breaking change in [the migration guide](ht Applies `StyledEngineProvider` to the files that contains `ThemeProvider`. ```bash -npx @mui/codemod v5.0.0/styled-engine-provider +npx @mui/codemod@latest v5.0.0/styled-engine-provider ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-style-changes/#style-library). @@ -1126,7 +1126,7 @@ Renames props in `Table*` components. ``` ```bash -npx @mui/codemod v5.0.0/table-props +npx @mui/codemod@latest v5.0.0/table-props ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#table). @@ -1145,7 +1145,7 @@ Renames the `Tabs`'s `scrollButtons` prop values. ``` ```bash -npx @mui/codemod v5.0.0/tabs-scroll-buttons +npx @mui/codemod@latest v5.0.0/tabs-scroll-buttons ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#tabs). @@ -1164,7 +1164,7 @@ Renames `TextField`'s rows props. ``` ```bash -npx @mui/codemod v5.0.0/textarea-minmax-rows +npx @mui/codemod@latest v5.0.0/textarea-minmax-rows ``` You can find more details about this breaking change in the migration guide. @@ -1177,7 +1177,7 @@ You can find more details about this breaking change in the migration guide. Adds `DefaultTheme` module augmentation to typescript projects. ```bash -npx @mui/codemod v5.0.0/theme-augment +npx @mui/codemod@latest v5.0.0/theme-augment ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#material-ui-styles). @@ -1196,7 +1196,7 @@ Updates breakpoint values to match new logic. ⚠️ This mod is not idempotent, ```bash -npx @mui/codemod v5.0.0/theme-breakpoints +npx @mui/codemod@latest v5.0.0/theme-breakpoints ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme). @@ -1206,7 +1206,7 @@ You can find more details about this breaking change in [the migration guide](ht Renames `theme.breakpoints.width('md')` to `theme.breakpoints.values.md`. ```bash -npx @mui/codemod v5.0.0/theme-breakpoints-width +npx @mui/codemod@latest v5.0.0/theme-breakpoints-width ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme). @@ -1219,7 +1219,7 @@ You can find more details about this breaking change in [the migration guide](ht ``` ```bash -npx @mui/codemod v5.0.0/theme-options +npx @mui/codemod@latest v5.0.0/theme-options ``` #### `theme-palette-mode` @@ -1241,7 +1241,7 @@ Renames `type` to `mode`. ``` ```bash -npx @mui/codemod v5.0.0/theme-palette-mode +npx @mui/codemod@latest v5.0.0/theme-palette-mode ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme). @@ -1251,7 +1251,7 @@ You can find more details about this breaking change in [the migration guide](ht Renames `MuiThemeProvider` to `ThemeProvider`. ```bash -npx @mui/codemod v5.0.0/theme-provider +npx @mui/codemod@latest v5.0.0/theme-provider ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#material-ui-core-styles). @@ -1270,7 +1270,7 @@ Removes the 'px' suffix from some template strings. ```bash -npx @mui/codemod v5.0.0/theme-spacing +npx @mui/codemod@latest v5.0.0/theme-spacing ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme). @@ -1285,7 +1285,7 @@ Renames `theme.typography.round($number)` to `Math.round($number * 1e5) / 1e5`. ``` ```bash -npx @mui/codemod v5.0.0/theme-typography-round +npx @mui/codemod@latest v5.0.0/theme-typography-round ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme). @@ -1303,7 +1303,7 @@ Converts all `@mui/material` submodule imports to the root module: ```bash -npx @mui/codemod v5.0.0/top-level-imports +npx @mui/codemod@latest v5.0.0/top-level-imports ``` Head to https://mui.com/guides/minimizing-bundle-size/ to understand when it's useful. @@ -1313,7 +1313,7 @@ Head to https://mui.com/guides/minimizing-bundle-size/ to understand when it's u Renames import `transitions` to `createTransitions` ```bash -npx @mui/codemod v5.0.0/transitions +npx @mui/codemod@latest v5.0.0/transitions ``` #### `use-autocomplete` @@ -1326,7 +1326,7 @@ Renames `useAutocomplete` related import from lab to core ``` ```bash -npx @mui/codemod v5.0.0/use-autocomplete +npx @mui/codemod@latest v5.0.0/use-autocomplete ``` #### `use-transitionprops` @@ -1355,7 +1355,7 @@ Updates Dialog, Menu, Popover, and Snackbar to use the `TransitionProps` prop to ```bash -npx @mui/codemod v5.0.0/use-transitionprops +npx @mui/codemod@latest v5.0.0/use-transitionprops ``` You can find more details about this breaking change in [the migration guide](/material-ui/migration/v5-component-changes/#dialog). @@ -1385,7 +1385,7 @@ The diff should look like this: ```bash -npx @mui/codemod v5.0.0/variant-prop +npx @mui/codemod@latest v5.0.0/variant-prop ``` #### `with-mobile-dialog` @@ -1399,7 +1399,7 @@ Removes imported `withMobileDialog`, and inserts hardcoded version to prevent ap ``` ```bash -npx @mui/codemod v5.0.0/with-mobile-dialog +npx @mui/codemod@latest v5.0.0/with-mobile-dialog ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#dialog). @@ -1415,7 +1415,7 @@ Removes `withWidth` import, and inserts hardcoded version to prevent application ``` ```bash -npx @mui/codemod v5.0.0/with-width +npx @mui/codemod@latest v5.0.0/with-width ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-style-changes/#material-ui-core-styles). @@ -1476,7 +1476,7 @@ Replace every occurrence of `material-ui` related package with the new package n ``` ```bash -npx @mui/codemod v5.0.0/mui-replace +npx @mui/codemod@latest v5.0.0/mui-replace ``` You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/migration-v4/#update-material-ui-version). @@ -1496,7 +1496,7 @@ The diff should look like this: ```bash -npx @mui/codemod v4.0.0/theme-spacing-api +npx @mui/codemod@latest v4.0.0/theme-spacing-api ``` This codemod tries to perform a basic expression simplification which can be improved for expressions that use more than one operation. @@ -1523,7 +1523,7 @@ Converts all `@material-ui/core` imports more than 1 level deep to the optimal f ```bash -npx @mui/codemod v4.0.0/optimal-imports +npx @mui/codemod@latest v4.0.0/optimal-imports ``` Head to https://mui.com/guides/minimizing-bundle-size/ to understand when it's useful. @@ -1541,7 +1541,7 @@ Converts all `@material-ui/core` submodule imports to the root module: ```bash -npx @mui/codemod v4.0.0/top-level-imports +npx @mui/codemod@latest v4.0.0/top-level-imports ``` Head to https://mui.com/guides/minimizing-bundle-size/ to understand when it's useful. @@ -1562,7 +1562,7 @@ The diff should look like this: ```bash -npx @mui/codemod v1.0.0/import-path +npx @mui/codemod@latest v1.0.0/import-path ``` **Notice**: if you are migrating from pre-v1.0, and your imports use `material-ui`, you will need to manually find and replace all references to `material-ui` in your code to `@material-ui/core`. E.g.: @@ -1589,7 +1589,7 @@ The diff should look like this: ```bash -npx @mui/codemod v1.0.0/color-imports +npx @mui/codemod@latest v1.0.0/color-imports ``` **additional options** @@ -1597,7 +1597,7 @@ npx @mui/codemod v1.0.0/color-imports ```bash -npx @mui/codemod v1.0.0/color-imports -- --importPath='mui/styles/colors' --targetPath='mui/colors' +npx @mui/codemod@latest v1.0.0/color-imports -- --importPath='mui/styles/colors' --targetPath='mui/colors' ``` #### `svg-icon-imports` @@ -1615,7 +1615,7 @@ The diff should look like this: ```bash -npx @mui/codemod v1.0.0/svg-icon-imports +npx @mui/codemod@latest v1.0.0/svg-icon-imports ``` #### `menu-item-primary-text` @@ -1633,7 +1633,7 @@ The diff should look like this: ```bash -npx @mui/codemod v1.0.0/menu-item-primary-text +npx @mui/codemod@latest v1.0.0/menu-item-primary-text ``` ### v0.15.0 @@ -1657,5 +1657,5 @@ The diff should look like this: ```bash -npx @mui/codemod v0.15.0/import-path +npx @mui/codemod@latest v0.15.0/import-path ``` diff --git a/packages/mui-joy/src/TextField/TextField.tsx b/packages/mui-joy/src/TextField/TextField.tsx index 2485248fe52813..4c92db31385358 100644 --- a/packages/mui-joy/src/TextField/TextField.tsx +++ b/packages/mui-joy/src/TextField/TextField.tsx @@ -7,7 +7,7 @@ export default (function DeletedTextField() { [ 'MUI: `TextField` component has been removed in favor of Input composition.', '', - 'To migrate, run `npx @mui/codemod v5.0.0/joy-text-field-to-input `.', + 'To migrate, run `npx @mui/codemod@latest v5.0.0/joy-text-field-to-input `.', 'For the codemod detail, visit https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#joy-text-field-to-input\n\nTo learn more why it has been removed, visit the RFC https://github.com/mui/material-ui/issues/34176', ].join('\n'), );