Skip to content

Commit 1302d40

Browse files
authored
Merge branch 'main' into fix/issue11750
2 parents b8f2a49 + d9a3db2 commit 1302d40

File tree

172 files changed

+6921
-3864
lines changed

Some content is hidden

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

172 files changed

+6921
-3864
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Prevent Workflow Re-run
2+
description: Fails if the workflow is re-run (github.run_attempt > 1)
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Prevent any re-run
7+
if: ${{ github.run_attempt > 1 }}
8+
run: |
9+
echo "::error::Re-running jobs is not permitted. Please trigger a new build manually at https://github.com/quarto-dev/quarto-cli/actions/workflows/create-release.yml (click 'Run workflow'), or use the GitHub CLI: 'gh workflow run create-release.yml'"
10+
exit 1
11+
shell: bash

.github/workflows/create-release.yml

Lines changed: 82 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ jobs:
2828
tag_name: v${{ steps.read-version.outputs.version_full }}
2929
version_commit: ${{ steps.version_commit.outputs.commit_long_sha }}
3030
pushed: ${{ steps.version_commit.outputs.pushed }}
31+
tagged: ${{ steps.version_commit.outputs.tagged }}
3132
tag_pushed: ${{ steps.version_commit.outputs.tag_pushed }}
3233
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'quarto-dev/quarto-cli')
3334
steps:
3435
- uses: actions/checkout@v4
3536
with:
3637
fetch-depth: 0
3738

39+
- name: Prevent Re-run
40+
uses: ./.github/workflows/actions/prevent-rerun
41+
3842
# we _also_ need npm, specifically for webui/preview
3943
- uses: actions/setup-node@v4
4044
with:
@@ -99,6 +103,9 @@ jobs:
99103
with:
100104
ref: ${{ needs.configure.outputs.version_commit }}
101105

106+
- name: Prevent Re-run
107+
uses: ./.github/workflows/actions/prevent-rerun
108+
102109
- name: Make Tarball
103110
run: |
104111
tar --owner=root --group=root -zcvf quarto-${{needs.configure.outputs.version}}.tar.gz *
@@ -117,6 +124,9 @@ jobs:
117124
with:
118125
ref: ${{ needs.configure.outputs.version_commit }}
119126

127+
- name: Prevent Re-run
128+
uses: ./.github/workflows/actions/prevent-rerun
129+
120130
- name: Configure
121131
run: |
122132
./configure.sh
@@ -150,6 +160,9 @@ jobs:
150160
with:
151161
ref: ${{ needs.configure.outputs.version_commit }}
152162

163+
- name: Prevent Re-run
164+
uses: ./.github/workflows/actions/prevent-rerun
165+
153166
- name: Configure
154167
run: |
155168
./configure.sh
@@ -183,6 +196,9 @@ jobs:
183196
with:
184197
ref: ${{ needs.configure.outputs.version_commit }}
185198

199+
- name: Prevent Re-run
200+
uses: ./.github/workflows/actions/prevent-rerun
201+
186202
- name: Configure
187203
run: |
188204
./configure.sh
@@ -227,6 +243,9 @@ jobs:
227243
with:
228244
ref: ${{ needs.configure.outputs.version_commit }}
229245

246+
- name: Prevent Re-run
247+
uses: ./.github/workflows/actions/prevent-rerun
248+
230249
- name: Configure
231250
run: |
232251
./configure.sh
@@ -257,6 +276,9 @@ jobs:
257276
with:
258277
ref: ${{ needs.configure.outputs.version_commit }}
259278

279+
- name: Prevent Re-run
280+
uses: ./.github/workflows/actions/prevent-rerun
281+
260282
- name: Configure
261283
run: |
262284
./configure.sh
@@ -283,6 +305,15 @@ jobs:
283305
runs-on: ubuntu-latest
284306
needs: [configure, make-tarball]
285307
steps:
308+
- uses: actions/checkout@v4
309+
with:
310+
ref: ${{ needs.configure.outputs.version_commit }}
311+
sparse-checkout: |
312+
.github
313+
314+
- name: Prevent Re-run
315+
uses: ./.github/workflows/actions/prevent-rerun
316+
286317
- uses: actions/download-artifact@v4
287318
with:
288319
name: Deb Zip
@@ -303,15 +334,17 @@ jobs:
303334
needs: [configure]
304335

305336
steps:
306-
- name: Configure Rust Tools
307-
run: |
308-
rustup.exe toolchain install 1.63.0 --component rustfmt --component clippy --no-self-update
309-
rustup.exe default 1.63.0
310-
311337
- uses: actions/checkout@v4
312338
with:
313339
ref: ${{ needs.configure.outputs.version_commit }}
314340

341+
- name: Prevent Re-run
342+
uses: ./.github/workflows/actions/prevent-rerun
343+
344+
- name: Configure Rust Tools
345+
run: |
346+
rustup.exe toolchain install 1.63.0 --component rustfmt --component clippy --no-self-update
347+
rustup.exe default 1.63.0
315348
- name: Configure
316349
run: |
317350
.\configure.cmd
@@ -383,6 +416,15 @@ jobs:
383416
runs-on: windows-latest
384417
needs: [configure, make-installer-win]
385418
steps:
419+
- uses: actions/checkout@v4
420+
with:
421+
ref: ${{ needs.configure.outputs.version_commit }}
422+
sparse-checkout: |
423+
.github
424+
425+
- name: Prevent Re-run
426+
uses: ./.github/workflows/actions/prevent-rerun
427+
386428
- uses: actions/download-artifact@v4
387429
with:
388430
name: Windows Zip
@@ -403,6 +445,9 @@ jobs:
403445
with:
404446
ref: ${{ needs.configure.outputs.version_commit }}
405447

448+
- name: Prevent Re-run
449+
uses: ./.github/workflows/actions/prevent-rerun
450+
406451
- name: Configure
407452
run: |
408453
./configure.sh
@@ -464,6 +509,15 @@ jobs:
464509
runs-on: macos-latest
465510
needs: [configure, make-installer-mac]
466511
steps:
512+
- uses: actions/checkout@v4
513+
with:
514+
ref: ${{ needs.configure.outputs.version_commit }}
515+
sparse-checkout: |
516+
.github
517+
518+
- name: Prevent Re-run
519+
uses: ./.github/workflows/actions/prevent-rerun
520+
467521
- uses: actions/download-artifact@v4
468522
with:
469523
name: Mac Zip
@@ -499,6 +553,16 @@ jobs:
499553
]
500554

501555
steps:
556+
- uses: actions/checkout@v4
557+
with:
558+
ref: ${{ needs.configure.outputs.version_commit }}
559+
path: quarto-cli
560+
sparse-checkout: |
561+
.github
562+
563+
- name: Prevent Re-run
564+
uses: ./quarto-cli/.github/workflows/actions/prevent-rerun
565+
502566
- name: Download Artifacts
503567
uses: actions/download-artifact@v4
504568

@@ -601,6 +665,9 @@ jobs:
601665
steps:
602666
- uses: actions/checkout@v4
603667

668+
- name: Prevent Re-run
669+
uses: ./.github/workflows/actions/prevent-rerun
670+
604671
- name: Revert commit of version.txt
605672
if: ${{ needs.configure.outputs.pushed }}
606673
run: |
@@ -614,7 +681,7 @@ jobs:
614681
git push origin $GITHUB_REF_NAME
615682
616683
- name: Deleted created tag
617-
if: ${{ needs.configure.outputs.tag_pushed }}
684+
if: ${{ needs.configure.outputs.tagged && needs.configure.outputs.tag_pushed }}
618685
run: |
619686
git push --delete origin ${{ needs.configure.outputs.tag_name }}
620687
@@ -623,10 +690,18 @@ jobs:
623690
runs-on: ubuntu-latest
624691
needs: [configure, publish-release]
625692
steps:
693+
- uses: actions/checkout@v4
694+
with:
695+
sparse-checkout: |
696+
.github
697+
698+
- name: Prevent Re-run
699+
uses: ./.github/workflows/actions/prevent-rerun
700+
626701
- name: Download Artifacts
627702
uses: actions/download-artifact@v4
628703

629-
- uses: quarto-dev/quarto-cli/.github/actions/docker@main
704+
- uses: ./.github/actions/docker
630705
with:
631706
source: ./Deb Installer/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
632707
version: ${{needs.configure.outputs.version}}

.github/workflows/test-smokes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ jobs:
235235
readarray -t my_array < <(echo '${{ inputs.buckets }}' | jq -rc '.[]')
236236
for file in "${my_array[@]}"; do
237237
echo ">>> ./run-tests.sh ${file}"
238-
./run-tests.sh $file
238+
shopt -s globstar && ./run-tests.sh $file
239239
status=$?
240240
[ $status -eq 0 ] && echo ">>> No error in this test file" || haserror=1
241241
done

news/changelog-1.8.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,40 @@ All changes included in 1.8:
2020
- ([#726](https://github.com/quarto-dev/quarto-cli/issues/726)): a11y - Provide `.screen-reader-only` callout type when callout text doesn't naturally include the type.
2121
- ([#5538](https://github.com/quarto-dev/quarto-cli/issues/5538)): Fix code-copy button style so that scrolling behaves properly.
2222
- ([#5879](https://github.com/quarto-dev/quarto-cli/issues/5879)): Improve font rendering of `kbd` shortcode on macOS. `kbd` will now also be stricter in converting keyboard shortcuts to macOS icons.
23+
- ([#8568](https://github.com/quarto-dev/quarto-cli/issues/8568)) Default inline code background color to the code block background color if not specified; foreground color is `$pre-color` in dark mode and (remains) purple in light mode.
2324
- ([#10983](https://github.com/quarto-dev/quarto-cli/issues/10983)): Fix spacing inconsistency between paras and first section headings.
2425
- ([#12259](https://github.com/quarto-dev/quarto-cli/issues/12259)): Fix conflict between `html-math-method: katex` and crossref popups (author: @benkeks).
2526
- ([#12341](https://github.com/quarto-dev/quarto-cli/issues/12341)): Enable light and dark logos for html formats (sidebar, navbar, dashboard).
27+
- ([#12643](https://github.com/quarto-dev/quarto-cli/issues/12643)): Ensure brand.yml logos using urls are rendered correctly by passing them through when resolving brand `processedData`, and not processing them as paths.
2628
- ([#12734](https://github.com/quarto-dev/quarto-cli/issues/12734)): `highlight-style` now correctly supports setting a different `light` and `dark`.
2729
- ([#12747](https://github.com/quarto-dev/quarto-cli/issues/12747)): Ensure `th` elements are properly restored when Quarto's HTML table processing is happening.
2830
- ([#12766](https://github.com/quarto-dev/quarto-cli/issues/12766)): Use consistent equation numbering display for `html-math-method` and `html-math-method.method` for MathJax and KaTeX (author: @mcanouil)
2931
- ([#12797](https://github.com/quarto-dev/quarto-cli/issues/12797)): Allow light and dark brands to be specified in one file, by specializing colors with `light:` and `dark:`.
3032
- ([#12919](https://github.com/quarto-dev/quarto-cli/issues/12919)): Ensure `kbd` shortcode output has hover tooltip.
3133
- ([#12981](https://github.com/quarto-dev/quarto-cli/issues/12981)): Brand should be applied in dark mode when dark mode is enabled by the theme, not the brand.
34+
- ([#13004](https://github.com/quarto-dev/quarto-cli/issues/13004)): Brand logo shortcode automatically applies `.light-content` and `.dark-content` classes, inserts both light and dark logo if brand mode is not specified, and uses alt text from brand logo spec.
3235

3336
### `revealjs`
3437

38+
- ([#10933](https://github.com/quarto-dev/quarto-cli/issues/10933)): Revealjs supports alt text on logo, as well as customization of light and dark logos at the document level, consistent with other formats.
39+
- ([#12550](https://github.com/quarto-dev/quarto-cli/issues/12550)): Revealjs supports `brand-mode`, allowing to select either the light or the dark brand.
3540
- ([#12598](https://github.com/quarto-dev/quarto-cli/pull/12598)): Ensure `.fragment` on an image with caption applies to whole figure.
3641
- ([#12716](https://github.com/quarto-dev/quarto-cli/issues/12716)): Correctly resolve `"brand"` set in `theme` configuration for document in subdirectory from project root.
42+
- Use `cdn.jsdelivr.net` for mathjax dependencies to ensure consistent CDN usage across formats. Previously, `cdnjs.cloudflare.com` was used for `revealjs` mathjax dependencies, while `cdn.jsdelivr.net` was used for html format.
3743

3844
### `docx`
3945

4046
- ([#8392](https://github.com/quarto-dev/quarto-cli/issues/8392)): Fix `docx` generation issues in tables
4147

4248
### `typst`
4349

50+
- ([#12180](https://github.com/quarto-dev/quarto-cli/issues/12180)): Typst schema / autocomplete for `logo` option has `path` and `alt`.
4451
- ([#12554](https://github.com/quarto-dev/quarto-cli/pull/12554)): CSS properties `font-weight` and `font-style` are translated to Typst `text` properties.
4552
- ([#12695](https://github.com/quarto-dev/quarto-cli/issues/12695)): Resolve Typst `font-paths` that start with `/` relative to project root.
4653
- ([#12739](https://github.com/quarto-dev/quarto-cli/pull/12739)): Remove unused variable `heading-background-color` and `heading-decoration` from Typst's templates. They are leftover from previous change, and not part of Brand.yml schema for typography of headings.
4754
- ([#12815](https://github.com/quarto-dev/quarto-cli/issues/12815)): Do not crash when floats have no content.
55+
- ([#13119](https://github.com/quarto-dev/quarto-cli/pull/13119)): Expose `brand.logo` metadata as Typst dictionaries.
56+
- ([#13133](https://github.com/quarto-dev/quarto-cli/pull/13133)): Allow customization of light and dark logos at document level, consistent with other formats.
4857

4958
### `beamer`
5059

@@ -67,12 +76,15 @@ All changes included in 1.8:
6776

6877
- ([#12615](https://github.com/quarto-dev/quarto-cli/pull/12615)): Adds `algorithm` to theorem environments. (author: @jeremy9959)
6978

70-
## Lua Filters
79+
## Lua Filters and API
7180

81+
- ([#11750](https://github.com/quarto-dev/quarto-cli/pull/11750)): Extend filter path resolution to support `at`/`path` filters from extensions.
7282
- ([#12727](https://github.com/quarto-dev/quarto-cli/issues/12727)): Do not crash in the presence of malformed tabset contents.
7383
- ([#12806](https://github.com/quarto-dev/quarto-cli/pull/12806)): Use pandoc APIs to handle codepage conversion on Windows.
7484
- ([#12811](https://github.com/quarto-dev/quarto-cli/pull/12811)): Add support for YouTube Shorts in `video` shortcode.
75-
- ([#11750](https://github.com/quarto-dev/quarto-cli/pull/11750)): Extend filter path resolution to support `at`/`path` filters from extensions.
85+
- ([#13112](https://github.com/quarto-dev/quarto-cli/pull/13112)): Add `quarto.format.format_identifier()` API entry.
86+
- ([#13128](https://github.com/quarto-dev/quarto-cli/issues/13128)): Avoid meta shortcode crash on bad input.
87+
- ([#13246](https://github.com/quarto-dev/quarto-cli/pull/13246)): Add `quarto.variables.get()` and `quarto.metadata.get()` APIs.
7688

7789
## Commands
7890

@@ -88,13 +100,19 @@ All changes included in 1.8:
88100

89101
- ([#12965](https://github.com/quarto-dev/quarto-cli/issues/12965)): Prevent automatic opening of new editor sessions when creating projects in Posit Workbench context. The `--open` flag is now ignored in this environment to avoid issues with Workbench session management.
90102

103+
## Extensions
104+
105+
- ([#12559](https://github.com/quarto-dev/quarto-cli/issues/12559)): New extension type: `brand` for distributing [brand.yml](https://posit-dev.github.io/brand-yml/) configurations with associated assets.
106+
91107
## Engines
92108

109+
- ([#13171](https://github.com/quarto-dev/quarto-cli/pull/13171/)): Provide execution information to all engines uniformly via QUARTO_EXECUTE_INFO environment variable. It points to a file on disk containing a JSON object describing the execution environment for code cells to use.
110+
93111
### `jupyter`
94112

95113
- ([#12753](https://github.com/quarto-dev/quarto-cli/issues/12753)): Support change in IPython 9+ and import `set_matplotlib_formats` from `matplotlib_inline.backend_inline` in the internal `setup.py` script used to initialize rendering with Jupyter engine.
96114
- ([#12839](https://github.com/quarto-dev/quarto-cli/issues/12839)): Support for `plotly.py` 6+ which now loads plotly.js using a cdn in script as a module.
97-
- ([#13026](https://github.com/quarto-dev/quarto-cli/pulls/13026)): Use `jsdelivr` CDN for jupyter widgets dependencies.
115+
- ([#13026](https://github.com/quarto-dev/quarto-cli/pull/13026), [#13151](https://github.com/quarto-dev/quarto-cli/pull/13151)), [#13184](https://github.com/quarto-dev/quarto-cli/pull/13184): Use `jsdelivr` CDN for jupyter widgets dependencies.
98116

99117
### `knitr`
100118

@@ -104,9 +122,21 @@ All changes included in 1.8:
104122

105123
- ([#12870](https://github.com/quarto-dev/quarto-cli/pull/12870)): Update `julia` engine from `0.17.0` to `0.17.3` to improve `juliaup` detection on Windows systems and correctly set `Base.source_path()` output to match REPL and script usage.
106124

125+
## Languages
126+
127+
- ([#13098](https://github.com/quarto-dev/quarto-cli/pull/13098)): Fox a minor inappropriate phrasing in the Chinese localization of `environment-proof-title` (@sun123xyz).
128+
107129
## Other fixes and improvements
108130

109131
- ([#11321](https://github.com/quarto-dev/quarto-cli/issues/11321)): Follow [recommendation from LaTeX project](https://latex-project.org/news/latex2e-news/ltnews40.pdf) and use `lualatex` instead of `xelatex` as the default PDF engine.
110132
- ([#12782](https://github.com/quarto-dev/quarto-cli/pull/12782)): fix bug on `safeRemoveDirSync`'s detection of safe directory boundaries.
111133
- ([#12853](https://github.com/quarto-dev/quarto-cli/issues/12853)): fix replaceAll() escaping issue with embedded notebooks containing `$` in their Markdown.
112134
- ([#12939](https://github.com/quarto-dev/quarto-cli/pull/12939)): Upgrade `mermaidjs` to 11.6.0.
135+
- ([#13031](https://github.com/quarto-dev/quarto-cli/pull/13031)): Add `.quarto_ipynb` files to `.gitignore` by default.
136+
- ([#13085](https://github.com/quarto-dev/quarto-cli/pull/13085)): Avoid `kbd` shortcode crashes on unknown OS keys.
137+
- ([#13164](https://github.com/quarto-dev/quarto-cli/pull/13164)): add `julia` to execute schema to allow autocomplete suggestions. (@mcanouil)
138+
139+
140+
## Quarto Internals
141+
142+
- ([#13155](https://github.com/quarto-dev/quarto-cli/pull/13155)): Process `pandoc-reader-FORMAT` raw blocks through `pandoc.read(FORMAT)`

src/command/create/artifacts/extension.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const kExtensionTypes: Array<string | ExtensionType> = [
4141
{ name: "journal format", value: "journal", openfiles: ["template.qmd"] },
4242
{ name: "custom format", value: "format", openfiles: ["template.qmd"] },
4343
{ name: "metadata", value: "metadata", openfiles: [] },
44+
{ name: "brand", value: "brand", openfiles: [] },
4445
];
4546

4647
const kExtensionSubtypes: Record<string, string[]> = {

src/command/render/project.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
} from "../../deno_ral/fs.ts";
1515
import { dirname, isAbsolute, join, relative } from "../../deno_ral/path.ts";
1616
import { info, warning } from "../../deno_ral/log.ts";
17-
import { mergeProjectMetadata } from "../../config/metadata.ts";
1817

1918
import * as colors from "fmt/colors";
2019

@@ -80,7 +79,6 @@ import { Format } from "../../config/types.ts";
8079
import { fileExecutionEngine } from "../../execute/engine.ts";
8180
import { projectContextForDirectory } from "../../project/project-context.ts";
8281
import { ProjectType } from "../../project/types/types.ts";
83-
import { Zod } from "../../resources/types/zod/schema-types.ts";
8482

8583
const noMutationValidations = (
8684
projType: ProjectType,
@@ -242,37 +240,11 @@ const getProjectRenderScripts = async (
242240
return { preRenderScripts, postRenderScripts };
243241
};
244242

245-
const mergeExtensionMetadata = async (
246-
context: ProjectContext,
247-
pOptions: RenderOptions,
248-
) => {
249-
// this will mutate context.config.project to merge
250-
// in any project metadata from extensions
251-
if (context.config) {
252-
const extensions = await pOptions.services.extension.extensions(
253-
undefined,
254-
context.config,
255-
context.isSingleFile ? undefined : context.dir,
256-
{ builtIn: false },
257-
);
258-
const projectMetadata = extensions.filter((extension) =>
259-
extension.contributes.metadata?.project
260-
).map((extension) => {
261-
return Zod.ProjectConfig.parse(extension.contributes.metadata!.project);
262-
});
263-
context.config.project = mergeProjectMetadata(
264-
context.config.project,
265-
...projectMetadata,
266-
);
267-
}
268-
};
269-
270243
export async function renderProject(
271244
context: ProjectContext,
272245
pOptions: RenderOptions,
273246
pFiles?: string[],
274247
): Promise<RenderResult> {
275-
await mergeExtensionMetadata(context, pOptions);
276248
const { preRenderScripts, postRenderScripts } = await getProjectRenderScripts(
277249
context,
278250
);

0 commit comments

Comments
 (0)