Skip to content

Commit 78188a6

Browse files
authored
Merge branch 'quarto-dev:main' into main
2 parents 72c5a29 + 7d809d7 commit 78188a6

File tree

38 files changed

+1445
-1076
lines changed

38 files changed

+1445
-1076
lines changed

CITATION.cff

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ authors:
1616
- family-names: "Dervieux"
1717
given-names: "Christophe"
1818
orcid: "https://orcid.org/0000-0003-4474-2498"
19+
- family-names: "Woodhull"
20+
given-names: "Gordon"
21+
orcid: "https://orcid.org/0009-0005-1809-8936"
1922
title: "Quarto"
20-
version: 1.4
23+
version: 1.6
2124
doi: 10.5281/zenodo.5960048
22-
date-released: 2024-02-15
25+
date-released: 2024-11-27
2326
url: "https://github.com/quarto-dev/quarto-cli"

dev-docs/checklist-make-a-new-quarto-release.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
- [ ] publish the release blog post that should exist in https://github.com/quarto-dev/quarto-web/tree/main/docs/blog/posts
4646
by removing the `draft: true` line in the metadata and changing the date to match the release date. Do this on a branch off of `main` to trigger our PR automation to make the corresponding change to `prerelease`.
4747

48+
- [ ] Update https://github.com/quarto-dev/quarto-cli/blob/main/CITATION.cff
4849
- [ ] Packaging and package managers, etc
4950
- TBD winget, etc?
5051
- [ ] chocolatey

news/changelog-1.7.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,18 @@ All changes included in 1.7:
2525

2626
- ([#11608](https://github.com/quarto-dev/quarto-cli/pull/11608)): Do not issue error message when calling `quarto check info`.
2727

28-
## `typst` Format
28+
## `html` format
29+
30+
- ([#11860])(https://github.com/quarto-dev/quarto-cli/issues/11860)): ES6 modules that import other local JS modules in documents with `embed-resources: true` are now correctly embedded.
31+
32+
## `pdf` format
33+
34+
- ([#11835](https://github.com/quarto-dev/quarto-cli/issues/11835)): Take markdown structure into account when detecting minimum heading level.
35+
36+
## `typst` format
2937

3038
- ([#11578](https://github.com/quarto-dev/quarto-cli/issues/11578)): Typst column layout widths use fractional `fr` units instead of percent `%` units for unitless and default widths in order to fill the enclosing block and not spill outside it.
39+
- ([#11835](https://github.com/quarto-dev/quarto-cli/issues/11835)): Take markdown structure into account when detecting minimum heading level.
3140

3241
## Lua Filters and extensions
3342

package/src/common/prepare-dist.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ function inlineFilters(config: Configuration) {
238238
{ name: "crossref" },
239239
{ name: "customwriter" },
240240
{ name: "qmd-reader", dir: "." },
241+
{ name: "leveloneanalysis", dir: "quarto-internals"}
241242
];
242243

243244
filtersToInline.forEach((filter) => {

src/core/config.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@
55
*/
66

77
import * as ld from "./lodash.ts";
8+
import { makeTimedFunction } from "./performance/function-times.ts";
89

9-
export function mergeConfigs<T>(config: T, ...configs: Array<unknown>): T {
10-
// copy all configs so we don't mutate them
11-
config = ld.cloneDeep(config);
12-
configs = ld.cloneDeep(configs);
10+
export const mergeConfigs = makeTimedFunction(
11+
"mergeConfigs",
12+
function mergeConfigs<T>(config: T, ...configs: Array<unknown>): T {
13+
// copy all configs so we don't mutate them
14+
config = ld.cloneDeep(config);
15+
configs = ld.cloneDeep(configs);
1316

14-
return ld.mergeWith(
15-
config,
16-
...configs,
17-
mergeArrayCustomizer,
18-
);
19-
}
17+
return ld.mergeWith(
18+
config,
19+
...configs,
20+
mergeArrayCustomizer,
21+
);
22+
},
23+
);
2024

2125
export function mergeArrayCustomizer(objValue: unknown, srcValue: unknown) {
2226
if (ld.isArray(objValue) || ld.isArray(srcValue)) {

src/core/data-url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { encode as base64Encode } from "encoding/base64";
1+
import { encodeBase64 as base64Encode } from "encoding/base64";
22

33
export function asDataUrl(
44
content: string | ArrayBuffer,

src/core/deno-dom.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,24 @@ import { debug } from "../deno_ral/log.ts";
99
import { HTMLDocument, initParser } from "deno_dom/deno-dom-wasm-noinit.ts";
1010
import { register } from "deno_dom/src/parser.ts";
1111
import { DOMParser } from "deno_dom/src/dom/dom-parser.ts";
12+
import { makeTimedFunctionAsync } from "./performance/function-times.ts";
1213

1314
export async function getDomParser() {
1415
await initDenoDom();
1516
return new DOMParser();
1617
}
1718

18-
export async function parseHtml(src: string): Promise<HTMLDocument> {
19-
await initDenoDom();
20-
const result = (new DOMParser()).parseFromString(src, "text/html");
21-
if (!result) {
22-
throw new Error("Couldn't parse string into HTML");
23-
}
24-
return result;
25-
}
19+
export const parseHtml = makeTimedFunctionAsync(
20+
"parseHtml",
21+
async function parseHtml(src: string): Promise<HTMLDocument> {
22+
await initDenoDom();
23+
const result = (new DOMParser()).parseFromString(src, "text/html");
24+
if (!result) {
25+
throw new Error("Couldn't parse string into HTML");
26+
}
27+
return result;
28+
},
29+
);
2630

2731
export async function writeDomToHtmlFile(
2832
doc: HTMLDocument,

src/core/esbuild.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ export async function esbuildCommand(
106106
if (result.success) {
107107
return result.stdout;
108108
} else {
109+
console.error(result.stderr);
110+
109111
throw new Error("esbuild command failed");
110112
}
111113
}

src/core/lib/break-quarto-md.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (C) 2021-2022 Posit Software, PBC
88
*/
99

10-
import { lineOffsets, lines } from "./text.ts";
10+
import { lineOffsets } from "./text.ts";
1111
import { Range, rangedLines, RangedSubstring } from "./ranged-text.ts";
1212
import {
1313
asMappedString,

src/core/lib/is-circular.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* is-circular.ts
3+
*
4+
* Copyright (C) 2025 Posit Software, PBC
5+
*/
6+
7+
// deno-lint-ignore no-explicit-any
8+
export const isCircular = (obj: any): unknown => {
9+
const objectSet = new WeakSet();
10+
// deno-lint-ignore no-explicit-any
11+
const detect = (obj: any): boolean => {
12+
if (obj && typeof obj === "object") {
13+
if (objectSet.has(obj)) {
14+
return true;
15+
}
16+
objectSet.add(obj);
17+
for (const key in obj) {
18+
if (Object.hasOwn(obj, key) && detect(obj[key])) {
19+
return true;
20+
}
21+
}
22+
objectSet.delete(obj);
23+
}
24+
return false;
25+
};
26+
return detect(obj);
27+
};

0 commit comments

Comments
 (0)