Skip to content

refactor(index): replace errorHandled flag with once() listeners#599

Open
Fdawgs wants to merge 1 commit into
mainfrom
refactor/error-flag
Open

refactor(index): replace errorHandled flag with once() listeners#599
Fdawgs wants to merge 1 commit into
mainfrom
refactor/error-flag

Conversation

@Fdawgs

@Fdawgs Fdawgs commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Cleaner than the errorHandled boolean and still rejects if an abort signal is passed.
Functionally the same.

Checklist

Copilot AI review requested due to automatic review settings July 4, 2026 20:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the UnRTF#convert child-process event handling in src/index.js by removing the errorHandled boolean and switching to once() event listeners for "error" and "close".

Changes:

  • Removed the errorHandled flag used to suppress "close" handling after an "error" event.
  • Replaced .on("error"/"close") handlers with .once("error"/"close") listeners.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/index.js
@Fdawgs Fdawgs closed this Jul 4, 2026
@Fdawgs Fdawgs deleted the refactor/error-flag branch July 4, 2026 20:38
@Fdawgs Fdawgs restored the refactor/error-flag branch July 5, 2026 13:02
@Fdawgs Fdawgs reopened this Jul 5, 2026
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.

2 participants