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

Upgrade Node and dependent packages to the latest #77

Merged
merged 13 commits into from
Mar 19, 2019
Merged

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Mar 16, 2019

Upgrade Node (v10.15.3) and dependent packages to the latest version by using yarn upgrade --latest.

This PR is included update of Marpit v0.8.0 and Marp Core v0.7.0.

Notable changes

  • @types/chokidar has removed. chokidar has already provided type definitions.
  • Update .circleci/config.yml as like as the other marp-team projects.
  • supertest v4.0.1 has reverted bumped superagent 4 to v3.x. So we reverted 527a504.
  • Sometimes our docker image receive a mismatch between Chromium version and Puppeteer supported version. We updated Dockerfile to use matched Puppeteer version.

@yhatt
Copy link
Member Author

yhatt commented Mar 18, 2019

A new stable Chrome (73) is blocking tests used Puppeteer.
https://circleci.com/gh/marp-team/marp-cli/1193

According to I/O dump, Chrome seems to be crashed with following message:

[0318/082940.903795:FATAL:gpu_data_manager_impl_private.cc(892)] The display compositor is frequently crashing. Goodbye.

Related: puppeteer/puppeteer#3774

- Puppeteer has already default option `--disable-dev-shm-usage`.
- BGPT no longer works from Puppeteer >= v1.13.0

See: puppeteer/puppeteer@ef2251d
Use Chromium supported by Puppeteer instead.
Copy link
Member Author

@yhatt yhatt left a comment

Choose a reason for hiding this comment

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

We have many updates to battle against Puppeteer...

command: |
mkdir -p ~/.puppeteer && cd ~/.puppeteer
npm i puppeteer
echo "export CHROME_PATH=$(node -e "console.log(require('puppeteer').executablePath())")" >> $BASH_ENV
Copy link
Member Author

Choose a reason for hiding this comment

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

Add workaround for broken Chrome 73. We have to use Chromium supported by Puppeteer (Chromium 74) within image.

We have confirmed to work conversion in Chrome 73 with out of container (Windows/macOS/Linux).

@@ -257,24 +257,14 @@ export class Converter {

private static async runBrowser() {
if (!Converter.browser) {
// Fix the rendered position of elements in <foreignObject>
// See: https://bugs.chromium.org/p/chromium/issues/detail?id=467484
const args = ['--enable-blink-gen-property-trees']
Copy link
Member Author

Choose a reason for hiding this comment

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

Puppeteer v1.13.0 no longer works BGPT feature.
puppeteer/puppeteer@ef2251d

It seems to have no critical problems while rendering PDF and images.

: chromeFinder[process.platform]

if (process.env.IS_DOCKER || process.env.CI)
args.push('--disable-dev-shm-usage')
Copy link
Member Author

Choose a reason for hiding this comment

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

Puppeteer already has --disable-dev-shm-usage option by default.

@yhatt yhatt merged commit d9ed1ef into master Mar 19, 2019
@yhatt yhatt deleted the upgrade-dependencies branch March 19, 2019 03:30
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.

1 participant