repack icon indicating copy to clipboard operation
repack copied to clipboard

feat: support experimental RN debugger interaction

Open artus9033 opened this issue 1 year ago • 8 comments

Summary

This PR introduces support for the TUI 'j' interaction and implementations of this interaction for Webpack & Rspack. It also refactors code in setupInteractions.ts to properly warn about possible (currently none) unsupported interactions in the underlying bundler wrapper implementation, as well as replaces a series of if-else expressions with a switch and replacing object arrow functions with object literal methods shorthand syntax.

Demo

Live interaction: demo-repack-exp-debugger

Initial help message:

With experimental debugger capability Without experimental debugger capability
Screenshot 2024-09-26 at 18 17 03 Screenshot 2024-09-26 at 18 23 26

Test plan

  • [x] Run without --experimental-debugger & pressing 'j' should result in warning: DevTools require the '--experimental-debugger' flag to be passed to the bundler process
  • [x] Run with --experimental-debugger & pressing 'j' should result in the DevTools being opened, both for Webpack & Rspack

artus9033 avatar Sep 26 '24 12:09 artus9033

🦋 Changeset detected

Latest commit: 0aaed0b9a2d9dd9d9fa7fd4795e346fb0a9efeec

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@callstack/repack Minor
@callstack/repack-dev-server Minor
@callstack/repack-init Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Sep 26 '24 12:09 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
repack-website ⬜️ Ignored (Inspect) Visit Preview Oct 28, 2024 5:25pm

vercel[bot] avatar Sep 26 '24 12:09 vercel[bot]

demo pls!

thymikee avatar Sep 26 '24 13:09 thymikee

demo pls!

I've just updated the root comment to include a demo GIF.

artus9033 avatar Sep 26 '24 14:09 artus9033

Do we have a way to display the shortcuts that you can press?

thymikee avatar Sep 26 '24 14:09 thymikee

For sure we can, I will have this implemented as well.

artus9033 avatar Sep 26 '24 14:09 artus9033

Let's make it dead simple, like logging the options once. No need to do anything fancier for now

thymikee avatar Sep 26 '24 15:09 thymikee

Done in b93c3f7, also added screenshots ✅

artus9033 avatar Sep 26 '24 16:09 artus9033

this is how final output looks like now:

image

jbroma avatar Oct 28 '24 17:10 jbroma