Skip to content

fix: #455 latest code was not waiting for nodemon#456

Merged
doiron merged 1 commit intodevelopfrom
fix-ask-run
Apr 18, 2023
Merged

fix: #455 latest code was not waiting for nodemon#456
doiron merged 1 commit intodevelopfrom
fix-ask-run

Conversation

@doiron
Copy link
Contributor

@doiron doiron commented Apr 18, 2023

#455

nodemon is used to launch a new debug session when files get modified/updated. for some reason v2.29.1 was not waiting for the nodemon and exiting the process. Solution here is to wrap it in a promise and waiting for the promise to resolve. Also, converted the helper.js file to typescript.

We'll need to add some integration test to make sure this doesn't regress in the future, but wanted to get the fix out ASAP, given this is a breaking bug...

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@doiron doiron marked this pull request as ready for review April 18, 2023 03:37
@doiron doiron requested a review from tydonelson April 18, 2023 03:37
execCommand() {
nodemon(this.execConfig);
return new Promise(() => {
nodemon({verbose: true, ...this.execConfig})
Copy link
Contributor

Choose a reason for hiding this comment

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

Just looking for clarification here, changes look good to me... a little fuzzy on how this makes the nodemon call synchronous now, if the app wasn't waiting on this line before, why would it be now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is an await where execCommand() is getting called in the index file

@doiron doiron merged commit 930269f into develop Apr 18, 2023
@doiron doiron deleted the fix-ask-run branch April 18, 2023 16:46
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