Skip to content
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

fix(core): always call callback in DefaultStream._flush #2255

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Dec 20, 2020

What's the problem this PR addresses?

DefaultStream._flush doesn't call the callback if the stream isn't empty which, because node 15 waits for it, causes the event loop to become empty and the process exits early during workspaces foreach calls

Note that the tests catch this when they run under node 15 but I can't enable it because of #2232

Fixes #2214
Fixes #2074

How did you fix it?

Always call the callback.

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@AlCalzone
Copy link

This may be a stupid question, but how do I get this version? I'm on yarn 2.4.2, freshly installed, freshly imported the workspace-tools, but yarn workspaces foreach still only runs in the root:

$ yarn workspaces list -v
➤ YN0000: .
➤ YN0000: packages/config
➤ YN0000: packages/core
➤ YN0000: packages/maintenance
➤ YN0000: packages/serial
➤ YN0000: packages/shared
➤ YN0000: packages/testing
➤ YN0000: packages/zwave-js
➤ YN0000: Done in 0s 3ms
$ yarn workspaces foreach exec echo HELLO
←[94m➤←[39m ←[90mYN0000←[39m: HELLO

@merceyz
Copy link
Member Author

merceyz commented Jun 26, 2021

Update to the latest RC

yarn set version 3.0.0-rc.6 && yarn plugin import workspace-tools

@AlCalzone
Copy link

Thanks that seems to work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants