-
-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(run): add allowRestarts
option
#820
Merged
shellscape
merged 3 commits into
rollup:master
from
nicholas-ochoa:feat/run/allowRestarts
Apr 22, 2021
Merged
feat(run): add allowRestarts
option
#820
shellscape
merged 3 commits into
rollup:master
from
nicholas-ochoa:feat/run/allowRestarts
Apr 22, 2021
Conversation
This file contains 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
…arts by entering sequences on the terminal
shellscape
requested review from
NotWoods,
TrySound,
Andarist,
danielgindi,
LarsDenBakker and
tjenkinson
March 10, 2021 15:15
shellscape
reviewed
Mar 10, 2021
shellscape
reviewed
Mar 10, 2021
shellscape
approved these changes
Mar 10, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shellscape is this waiting for anything on my end before it can be merged? Just double checking to make sure I didn't miss anything, thanks! |
We generally like to get more than one review before merging. Just waiting for some others to have the time to check. |
guybedford
pushed a commit
that referenced
this pull request
Apr 30, 2021
* feat(run): add `allowRestarts` option that enables manual bundle restarts by entering sequences on the terminal * minor: change `forkBundle` function to an arrow function * minor: clarify `stdin` behavior in `README.md` when `allowRestarts` is `true`
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.
Rollup Plugin Name:
run
This PR contains:
Are tests included?
Breaking Changes?
If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.
List any relevant issue numbers:
#769
Description
This PR adds functionality to enable optional manual restarts of the running bundle by entering
rs
,restart
or pressing Ctrl+K on the terminal followed by Enter. This mimics the behavior of nodemon. Additionally, the terminal screen can be cleared by enteringcls
,clear
or pressing Ctrl+L followed by Enter.The use case for this functionality is developing applications that reference external configuration files, resources or databases that may change while the application source remains unchanged. When these are updated often times the application will need to be restarted. In my case, this is currently accomplished by terminating the current instance using Ctrl+C and then restarting it by running
pnpm run dev
.I've tested this on Windows (under
cmd.exe
as well as under Bash using Windows Terminal) and Linux (bash, over SSH using Putty, as well as usingssh
under Windows Terminal) and it works as expected.I did add a single test case but I admit it is pretty simplistic and could use improvement. I was unable to get
sinon
to properly mock theprocess.stdin.resume
function call to determine whether or not it was called.