Skip to content

fix: Refactor the wizard version lookup to handle gracefully - #816

Merged
BYK merged 5 commits into
masterfrom
philprime/fixed-telemetry-version-lookup
Feb 24, 2025
Merged

BYK merged 5 commits into
masterfrom
philprime/fixed-telemetry-version-lookup

Conversation

@philprime

@philprime philprime commented Feb 24, 2025 •

Copy link
Copy Markdown
Member

The lookup of the package.json of the @sentry/wizard can throw when used during development outside of the repository. This is especially relevant developing the apple wizard, which is most likely in a project directory unrelated to the wizard.

The current implementation will crash the wizard, rendering it unusable. Ideally we are hard-baking the version on yarn build, but until then the dynamic lookup must not throw an error if the package.json is not found.

It is better to have telemetry without a node version, instead of crashing the wizard.

@codecov

codecov Bot commented Feb 24, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 49.61%. Comparing base (c62ec74) to head (3a0c6b8).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/telemetry.ts 0.00% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #816      +/-   ##
==========================================
- Coverage   49.67%   49.61%   -0.06%     
==========================================
  Files          52       52              
  Lines        3503     3507       +4     
  Branches      825      823       -2     
==========================================
  Hits         1740     1740              
- Misses       1628     1631       +3     
- Partials      135      136       +1     
Flag Coverage Δ
e2e-tests 84.61% <ø> (ø)
unit-tests 48.26% <0.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@philprime philprime changed the title fix: refactored the wizard lookup to not crash fix: Refactor the wizard version lookup to handle gracefully Feb 24, 2025
@philprime
philprime marked this pull request as ready for review February 24, 2025 15:26
@philprime
philprime requested review from BYK and Lms24 and removed request for Lms24 February 24, 2025 15:26

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

Comment thread src/telemetry.ts Outdated
Comment thread src/telemetry.ts Outdated
Co-authored-by: Burak Yigit Kaya <byk@sentry.io>
@BYK
BYK enabled auto-merge (squash) February 24, 2025 21:02
@BYK
BYK merged commit 2cb35de into master Feb 24, 2025
@BYK
BYK deleted the philprime/fixed-telemetry-version-lookup branch February 24, 2025 21:02
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.

3 participants