-
Notifications
You must be signed in to change notification settings - Fork 11
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
Terminal colors #119
Terminal colors #119
Conversation
node-pty will be used to provider a better interactive terminal. However, VSCode uses electron which has it's own npm There are discussions which failed to provide other workarounds
The format of the files and package-lock.json where updated by npm |
52fe519
to
bcb79e6
Compare
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.
node-pty will be used to provider a better interactive terminal. It's required to have colors and progress bars from bitbake. Explanation: microsoft/vscode#155444 (comment) However, VSCode uses electron which has it's own npm NODE_MODULE_VERSION. I had to use `@electron/rebuild` to match the version. I wonder if it would break when VSCode updates electron. There are discussions which failed to provide other workarounds (we don't use webpack yet): - microsoft/node-pty#582 - microsoft/vscode#658 The format of the files and package-lock.json where updated by npm install.
Following the representation from microsoft/vscode#155444 (comment) This allows colors and progress bars to render from bitbake.
Compared to child_process.spawn, the stdout data buffer from node-pty ends lines with \n instead of \r\n. We must update all our regexes and splits. The regex make \r so that we avoid potential compatibility issues.
We'll be using dynamic imports instead to comply with both the vscode and native jest environments.
VSCode and the Jest native environment use conflicting NODE_MODULE_VERSION. We have to use node-pty from VSCode when running in the VSCode environment and the regular node-pty when running in Jest. Following the idea presented in: microsoft/vscode#658 (comment) We use dynamic imports to load the correct node-pty. The types must still be imported normally at compile time.
- Update import paths for ProcessUtils - Update newline from \n to \r\n - Update function names for onData and onExit
node-pty was truncating the output of the `ps` command, which was causing the `ps` command to not return the expected output. In turn, bitbake processes were not being detected and stopped on terminal close.
5193593
to
2d0e017
Compare
No description provided.