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

chore(deps-dev): bump puppeteer from 1.19.0 to 3.0.2 #1265

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions Dockerfile
Expand Up @@ -6,13 +6,16 @@ ENV NPM_TOKEN ${NPM_TOKEN}
ARG GIT_SHA
ENV GIT_SHA ${GIT_SHA}

ARG APK_BRANCH=3.10
ARG APK_BRANCH=3.11
ENV APK_BRANCH ${APK_BRANCH}

ENV PATH="${PATH}:/app/node_modules/.bin"

# Installs Chromium (77) package.
# Installs Chromium (81) package.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I find this comment misleading, tbh. The next line sets an environment variable how is this installation fo chromium and is it reliable to mention the exect number in the comment?

ENV CHROME_BIN /usr/bin/chromium-browser
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

RUN echo $APK_BRANCH
RUN apk update && apk upgrade && \
Expand Down Expand Up @@ -45,6 +48,7 @@ RUN yarn install --frozen-lockfile

COPY . /app

# creates symlinks between packages
RUN yarn config set workspaces-experimental true
RUN yarn install --frozen-lockfile && yarn cache clean

Expand Down
3 changes: 2 additions & 1 deletion jest-puppeteer.config.js
@@ -1,6 +1,7 @@
module.exports = {
launch: {
executablePath: process.env.CHROME_BIN || null,
args: ['--no-sandbox']
args: ['--no-sandbox', '--start-maximized'],
defaultViewport: null
}
}
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -80,7 +80,7 @@
"jsdom": "^15.1.1",
"lerna": "^3.19.0",
"lodash": "^4.17.11",
"puppeteer": "1.19.0",
"puppeteer": "3.0.2",
"raw-loader": "^3.0.0",
"react": "^16.12.0",
"react-ace": "^8.1.0",
Expand Down
5 changes: 5 additions & 0 deletions puppeteer/index.ts
Expand Up @@ -64,6 +64,11 @@ async function screenshotDOMElement({

const clipPadding = padding || PADDING_AROUND_COMPONENT

await page.setViewport({
width: clipDimensions.width,
height: clipDimensions.height
})

return page.screenshot({
clip: {
x: clipDimensions.x - clipPadding,
Expand Down