-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[Autocomplete] deprecate *Component and *Props for v6
#41875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 14 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
d22419d
deprecate *Component and *Props with codemod
lhilgert9 3014b3a
Update packages/mui-material/src/Autocomplete/Autocomplete.d.ts
lhilgert9 35491c1
Merge branch 'next' into deprecate-autocomple-props
lhilgert9 9f03cea
use same props as in component props
lhilgert9 ee9d557
Fix paper slots and slotProps types
lhilgert9 7b9e3b6
fix proptypes
lhilgert9 83d8ab3
Merge remote-tracking branch 'upstream' into deprecate-autocomplete-p…
lhilgert9 8bc86ad
run docs:api
lhilgert9 834d1e1
fix slots props to be optional
lhilgert9 44f5c0b
change demos to use slots and slotProps
lhilgert9 32ce9b4
Merge remote-tracking branch 'upstream' into deprecate-autocomple-props
lhilgert9 dfdbf4d
pnpm docs:typescript:formatted
lhilgert9 fe2401d
fix proptypes
lhilgert9 7cea30a
fix slotProps types to accept functions
lhilgert9 c5ffabe
add explanation for deprecated api's
lhilgert9 e2dcb00
Merge remote-tracking branch 'upstream/next' into deprecate-autocompl…
lhilgert9 be30a71
fix missing ","
lhilgert9 1a8ebb9
migrate Autocomplete tests to not use deprecated apis
lhilgert9 8ffaab6
Revert "migrate Autocomplete tests to not use deprecated apis"
DiegoAndai 0f8665c
Update migrating guide link messages
DiegoAndai e7a5e56
Update codemod install version
DiegoAndai 4960559
Update tests
DiegoAndai 96d8b77
pnpm docs:api
lhilgert9 d859029
trigger ci
DiegoAndai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
packages/mui-codemod/src/deprecations/autocomplete-props/autocomplete-props.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import movePropIntoSlots from '../utils/movePropIntoSlots'; | ||
| import movePropIntoSlotProps from '../utils/movePropIntoSlotProps'; | ||
|
|
||
| /** | ||
| * @param {import('jscodeshift').FileInfo} file | ||
| * @param {import('jscodeshift').API} api | ||
| */ | ||
| export default function transformer(file, api, options) { | ||
| const j = api.jscodeshift; | ||
| const root = j(file.source); | ||
| const printOptions = options.printOptions; | ||
|
|
||
| movePropIntoSlots(j, { | ||
| root, | ||
| componentName: 'Autocomplete', | ||
| propName: 'PaperComponent', | ||
| slotName: 'paper', | ||
| }); | ||
|
|
||
| movePropIntoSlots(j, { | ||
| root, | ||
| componentName: 'Autocomplete', | ||
| propName: 'PopperComponent', | ||
| slotName: 'popper', | ||
| }); | ||
|
|
||
| movePropIntoSlots(j, { | ||
| root, | ||
| componentName: 'Autocomplete', | ||
| propName: 'ListboxComponent', | ||
| slotName: 'listbox', | ||
| }); | ||
|
|
||
| movePropIntoSlotProps(j, { | ||
| root, | ||
| componentName: 'Autocomplete', | ||
| propName: 'ListboxProps', | ||
| slotName: 'listbox', | ||
| }); | ||
|
|
||
| movePropIntoSlotProps(j, { | ||
| root, | ||
| componentName: 'Autocomplete', | ||
| propName: 'ChipProps', | ||
| slotName: 'chip', | ||
| }); | ||
|
|
||
| return root.toSource(printOptions); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.