feat: support experimental RN debugger interaction
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:
Initial help message:
| With experimental debugger capability | Without experimental debugger capability |
|---|---|
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
🦋 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
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 |
demo pls!
demo pls!
I've just updated the root comment to include a demo GIF.
Do we have a way to display the shortcuts that you can press?
For sure we can, I will have this implemented as well.
Let's make it dead simple, like logging the options once. No need to do anything fancier for now
Done in b93c3f7, also added screenshots ✅
this is how final output looks like now: