Skip to content

Commit 7cb9385

Browse files
committed
Merge branch 'main' into deps/pandoc-2025-08
2 parents 5b94e3c + 3bd99df commit 7cb9385

44 files changed

Lines changed: 1923 additions & 1328 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/test-smokes.yml‎

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,23 @@ jobs:
149149
- name: Restore R packages
150150
working-directory: tests
151151
run: |
152+
cat("::group::Installing renv if needed\n")
152153
if (!requireNamespace('renv', quietly = TRUE)) install.packages('renv')
154+
cat("::endgroup::\n")
155+
cat("::group::Restoring R packages from renv.lock\n")
153156
renv::restore()
157+
cat("::endgroup::\n")
158+
cat("::group::Installing dev versions of knitr and rmarkdown\n")
154159
# Install dev versions for our testing
155160
# Use r-universe to avoid github api calls
156161
try(install.packages('rmarkdown', repos = c('https://rstudio.r-universe.dev', getOption('repos'))))
157162
try(install.packages('knitr', repos = c('https://yihui.r-universe.dev', getOption('repos'))))
163+
cat("::endgroup::\n")
158164
if ('${{ inputs.extra-r-packages }}' != '') {
159165
cat(sprintf("::notice::Running with the following extra R packages for renv: %s\n", "${{ inputs.extra-r-packages }}"))
166+
cat("::group::Installing extra R packages\n")
160167
renv::install(strsplit("${{ inputs.extra-r-packages }}", split = ",")[[1]])
168+
cat("::endgroup::\n")
161169
}
162170
shell: Rscript {0}
163171
env:
@@ -259,14 +267,32 @@ jobs:
259267
QUARTO_LOG_LEVEL: DEBUG
260268
run: |
261269
haserror=0
270+
failed_tests=()
262271
readarray -t my_array < <(echo '${{ inputs.buckets }}' | jq -rc '.[]')
263-
for file in "${my_array[@]}"; do
272+
for file in "${my_array[@]}"; do
264273
echo ">>> ./run-tests.sh ${file}"
265-
shopt -s globstar && ./run-tests.sh $file
274+
# Run tests without -e so we don't exit on first failure
275+
set +e
276+
shopt -s globstar && ./run-tests.sh "$file"
266277
status=$?
267-
[ $status -eq 0 ] && echo ">>> No error in this test file" || haserror=1
278+
set -e
279+
if [ $status -ne 0 ]; then
280+
echo "::error title=Test Bucket Failed::Test bucket ${file} failed with exit code ${status}"
281+
echo ">>> Error found in test file: ${file}"
282+
haserror=1
283+
failed_tests+=("$file")
284+
fi
268285
done
269-
[ $haserror -eq 0 ] && echo ">>> All tests passed" || exit 1
286+
if [ $haserror -eq 1 ]; then
287+
echo "---- FAILING TESTS SUMMARY ----"
288+
echo " The following test buckets failed:"
289+
for failed in "${failed_tests[@]}"; do
290+
echo " - $failed"
291+
done
292+
exit 1
293+
else
294+
echo ">>> All tests passed"
295+
fi
270296
working-directory: tests
271297
shell: bash
272298

@@ -277,18 +303,24 @@ jobs:
277303
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
278304
run: |
279305
$haserror=$false
306+
$failed_tests=@()
280307
foreach ($file in ('${{ inputs.buckets }}' | ConvertFrom-Json)) {
281308
Write-Host ">>> ./run-tests.ps1 ${file}"
282309
./run-tests.ps1 $file
283310
$status=$LASTEXITCODE
284-
if ($status -eq 1) {
285-
Write-Host ">>> Error found in test file"
311+
if ($status -ne 0) {
312+
Write-Host "::error title=Test Bucket Failed::Test bucket ${file} failed with exit code ${status}"
313+
Write-Host ">>> Error found in test file: ${file}"
286314
$haserror=$true
287-
} else {
288-
Write-Host ">>> No error in this test file"
315+
$failed_tests+=$file
289316
}
290317
}
291318
if ($haserror) {
319+
Write-Host "---- FAILING TESTS SUMMARY ----"
320+
Write-Host " The following test buckets failed:"
321+
foreach ($failed in $failed_tests) {
322+
Write-Host " - $failed"
323+
}
292324
Exit 1
293325
} else {
294326
Write-Host ">>> All tests have passed"

‎news/changelog-1.9.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,20 @@ All changes included in 1.9:
1111
- ([#13633](https://github.com/quarto-dev/quarto-cli/issues/13633)): Fix detection and auto-installation of babel language packages from newer error format that doesn't explicitly mention `.ldf` filename.
1212
- ([#13694](https://github.com/quarto-dev/quarto-cli/issues/13694)): Fix `notebook-view.url` being ignored - external notebook links now properly use specified URLs instead of local preview files.
1313
- ([#13732](https://github.com/quarto-dev/quarto-cli/issues/13732)): Fix automatic font package installation for fonts with spaces in their names (e.g., "Noto Emoji", "DejaVu Sans"). Font file search patterns now match both with and without spaces.
14+
- ([#13798](https://github.com/quarto-dev/quarto-cli/pull/13798)): Directories specified in `ExecutionEngineDiscovery.ignoreDirs` were not getting ignored.
1415

1516
## Dependencies
1617

1718
- Update `esbuild` to 0.25.10
1819
- Update `deno` to 2.4.5
1920
- ([#13601](https://github.com/quarto-dev/quarto-cli/pull/13601)): Update `mermaid` to 11.12.0 (author: @multimeric)
2021

22+
## Extensions
23+
24+
- Metadata and brand extensions now work without a `_quarto.yml` project. (Engine extensions do too.) A temporary default project is created in memory.
25+
26+
- New **Engine Extensions**, to allow other execution engines than knitr, jupyter, julia. Julia is now a bundled extension. See [the prerelease notes](https://prerelease.quarto.org/docs/prerelease/1.9/) and [engine extension documentation](https://prerelease.quarto.org/docs/extensions/engine.html).
27+
2128
## Formats
2229

2330
### `gfm`

‎src/command/check/check.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ async function checkVersions(conf: CheckConfiguration) {
247247
? [
248248
[pandocVersion, "3.6.3", "Pandoc"],
249249
[sassVersion, "1.87.0", "Dart Sass"],
250-
[denoVersion, "2.3.1", "Deno"],
250+
[denoVersion, "2.4.5", "Deno"],
251251
[typstVersion, "0.13.0", "Typst"],
252252
]
253253
: [

‎src/core/platform.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ export function isInteractiveSession() {
9494
return isRStudio() || isInteractiveTerminal() || isVSCodeOutputChannel();
9595
}
9696

97-
export function isGithubAction() {
98-
return Deno.env.get("GITHUB_ACTIONS") === "true";
99-
}
100-
10197
export function nullDevice() {
10298
return isWindows ? "NUL" : "/dev/null";
10399
}

‎src/import_map.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
"zod": "npm:/zod@3.24.4",
3030

31-
"yaml": "https://cdn.skypack.dev/js-yaml",
31+
"yaml": "https://cdn.skypack.dev/js-yaml@4.1.1",
3232
"events/": "https://deno.land/x/events@v1.0.0/",
3333
"cache/": "https://deno.land/x/cache@0.2.12/",
3434
"cliffy/": "https://deno.land/x/cliffy@v1.0.0-rc.3/",

‎src/project/project-context.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import {
6363
fileExecutionEngine,
6464
fileExecutionEngineAndTarget,
6565
projectIgnoreGlobs,
66+
resolveEngines,
6667
} from "../execute/engine.ts";
6768
import { ExecutionEngineInstance, kMarkdownEngine } from "../execute/types.ts";
6869

@@ -884,6 +885,9 @@ async function projectInputFilesInternal(
884885
project: ProjectContext,
885886
metadata?: ProjectConfig,
886887
): Promise<{ files: string[]; engines: string[] }> {
888+
// Resolve engines so engineIgnoreDirs() uses all engines (including external)
889+
await resolveEngines(project);
890+
887891
const { dir } = project;
888892

889893
const outputDir = metadata?.project[kProjectOutputDir];

‎src/resources/pandoc/datadir/readqmd.lua‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ local function readqmd(txt, opts)
126126
txt = md_fenced_div.attempt_to_fix_fenced_div(txt)
127127
txt, tags = escape_invalid_tags(txt)
128128
txt = md_shortcode.parse_md_shortcode_2(txt)
129-
print(txt)
130129
local flavor = {
131130
format = "markdown",
132131
extensions = {},

‎src/tools/github.ts‎

Lines changed: 118 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,128 @@
44
* Copyright (C) 2020-2022 Posit Software, PBC
55
*/
66

7-
import { runningInCI } from "../core/ci-info.ts";
87
import { GitHubRelease } from "./types.ts";
98

109
// deno-lint-ignore-file camelcase
1110

11+
// GitHub Actions Detection
12+
export function isGitHubActions(): boolean {
13+
return Deno.env.get("GITHUB_ACTIONS") === "true";
14+
}
15+
16+
export function isVerboseMode(): boolean {
17+
return Deno.env.get("RUNNER_DEBUG") === "1" ||
18+
Deno.env.get("QUARTO_TEST_VERBOSE") === "true";
19+
}
20+
21+
// GitHub Actions Workflow Command Escaping
22+
// See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions
23+
export function escapeData(s: string): string {
24+
return s
25+
.replace(/%/g, "%25")
26+
.replace(/\r/g, "%0D")
27+
.replace(/\n/g, "%0A");
28+
}
29+
30+
export function escapeProperty(s: string): string {
31+
return s
32+
.replace(/%/g, "%25")
33+
.replace(/\r/g, "%0D")
34+
.replace(/\n/g, "%0A")
35+
.replace(/:/g, "%3A")
36+
.replace(/,/g, "%2C");
37+
}
38+
39+
// GitHub Actions Annotations
40+
export interface AnnotationProperties {
41+
file?: string;
42+
line?: number;
43+
endLine?: number;
44+
title?: string;
45+
}
46+
47+
function formatProperties(props: AnnotationProperties): string {
48+
const parts: string[] = [];
49+
if (props.file !== undefined) {
50+
parts.push(`file=${escapeProperty(props.file)}`);
51+
}
52+
if (props.line !== undefined) parts.push(`line=${props.line}`);
53+
if (props.endLine !== undefined) parts.push(`endLine=${props.endLine}`);
54+
if (props.title !== undefined) {
55+
parts.push(`title=${escapeProperty(props.title)}`);
56+
}
57+
return parts.length > 0 ? " " + parts.join(",") : "";
58+
}
59+
60+
export function error(
61+
message: string,
62+
properties?: AnnotationProperties,
63+
): void {
64+
if (!isGitHubActions()) return;
65+
const props = properties ? formatProperties(properties) : "";
66+
console.log(`::error${props}::${escapeData(message)}`);
67+
}
68+
69+
export function warning(
70+
message: string,
71+
properties?: AnnotationProperties,
72+
): void {
73+
if (!isGitHubActions()) return;
74+
const props = properties ? formatProperties(properties) : "";
75+
console.log(`::warning${props}::${escapeData(message)}`);
76+
}
77+
78+
export function notice(
79+
message: string,
80+
properties?: AnnotationProperties,
81+
): void {
82+
if (!isGitHubActions()) return;
83+
const props = properties ? formatProperties(properties) : "";
84+
console.log(`::notice${props}::${escapeData(message)}`);
85+
}
86+
87+
// GitHub Actions Log Grouping
88+
export function startGroup(title: string): void {
89+
if (!isGitHubActions()) return;
90+
console.log(`::group::${escapeData(title)}`);
91+
}
92+
93+
export function endGroup(): void {
94+
if (!isGitHubActions()) return;
95+
console.log("::endgroup::");
96+
}
97+
98+
export function withGroup<T>(title: string, fn: () => T): T {
99+
startGroup(title);
100+
try {
101+
return fn();
102+
} finally {
103+
endGroup();
104+
}
105+
}
106+
107+
export async function withGroupAsync<T>(
108+
title: string,
109+
fn: () => Promise<T>,
110+
): Promise<T> {
111+
startGroup(title);
112+
try {
113+
return await fn();
114+
} finally {
115+
endGroup();
116+
}
117+
}
118+
119+
// Legacy group function for backward compatibility and alia
120+
export async function group<T>(
121+
title: string,
122+
fn: () => Promise<T>,
123+
): Promise<T> {
124+
return await withGroupAsync(title, fn);
125+
}
126+
127+
// GitHub API
128+
12129
// A Github Release for a Github Repo
13130

14131
// Look up the latest release for a Github Repo
@@ -26,37 +143,3 @@ export async function getLatestRelease(repo: string): Promise<GitHubRelease> {
26143
return response.json();
27144
}
28145
}
29-
30-
// NB we do not escape these here - it's the caller's responsibility to do so
31-
function githubActionsWorkflowCommand(
32-
command: string,
33-
value = "",
34-
params?: Record<string, string>,
35-
) {
36-
let paramsStr = "";
37-
if (params) {
38-
paramsStr = " ";
39-
let first = false;
40-
for (const [key, val] of Object.entries(params)) {
41-
if (!first) {
42-
first = true;
43-
} else {
44-
paramsStr += ",";
45-
}
46-
paramsStr += `${key}=${val}`;
47-
}
48-
}
49-
return `::${command}${paramsStr}::${value}`;
50-
}
51-
52-
export async function group<T>(title: string, fn: () => Promise<T>) {
53-
if (!runningInCI()) {
54-
return fn();
55-
}
56-
console.log(githubActionsWorkflowCommand("group", title));
57-
try {
58-
return await fn();
59-
} finally {
60-
console.log(githubActionsWorkflowCommand("endgroup"));
61-
}
62-
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.quarto/
2+
**/*.quarto_ipynb
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "404-page-content",
6+
"metadata": {},
7+
"source": [
8+
"---\n",
9+
"title: \"Page Not Found\"\n",
10+
"---\n",
11+
"\n",
12+
"# 404 - Page Not Found\n",
13+
"\n",
14+
"Sorry, the page you're looking for doesn't exist."
15+
]
16+
}
17+
],
18+
"metadata": {
19+
"kernelspec": {
20+
"display_name": "Python 3",
21+
"language": "python",
22+
"name": "python3"
23+
}
24+
},
25+
"nbformat": 4,
26+
"nbformat_minor": 2
27+
}

0 commit comments

Comments
 (0)