Skip to content
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

[MPDX-8444] Upgrade yup #1198

Merged
merged 8 commits into from
Nov 18, 2024
Merged

[MPDX-8444] Upgrade yup #1198

merged 8 commits into from
Nov 18, 2024

Conversation

canac
Copy link
Contributor

@canac canac commented Nov 15, 2024

Description

Upgrade yup to version 1.4

Here are the main changes I needed to make:

  • Replace yup.SchemaOf with yup.ObjectSchema
  • Replace yup.array().of(subschema) with yup.array().of(subschema.required()) (TypeScript was inferring the type of each individual array element as Type | undefined
  • Update .when() to pass in an { is, then, otherwise } object and to make then and otherwise functions that modify the schema instead of being an actual schema

MPDX-8444

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels. (Add the label "On Staging" to get the branch automatically merged into staging.)
  • I have requested a review from another person on the project

@canac canac added the Preview Environment Add this label to create an Amplify Preview label Nov 15, 2024
@canac canac requested a review from dr-bizz November 15, 2024 21:11
@canac canac self-assigned this Nov 15, 2024
Copy link
Contributor

Preview branch generated at https://8444-upgrade-yup.d3dytjb8adxkk5.amplifyapp.com

Copy link
Contributor

github-actions bot commented Nov 15, 2024

Bundle sizes [mpdx-react]

Compared against 9d1180c

Route Size (gzipped) Diff
/accountLists/[accountListId]/contacts/flows/setup 175.48 KB -1.88 KB
/accountLists/[accountListId]/reports/financialAccounts/[financialAccountId]/entries 294.99 KB -1.02 KB
/accountLists/[accountListId]/settings/admin 134.89 KB -1.59 KB
/accountLists/[accountListId]/settings/integrations 161.98 KB -1.35 KB
/accountLists/[accountListId]/settings/manageAccounts 142.58 KB -1.54 KB
/accountLists/[accountListId]/settings/manageCoaches 139.05 KB -1.57 KB
/accountLists/[accountListId]/settings/notifications 136.7 KB -1.61 KB
/accountLists/[accountListId]/settings/organizations 136.61 KB -1.61 KB
/accountLists/[accountListId]/settings/preferences 211.86 KB -1.33 KB
/accountLists/[accountListId]/tools/appeals 190.59 KB -1.1 KB
/accountLists/[accountListId]/tools/appeals/appeal/[[...appealId]] 218.17 KB -1.02 KB
/accountLists/[accountListId]/tools/fix/commitmentInfo/[[...contactId]] 252.43 KB -1.23 KB
/accountLists/[accountListId]/tools/fix/emailAddresses/[[...contactId]] 165.93 KB -1.15 KB
/accountLists/[accountListId]/tools/fix/phoneNumbers/[[...contactId]] 147.19 KB -1.15 KB
/accountLists/[accountListId]/tools/import/google 159.49 KB -1.12 KB
/accountLists/[accountListId]/tools/import/tnt 153.7 KB -1.18 KB
/setup/connect 128.52 KB -1.63 KB
Dynamic import Size (gzipped) Diff
../src/components/Contacts/ContactDetails/ContactDetailsTab/Mailing/AddAddressModal/DynamicAddAddressModal.tsx -> ./AddAddressModal 74.63 KB -1.08 KB
../src/components/Contacts/ContactDetails/ContactDetailsTab/Mailing/EditContactAddressModal/DynamicEditContactAddressModal.tsx -> ./EditContactAddressModal 74.74 KB -1.08 KB
../src/components/Contacts/ContactsRightPanel/DynamicContactsRightPanel.tsx -> ./ContactsRightPanel 134.98 KB -1.15 KB
../src/components/Contacts/MassActions/AddTags/DynamicMassActionsAddTagsModal.tsx -> ./MassActionsAddTagsModal 38.52 KB -1.21 KB
../src/components/Contacts/MassActions/AddToAppeal/DynamicMassActionsAddToAppealModal.tsx -> ./MassActionsAddToAppealModal 37.68 KB -1.86 KB
../src/components/Contacts/MassActions/AddToAppeal/DynamicMassActionsCreateAppealModal.tsx -> ./MassActionsCreateAppealModal 26.22 KB -1.53 KB
../src/components/Contacts/MassActions/EditFields/DynamicMassActionsEditFieldsModal.tsx -> ./MassActionsEditFieldsModal 82.04 KB -1.22 KB
../src/components/Contacts/MassActions/Exports/MailMergedLabelModal/DynamicMailMergedLabelModal.tsx -> ./MailMergedLabelModal 27.72 KB -1.65 KB
../src/components/Contacts/MassActions/RemoveTags/DynamicMassActionsRemoveTagsModal.tsx -> ./MassActionsRemoveTagsModal 27.02 KB -1.21 KB
../src/components/Layouts/Primary/TopBar/Items/AddMenu/Items/AddDonation/DynamicAddDonation.tsx -> ./AddDonation 84.75 KB -1.01 KB
../src/components/Layouts/Primary/TopBar/Items/AddMenu/Items/CreateContact/DynamicCreateContact.tsx -> ./CreateContact 27.53 KB -1.22 KB
../src/components/Layouts/Primary/TopBar/Items/AddMenu/Items/CreateMultipleContacts/DynamicCreateMultipleContacts.tsx -> ./CreateMultipleContacts 78.11 KB -1.53 KB
../src/components/Task/MassActions/AddTags/DynamicMassActionsTasksAddTagsModal.tsx -> ./MassActionsTasksAddTagsModal 38.73 KB -1.87 KB
../src/components/Task/MassActions/EditTasks/DynamicMassActionsEditTasksModal.tsx -> ./MassActionsEditTasksModal 96.31 KB -1.23 KB
../src/components/Task/MassActions/RemoveTags/DynamicMassActionsTasksRemoveTagsModal.tsx -> ./MassActionsTasksRemoveTagsModal 27.42 KB -1.65 KB
../src/components/Task/Modal/Comments/DynamicTaskModalCommentsList.tsx -> ./TaskModalCommentsList 73 KB -1.48 KB
../src/components/Task/Modal/Form/Complete/DynamicTaskModalCompleteForm.tsx -> ./TaskModalCompleteForm 108.52 KB -1.23 KB
../src/components/Task/Modal/Form/DynamicTaskModalForm.tsx -> ./TaskModalForm 116.63 KB -1.24 KB
../src/components/Task/Modal/Form/LogForm/DynamicTaskModalLogForm.tsx -> ./TaskModalLogForm 147.28 KB -1.24 KB
../src/components/Tool/Appeal/Modals/AddAppealModal/DynamicAddAppealModal.tsx -> ./AddAppealModal 41.59 KB -1.21 KB
../src/components/Tool/Appeal/Modals/AddContactToAppealModal/DynamicAddContactToAppealModal.tsx -> ./AddContactToAppealModal 38.53 KB -1.07 KB
../src/components/Tool/Appeal/Modals/EditAppealHeaderInfoModal/DynamicEditAppealHeaderInfoModal.tsx -> ./EditAppealHeaderInfoModal 26.99 KB -1.06 KB
../src/components/Tool/Appeal/Modals/PledgeModal/DynamicPledgeModal.tsx -> ./PledgeModal 73.61 KB -1.06 KB

Copy link
Contributor

@dr-bizz dr-bizz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the code and tested the UI. It looks great!

Base automatically changed from 8443-upgrade-typescript to main November 18, 2024 15:44
@canac canac merged commit a1efd19 into main Nov 18, 2024
18 checks passed
@canac canac deleted the 8444-upgrade-yup branch November 18, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Preview Environment Add this label to create an Amplify Preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants