Skip to content

Commit 2bc5993

Browse files
authored
Merge branch 'main' into chore/pandoc-3.6
2 parents 4387e6f + 6164de8 commit 2bc5993

23 files changed

Lines changed: 1871 additions & 1271 deletions

File tree

news/changelog-1.7.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ All changes included in 1.7:
4141

4242
- ([#12042](https://github.com/quarto-dev/quarto-cli/issues/12042)): Preserve Markdown content that follows YAML metadata in a `raw` .ipynb cell.
4343

44+
## `quarto inspect`
45+
46+
- ([#12336](https://github.com/quarto-dev/quarto-cli/issues/12336)): Clean up transient files created by `quarto inspect`.
47+
4448
## `html` format
4549

4650
- ([#12277](https://github.com/quarto-dev/quarto-cli/pull/12277)): Provide light and dark plot and table renderings with `renderings: [light,dark]`
@@ -102,6 +106,7 @@ All changes included in 1.7:
102106

103107
- ([#12121](https://github.com/quarto-dev/quarto-cli/pull/12121)): Update QuartoNotebookRunner to 0.14.0. Support for evaluating Python cells via [PythonCall.jl](https://github.com/JuliaPy/PythonCall.jl) added. Support for notebook caching via `execute.cache` added.
104108
- ([#12151](https://github.com/quarto-dev/quarto-cli/pull/12151)): Basic YAML validation is now active for document using Julia engine.
109+
- ([#11803](https://github.com/quarto-dev/quarto-cli/pull/11803)): Added subcommands `status`, `kill`, `close [--force]` and `log` under the new CLI command `quarto call engine julia`.
105110

106111
### `jupyter`
107112

@@ -119,3 +124,4 @@ All changes included in 1.7:
119124
- ([#11951](https://github.com/quarto-dev/quarto-cli/issues/11951)): Raw LaTeX table without `tbl-` prefix label for using Quarto crossref are now correctly passed through unmodified.
120125
- ([#12117](https://github.com/quarto-dev/quarto-cli/issues/12117)): Color output to stdout and stderr is now correctly rendered for `html` format in the Jupyter and Julia engines.
121126
- ([#12264](https://github.com/quarto-dev/quarto-cli/issues/12264)): Upgrade `dart-sass` to 1.85.1.
127+
- ([#11803](https://github.com/quarto-dev/quarto-cli/pull/11803)): Added a new CLI command `quarto call`. First users of this interface are the new `quarto call engine julia ...` subcommands.

src/command/call/cmd.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Command } from "cliffy/command/mod.ts";
2+
import { engineCommand } from "../../execute/engine.ts";
3+
4+
export const callCommand = new Command()
5+
.name("call")
6+
.description("Access functions of Quarto subsystems such as its rendering engines.")
7+
.action(() => {
8+
callCommand.showHelp();
9+
Deno.exit(1);
10+
}).command("engine", engineCommand);

src/command/command.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { addCommand } from "./add/cmd.ts";
2929
import { uninstallCommand } from "./uninstall/cmd.ts";
3030
import { createCommand } from "./create/cmd.ts";
3131
import { editorSupportCommand } from "./editor-support/cmd.ts";
32+
import { callCommand } from "./call/cmd.ts";
3233

3334
// deno-lint-ignore no-explicit-any
3435
export function commands(): Command<any>[] {
@@ -57,5 +58,6 @@ export function commands(): Command<any>[] {
5758
checkCommand,
5859
buildJsCommand,
5960
editorSupportCommand,
61+
callCommand,
6062
];
6163
}

src/core/sass.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export async function compileSass(
186186
);
187187
scssInput = scssToWrite.join("\n");
188188
Deno.writeTextFileSync(
189-
`${saveScssPrefix}-${counter}.scss`,
189+
`${saveScssPrefix}-${counter - 1}.scss`,
190190
scssInput,
191191
);
192192
}

src/core/temp.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ export function globalTempContext() {
5555
}
5656

5757
export function createTempContext(options?: Deno.MakeTempOptions): TempContext {
58+
if (options?.dir) {
59+
ensureDirSync(options?.dir);
60+
}
5861
let dir: string | undefined = Deno.makeTempDirSync({
59-
...options,
6062
dir: tempDir,
63+
...options,
6164
});
6265

6366
const tempContextCleanupHandlers: VoidFunction[] = [];

src/execute/engine.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { pandocBuiltInFormats } from "../core/pandoc/pandoc-formats.ts";
3131
import { gitignoreEntries } from "../project/project-gitignore.ts";
3232
import { juliaEngine } from "./julia.ts";
3333
import { ensureFileInformationCache } from "../project/project-shared.ts";
34+
import { Command } from "cliffy/command/mod.ts";
3435

3536
const kEngines: Map<string, ExecutionEngine> = new Map();
3637

@@ -276,3 +277,30 @@ export function projectIgnoreGlobs(dir: string) {
276277
gitignoreEntries(dir).map((ignore) => `**/${ignore}**`),
277278
);
278279
}
280+
281+
export const engineCommand = new Command()
282+
.name("engine")
283+
.description(
284+
`Access functionality specific to quarto's different rendering engines.`,
285+
)
286+
.action(() => {
287+
engineCommand.showHelp();
288+
Deno.exit(1);
289+
});
290+
291+
kEngines.forEach((engine, name) => {
292+
if (engine.populateCommand) {
293+
const engineSubcommand = new Command();
294+
// fill in some default behavior for each engine command
295+
engineSubcommand
296+
.description(
297+
`Access functionality specific to the ${name} rendering engine.`,
298+
)
299+
.action(() => {
300+
engineSubcommand.showHelp();
301+
Deno.exit(1);
302+
});
303+
engine.populateCommand(engineSubcommand);
304+
engineCommand.command(name, engineSubcommand);
305+
}
306+
});

0 commit comments

Comments
 (0)