fix(init): show actionable error when npx init can't load interactive UI#938
Draft
MathurAditya724 wants to merge 2 commits intomainfrom
Draft
fix(init): show actionable error when npx init can't load interactive UI#938MathurAditya724 wants to merge 2 commits intomainfrom
MathurAditya724 wants to merge 2 commits intomainfrom
Conversation
Contributor
|
Contributor
Codecov Results 📊✅ 6837 passed | Total: 6837 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
All tests are passing successfully. ❌ Patch coverage is 50.00%. Project has 13917 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 77.03% 77.04% +0.01%
==========================================
Files 317 317 —
Lines 60609 60608 -1
Branches 0 0 —
==========================================
+ Hits 46684 46691 +7
- Misses 13925 13917 -8
- Partials 0 0 —Generated by Codecov Action |
a035217 to
e247010
Compare
Ship the pre-bundled ink-app.js sidecar in the npm package so
`npx sentry@latest init` gets the full interactive Ink UI on Node,
not just LoggingUI.
The text-import-plugin now emits a path string (not an external
require) for the `with { type: "file" }` import in CJS bundles.
`createInkUI` resolves it via import.meta.url and loads the
self-contained ESM sidecar via dynamic import(). The factory no
longer gates on isBunRuntime() — Ink works on both runtimes.
Fixes #937
e247010 to
a46cca8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When running
npx sentry@latest init, the interactive wizard can't load because Ink requires the Bun binary. The old error — "The interactive UI failed to load" — was confusing and didn't explain what to do.Now the error distinguishes between runtimes: on Node (npx), it tells users to install the native binary via
curl -fsSL https://cli.sentry.dev/install | bashor use--yesfor non-interactive mode. On Bun (where this shouldn't normally happen), it shows the simpler--yeshint.Testing
bun test test/lib/init/wizard-runner.test.ts— 28 tests pass (2 new).Fixes #937