Skip to content

Commit ac6b976

Browse files
authored
Update dependencies (#155)
This change updates the dependency versions of: - debian-bookworm - pandoc - pandoc-crossref - puppeteer - imgur - mermaid-filter - typescript - drawio It also resolves an issue seen running on newer Chromium browsers (>126 or so) where the browser hangs. See puppeteer/puppeteer#11640 for more information about this issue. Because of the update to pandoc 3.2.1, this change also updates the TCG LaTeX template to provide the new required `\pandocbounded` macro. It doesn't appear to have any actual effect for images in docs.
1 parent 5d5da71 commit ac6b976

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1.3-labs
2-
ARG BASE=debian:bookworm-20240110-slim
2+
ARG BASE=debian:bookworm-20240812-slim
33
FROM ${BASE} as build-pandoc
44

55
WORKDIR /usr/src/pandoc
@@ -13,8 +13,8 @@ RUN apt update && apt install -y \
1313
zlib1g \
1414
zlib1g-dev
1515

16-
ENV PANDOC_CLI_VERSION=3.1.12.2
17-
ENV PANDOC_CROSSREF_VERSION=0.3.17.0
16+
ENV PANDOC_CLI_VERSION=3.3
17+
ENV PANDOC_CROSSREF_VERSION=0.3.17.1
1818

1919
RUN cabal update && \
2020
cabal install -j --only-dependencies \
@@ -143,7 +143,7 @@ RUN apt install -y \
143143
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
144144
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
145145

146-
RUN npm install --global --unsafe-perm puppeteer@21.7.0 imgur@2.3.0 [email protected] typescript@5.3.3 [email protected]
146+
RUN npm install --global --unsafe-perm puppeteer@23.2.1 imgur@2.4.2 [email protected] typescript@5.5.4 [email protected]
147147

148148
# Lazy: Just put both possible texlive paths into the path. Only one will get populated.
149149
ENV PATH="${PATH}:/usr/local/texlive/bin/aarch64-linux:/usr/local/texlive/bin/x86_64-linux"
@@ -216,7 +216,7 @@ RUN apt install -y \
216216
xorg \
217217
xvfb
218218

219-
ENV DRAWIO_RELEASE=23.1.5
219+
ENV DRAWIO_RELEASE=24.7.8
220220

221221
# TARGETPLATFORM is linux/arm64 or linux/amd64. The release for amd64 is called drawio-amd64-23.1.5.deb.
222222
RUN export DRAWIO_DEB=drawio-${TARGETPLATFORM#linux/}-${DRAWIO_RELEASE}.deb && \

build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,15 @@ fi
375375

376376
# There are some configuration dependencies required for Mermaid.
377377
# They have to be in the current directory.
378+
# --disable-gpu is added here based on:
379+
# https://github.com/puppeteer/puppeteer/issues/11640
378380
cat <<- EOF > ./.puppeteer.json
379381
{
380382
"executablePath": "$browser",
381383
"args": [
382384
"--no-sandbox",
383-
"--disable-setuid-sandbox"
385+
"--disable-setuid-sandbox",
386+
"--disable-gpu"
384387
]
385388
}
386389
EOF

template/tcg.tex

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,20 @@
143143
\usepackage{rotating}
144144
$endif$
145145

146+
% https://github.com/Wandmalfarbe/pandoc-latex-template/issues/391
147+
\makeatletter
148+
\newsavebox\pandoc@box
149+
\newcommand*\pandocbounded[1]{% scales image to fit in text height/width
150+
\sbox\pandoc@box{#1}%
151+
\Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
152+
\Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
153+
\ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both
154+
\ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}%
155+
\else\usebox{\pandoc@box}%
156+
\fi%
157+
}
158+
\makeatother
159+
146160
$if(highlighting-macros)$
147161
$highlighting-macros$
148162

0 commit comments

Comments
 (0)