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

Expose launched chrome child process object. #67

Merged
merged 3 commits into from
Dec 8, 2017

Conversation

samccone
Copy link
Contributor

@samccone samccone commented Dec 8, 2017

Some users may want/need access to the underlying child process as
generated from the spawn command, so expose it when launching chrome.

Also add a test to make sure that the interface that we return does not
have undefined values set.


This PR is from #40 but cleaned up so that we can land it.

fixes #7

Some users may want/need access to the underlying child process as
generated from the spawn command, so expose it when launching chrome.

Also add a test to make sure that the interface that we return does not
have undefined values set.
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this State. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@@ -94,7 +96,7 @@ class Launcher {
private requestedPort?: number;
private connectionPollInterval: number;
private maxConnectionRetries: number;
private chrome?: childProcess.ChildProcess;
public chrome?: childProcess.ChildProcess;
Copy link
Member

Choose a reason for hiding this comment

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

sg. seems like we can also add private/public/public to the props on L105-107?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh good catch, public is actually not-needed since when omitted it is the default. I will drop it from here.

@@ -79,7 +81,7 @@ async function launch(opts: Options = {}): Promise<LaunchedChrome> {
return instance.kill();
};

return {pid: instance.pid!, port: instance.port!, kill};
return {pid: instance.pid!, port: instance.port!, kill, chromeProcess: instance.chrome!};
Copy link
Member

Choose a reason for hiding this comment

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

let's rename this guy to just process.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1 will do thanks for the review!

@paulirish paulirish merged commit 449c523 into master Dec 8, 2017
@paulirish paulirish deleted the sjs/expose-child-process branch December 8, 2017 20:35
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.

Maybe add a notification on 'Close' event?
4 participants