Skip to content

fix: version check can cause failures#478

Merged
roncohen merged 2 commits intomainfrom
fix-version-check-crash
Sep 22, 2025
Merged

fix: version check can cause failures#478
roncohen merged 2 commits intomainfrom
fix-version-check-crash

Conversation

@roncohen
Copy link
Contributor

@roncohen roncohen commented Sep 17, 2025

If the version check is blocked for some reason, the process can fail. Apparently promise rejections can happen without await calls.

@roncohen roncohen requested review from Copilot and pavkam September 17, 2025 12:15
@roncohen roncohen enabled auto-merge September 17, 2025 12:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Fixes error handling for version check functionality to prevent process failures when the version check is blocked or fails. The change replaces the try-catch error handling approach with promise rejection handling using .catch().

  • Modified getLatestVersionFromNpm to throw an error immediately (temporarily for testing)
  • Updated checkLatest to handle promise rejections gracefully with .catch()
  • Removed try-catch block around version check in main CLI function

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/cli/utils/version.ts Commented out npm fetch logic and added error handling via .catch()
packages/cli/index.ts Removed try-catch wrapper around version check promise

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@roncohen roncohen disabled auto-merge September 17, 2025 12:45
@roncohen roncohen requested a review from Copilot September 18, 2025 09:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@roncohen roncohen enabled auto-merge September 18, 2025 10:03
@roncohen roncohen requested a review from Swiftwork September 18, 2025 13:34
@roncohen roncohen added this pull request to the merge queue Sep 22, 2025
Merged via the queue into main with commit c4030e2 Sep 22, 2025
6 checks passed
@roncohen roncohen deleted the fix-version-check-crash branch September 22, 2025 15:56
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