From f6333b69eac1b9da8ebd83f0c6c01e90d70cdd75 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Mon, 26 Jan 2026 14:55:27 -0500 Subject: [PATCH 1/2] claude: Support array of printsMessage checks in smoke tests Allows testing for both presence AND absence of specific messages in a single test by passing an array to printsMessage. Co-Authored-By: Claude Opus 4.5 --- tests/smoke/smoke-all.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/smoke/smoke-all.test.ts b/tests/smoke/smoke-all.test.ts index b9c1857ab9f..0f35db201fd 100644 --- a/tests/smoke/smoke-all.test.ts +++ b/tests/smoke/smoke-all.test.ts @@ -277,7 +277,11 @@ function resolveTestSpecs( verifyFns.push(verifyMap[key](outputFile.outputPath, ...value)); } } else if (key === "printsMessage") { - verifyFns.push(verifyMap[key](value)); + // Support both single object and array of printsMessage checks + const messages = Array.isArray(value) ? value : [value]; + for (const msg of messages) { + verifyFns.push(verifyMap[key](msg)); + } } else if (key === "ensureEpubFileRegexMatches") { // this ensure function is special because it takes an array of path + regex specifiers, // so we should never use the spread operator From 612621deccfe82cd2f72406900eaa9ce78a30030 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Mon, 26 Jan 2026 14:56:13 -0500 Subject: [PATCH 2/2] claude: Fix stack trace shown for Typst compilation errors Use ErrorEx with printStack=false so users see only the Typst error message without a confusing internal stack trace. Fixes #13942 Co-Authored-By: Claude Opus 4.5 --- news/changelog-1.9.md | 1 + src/command/render/output-typst.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/news/changelog-1.9.md b/news/changelog-1.9.md index f8c0a32523d..fed25ff0382 100644 --- a/news/changelog-1.9.md +++ b/news/changelog-1.9.md @@ -68,6 +68,7 @@ All changes included in 1.9: - Two-column layout now uses `set page(columns:)` instead of `columns()` function, fixing compatibility with landscape sections. - Title block now properly spans both columns in multi-column layouts. - ([#13870](https://github.com/quarto-dev/quarto-cli/issues/13870)): Add support for `alt` attribute on cross-referenced equations for improved accessibility. (author: @mcanouil) +- ([#13942](https://github.com/quarto-dev/quarto-cli/issues/13942)): Fix Typst compilation errors showing confusing internal stack traces. Users now see only the relevant Typst error message. - ([#13950](https://github.com/quarto-dev/quarto-cli/pull/13950)): Replace ctheorems with theorion package for theorem environments. Add `theorem-appearance` option to control styling: `simple` (default, classic LaTeX style), `fancy` (colored boxes with brand colors), `clouds` (rounded backgrounds), or `rainbow` (colored start border and colored title). - ([#13954](https://github.com/quarto-dev/quarto-cli/issues/13954)): Add support for Typst book projects via format extensions. Quarto now bundles the `orange-book` extension which provides a textbook-style format with chapter numbering, cross-references, and professional styling. Book projects with `format: typst` automatically use this extension. - ([#13978](https://github.com/quarto-dev/quarto-cli/pull/13978)): Keep term and description together in definition lists to avoid breaking across pages. (author: @mcanouil) diff --git a/src/command/render/output-typst.ts b/src/command/render/output-typst.ts index add4f8a3025..6a271349ef6 100644 --- a/src/command/render/output-typst.ts +++ b/src/command/render/output-typst.ts @@ -29,6 +29,7 @@ import { kVariant, } from "../../config/constants.ts"; import { error, warning } from "../../deno_ral/log.ts"; +import { ErrorEx } from "../../core/lib/error.ts"; import { Format } from "../../config/types.ts"; import { writeFileToStdout } from "../../core/console.ts"; import { dirAndStem, expandPath } from "../../core/path.ts"; @@ -167,11 +168,10 @@ export function typstPdfOutputRecipe( typstOptions, ); if (!result.success) { - // Log the error so test framework can detect it via shouldError if (result.stderr) { error(result.stderr); } - throw new Error("Typst compilation failed"); + throw new ErrorEx("Error", "Typst compilation failed", false, false); } // Validate PDF against specified standards using verapdf (if available)