Skip to content

refactor: type deploy command input args #7194

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

Conversation

ndhoule
Copy link
Contributor

@ndhoule ndhoule commented Apr 10, 2025

This change adds basic TypeScript types to the deploy command's input arguments (i.e. the command-line flags that a user passes to the netlify deploy command).

I also lifted some input argument validation out of the deploy command's business logic into the createDeployCommand function as a minor optimization so we don't pull in the full deploy dependency tree when we know we can't service a user's request.

@ndhoule ndhoule requested a review from a team as a code owner April 10, 2025 22:44
Copy link

github-actions bot commented Apr 10, 2025

📊 Benchmark results

Comparing with ae637a7

  • Dependency count: 1,156 (no change)
  • Package size: 281 MB (no change)
  • Number of ts-expect-error directives: 400 ⬇️ 0.50% decrease vs. ae637a7

Copy link
Collaborator

@serhalp serhalp left a comment

Choose a reason for hiding this comment

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

Woo, thanks for establishing a pattern for this!

ndhoule added 2 commits April 16, 2025 14:04
This prevents us from loading the `deploy` command's full dependency
tree when we know we can't service the user's request.
@ndhoule ndhoule force-pushed the nathanhoule/cpla-2545-change-ntl-deploy-to-build-by-default--refactor-types branch from 9dc32fe to 24376c5 Compare April 16, 2025 21:04
@ndhoule ndhoule merged commit defbb03 into main Apr 16, 2025
52 checks passed
@ndhoule ndhoule deleted the nathanhoule/cpla-2545-change-ntl-deploy-to-build-by-default--refactor-types branch April 16, 2025 21:30
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