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 Oauth, Polling, and Projects to TS #1306

Merged
merged 16 commits into from
Dec 18, 2024
Merged

Convert Oauth, Polling, and Projects to TS #1306

merged 16 commits into from
Dec 18, 2024

Conversation

camden11
Copy link
Contributor

@camden11 camden11 commented Dec 16, 2024

Description and Context

This converts the following lib files to TS

  • oauth
  • polling
  • projects

It also restructures the projects lib files, since lib/projects was over 1200 lines long. All projects related lib files have been moved into the /projects dir. lib/projects.ts has been split into two files - all functionality related to builds and deploys has been moved to lib/projects/buildAndDeploy.ts. The remaining functionality is not in lib/projects/index.ts

Need to merge and release this LDL PR before type checks will pass
HubSpot/hubspot-local-dev-lib#221

Who to Notify

@brandenrodgers @joe-yeager @kemmerle

@camden11 camden11 marked this pull request as ready for review December 16, 2024 21:07
@camden11 camden11 marked this pull request as draft December 16, 2024 21:18
@camden11 camden11 marked this pull request as ready for review December 16, 2024 22:08
@@ -0,0 +1,51 @@
import { Build, SubbuildStatus } from '@hubspot/local-dev-lib/types/Build';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, but in LDL we capitalize the filenames for everything in the types/ folder

@brandenrodgers
Copy link
Contributor

Up to you, but if you wanted you could probably cut projects/index.ts down by another ~100 lines by creating a projects/upload.ts file that includes uploadProjectFiles and handleProjectUpload

console.log(error);
uploadResult = { uploadError: error };
} else if (callbackFunc) {
console.log('callbackfunc');
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like a console log snuck in

@camden11
Copy link
Contributor Author

I changed the casing of types/Prompts and it looks like prettier took the liberty of updating the styling of every file with that import. If it's easier to review I can try to undo those changes, but you can also just ignore every prompt file that isn't project related

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 locally and everything still seems to work well! 👌

@camden11 camden11 merged commit b20ec8b into next Dec 18, 2024
1 check passed
@camden11 camden11 deleted the cp/convert-ts-lib-3 branch December 18, 2024 20:36
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