Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Change node serial to new serial cli #1322

Merged
merged 11 commits into from
Aug 20, 2021
Merged

Change node serial to new serial cli #1322

merged 11 commits into from
Aug 20, 2021

Conversation

adiazulay
Copy link
Contributor

changing away from the node serial package to avoid serial breaking any time electron updates.

@adiazulay adiazulay requested review from dilin-MS and aleun and removed request for dilin-MS August 19, 2021 23:31
Copy link
Contributor

@aleun aleun left a comment

Choose a reason for hiding this comment

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

👍

port: string;
desc: string;
hwid: string;
vendorId: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

ISerialPortDetail here should be replaced with the definition of the same name in serialportctrl.ts.

});
}
});
resolve(true);
Copy link
Contributor

@aleun aleun Aug 19, 2021

Choose a reason for hiding this comment

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

I believe resolve should not be called here, but called in a handler for the spawn event to prevent a race that resolves the promise before the error event is emitted.

this._outputChannel.show();

if (this._child) {
this._child.stdin.write("close\n");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this message needs to be wrapped in JSON. I might suggest just wrapping this logic into a closeChildProcess method and reuse that, since I see this same pattern in a few places in this class.

Suggested change
this._child.stdin.write("close\n");
this._child.stdin.write('{"cmd": "close"}\n');

@adiazulay adiazulay changed the base branch from develop to dev August 20, 2021 16:16
@adiazulay adiazulay merged commit 548103b into dev Aug 20, 2021
adiazulay added a commit that referenced this pull request Aug 26, 2021
* change to dev branch (#1323)

* Change node serial to new serial cli (#1322)

* add args to build

* initial integration of serial cli

* Add gulp task for serial-monitor-cli insertion

* Temporarily disable serial monitor insertion task

* Uncomment task

* change platforms to match os.platform

* fix linting

* add relative path for serial

Co-authored-by: Alan Leung <alleu@microsoft.com>

* Add fixes from code review (#1328)

* remove native serial dependencies

* fixes from code review

* Revert "remove native serial dependencies"

This reverts commit 6586a66.

* add vid pid support

* code review fixes

* revert stop to return bool

* pre release v0.4.4-rc1

* bump to 0.4.4-rc2

* bump to v0.4.4

Co-authored-by: Alan Leung <alleu@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants