chore: Clean up src/utilities exports#9783
Conversation
| }); | ||
| }; | ||
|
|
||
| export const isOSMac = navigator.userAgent.includes('Mac'); |
There was a problem hiding this comment.
Moved this to src/utilities/userAgent.ts
| @@ -1,4 +1,7 @@ | |||
| export default (input: string[], separator: string = ','): string => { | |||
There was a problem hiding this comment.
This is the case against default exports and why named exports provide better DX. We are exporting an unnamed function which makes our intelliesense unable to auto import it
There was a problem hiding this comment.
I moved some utilities out of their own folder in cases where the folder is unnecessary
In my opinion, this is bad 👎🏼
packages/manager/src/utilities/isPropValid
├── index.ts
└── isPropValid.tsand this is good 👍🏼
packages/manager/src/utilities/pricing
├── backups.test.tsx
├── backups.ts
├── constants.ts
├── dynamicPricing.test.ts
├── dynamicPricing.ts
├── dynamicVolumePrice.test.ts
├── dynamicVolumePrice.ts
├── kubernetes.test.tsx
├── kubernetes.ts
├── linodes.test.ts
└── linodes.ts
jdamore-linode
left a comment
There was a problem hiding this comment.
Thanks @bnussman-akamai! Confirmed that the E2E tests look good (you can disregard the CI failures; DBaaS failures should be fixed in develop, and the config failure should be fixed by #9798). Spent some time messing around in Cloud Manager and didn't notice any UI differences or other changes in behavior.
Description 📝
How to test 🧪
Verification steps
As an Author I have considered 🤔
Check all that apply