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

Convert localDev and LocalDevManager to TS #1339

Merged
merged 19 commits into from
Jan 17, 2025
Merged

Convert localDev and LocalDevManager to TS #1339

merged 19 commits into from
Jan 17, 2025

Conversation

camden11
Copy link
Contributor

@camden11 camden11 commented Jan 14, 2025

Description and Context

This converts the last remaining files in lib, localDev and localDevManager to TS

TODO

Still need to run through the local dev flows and make sure this doesn't break anything It works!

Who to Notify

@brandenrodgers @kemmerle @joe-yeager

@camden11 camden11 marked this pull request as ready for review January 16, 2025 16:22
export async function confirmDefaultAccountIsTarget(
accountConfig: CLIAccount
): Promise<void> {
if (!accountConfig.name || !accountConfig.accountType) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a little wary of adding new logs in a TS port since it could subtly change the functionality. Would it be possible to break the code additions out into a standalone PR to merge and test before this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any new logs added here are more or less impossible to actually reach. I added them to satisfy TS (throwing errors makes typing a lot easier than having to detail with returning undefined). I guess theoretically this would trigger if you went in and manually removed these fields from the config but I have to imagine this would be better than whatever the behavior was previously. If you still think its worth separating out I can do that though

@@ -205,11 +249,11 @@ class LocalDevManager {
getProjectDetailUrl(
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why getProjectDetailUrl returns if the projectName doesn't exist. The projectName field is required

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that was left over from before it was typed. Once we're sure everywhere in the CLI is passing in a string, we can probably remove that check

Copy link
Contributor

@brandenrodgers brandenrodgers left a comment

Choose a reason for hiding this comment

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

tested and lgtm 👍

@camden11 camden11 merged commit 565ad32 into main Jan 17, 2025
1 check passed
@camden11 camden11 deleted the cp/convert-ts-lib-8 branch January 17, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants