Skip to content

Conversation

@Symbitic
Copy link

@Symbitic Symbitic commented Aug 4, 2021

This implements the second solution that @lucacasonato suggested in #9. It will install the latest Chromium if no executablePath is given to puppeteer.launch.

It adds an uninstall script so that this can be tested separately in CI. This doesn't break anything, so the install script can still be used when desired. It does disable the progress bar when installing from puppeteer.launch, which might cause confusion for some users because it will take a long time to download without indicating why.

): Promise<Browser> {
if (options.product) this._productName = options.product;
if (!options.executablePath && !this._downloaded) {
await installPuppeteer({ enableLog: false });
Copy link
Owner

Choose a reason for hiding this comment

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

I think this should still log out that it is going to install puppeteer. The script just hanging for 25 seconds on first use is kinda weird.

Copy link
Author

Choose a reason for hiding this comment

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

@lucacasonato I added it so that it logs by default. I also added log levels. Minimal level will just print out a simple "Downloading chrome/firefox" message. Default logging (including progress bar) is still what it does right now. If you want to switch to using the "minimal" message, just change this: https://github.com/Symbitic/deno-puppeteer/blob/main/src/deno/Puppeteer.ts#L149
Otherwise, I can use logLevel as suitable for my use cases.

@Symbitic
Copy link
Author

@lucacasonato any updates?

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