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

Dependency Updates and Node 20 Support (Node 14 deprecation) #68

Closed
wants to merge 14 commits into from
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ compare/output/bitmaps_test/
compare/output/config\.js

\.vscode/

# Tests
*newdir
554 changes: 276 additions & 278 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions core/command/remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ module.exports = {
return new Promise(function (resolve, reject) {
const port = getRemotePort();
const commandStr = `node ${ssws} ${projectPath} ${MIDDLEWARE_PATH} --config=${config.backstopConfigFileName}`;
const env = {'SSWS_HTTP_PORT': port};
const env = { SSWS_HTTP_PORT: port };

logger.log(`Starting remote with: ${commandStr} with env ${JSON.stringify(env)}`);

const child = exec(commandStr, { env: { ...env, 'PATH': process.env.PATH } }, (error) => {
const child = exec(commandStr, { env: { ...env, PATH: process.env.PATH } }, (error) => {
if (error) {
logger.log("Error running backstop remote:", error);
logger.log('Error running backstop remote:', error);
}
});

Expand Down
30 changes: 15 additions & 15 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# use bullseye node base, as debian does provide a chromium for arm64 and amd64 flavour
FROM node:16-bullseye
FROM node:20-bullseye

ARG BACKSTOPJS_VERSION
ARG DEBIAN_FRONTEND=noninteractive
Expand All @@ -8,25 +8,25 @@ ENV BACKSTOPJS_VERSION=$BACKSTOPJS_VERSION

# install chromium and its deps
RUN apt-get -qq update >/dev/null && apt-get install -qq \
fonts-liberation \
# cyrillic
xfonts-cyrillic \
# chinese
xfonts-wqy fonts-wqy-zenhei fonts-arphic-ukai fonts-arphic-uming \
# japanese
fonts-ipafont-mincho fonts-ipafont-gothic fonts-ipafont fonts-vlgothic \
# korean
fonts-unfonts-core fonts-unfonts-extra \
# cjk + emoji font
fonts-noto-cjk fonts-noto-color-emoji \
# chromium
chromium >/dev/null && apt-get -qq clean >/dev/null && rm -rf /var/lib/apt/lists/*
fonts-liberation \
# cyrillic
xfonts-cyrillic \
# chinese
xfonts-wqy fonts-wqy-zenhei fonts-arphic-ukai fonts-arphic-uming \
# japanese
fonts-ipafont-mincho fonts-ipafont-gothic fonts-ipafont fonts-vlgothic \
# korean
fonts-unfonts-core fonts-unfonts-extra \
# cjk + emoji font
fonts-noto-cjk fonts-noto-color-emoji \
# chromium
chromium >/dev/null && apt-get -qq clean >/dev/null && rm -rf /var/lib/apt/lists/*

# skip download, we already have it installed
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
# playwright shared browser path (does install a 2nd chromium - can't be skipped)
ENV PLAYWRIGHT_BROWSERS_PATH=/opt/pw-browsers
RUN mkdir ${PLAYWRIGHT_BROWSERS_PATH} && npm install -g --unsafe-perm=true --allow-root backstopjs@${BACKSTOPJS_VERSION}
RUN mkdir ${PLAYWRIGHT_BROWSERS_PATH} && npm install -g --unsafe-perm=true --allow-root backstopjs@${BACKSTOPJS_VERSION} && npx --yes --verbose --foreground-scripts playwright install --with-deps

# set executable path
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
Expand Down
Loading