Skip to content

Commit ebe0838

Browse files
authored
Merge branch 'main' into bugfix/quarto-check-info
2 parents b4e0c5a + 238afdb commit ebe0838

File tree

21 files changed

+113
-48
lines changed

21 files changed

+113
-48
lines changed

news/changelog-1.7.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ All changes included in 1.7:
22

33
## Regression fixes
44

5-
- ([#11532](https://github.com/quarto-dev/quarto-cli/issues/11532)): Fix regression for [#660](https://github.com/quarto-dev/quarto-cli/issues/660), which causes files to have incorrect permissions when Quarto is installed in a location not writable by the current user.
65
- ([#11509](https://github.com/quarto-dev/quarto-cli/issues/11509)): Fix link-decoration regression in HTML formats.
6+
- ([#11532](https://github.com/quarto-dev/quarto-cli/issues/11532)): Fix regression for [#660](https://github.com/quarto-dev/quarto-cli/issues/660), which causes files to have incorrect permissions when Quarto is installed in a location not writable by the current user.
7+
- ([#11580](https://github.com/quarto-dev/quarto-cli/issues/11580)): Fix regression with documents containing `categories` fields that are not strings.
78

89
## `quarto check`
910

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

package/src/util/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export async function download(src: string, dest: string): Promise<void> {
2525

2626
const file = await Deno.create(dest);
2727
await writeAll(file, contents);
28-
Deno.close(file.rid);
28+
file.close();
2929
}
3030

3131
export async function unzip(

src/core/console.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export function writeFileToStdout(file: string) {
174174
const df = Deno.openSync(file, { read: true });
175175
const contents = readAllSync(df);
176176
writeAllSync(Deno.stdout, contents);
177-
Deno.close(df.rid);
177+
df.close();
178178
}
179179

180180
export function clearLine() {

src/core/performance/metrics.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -41,37 +41,4 @@ export function reportPeformanceMetrics() {
4141
console.log("Performance metrics");
4242
console.log("Quarto:");
4343
console.log(JSON.stringify(quartoPerformanceMetrics(), null, 2));
44-
console.log();
45-
// denoMetrics is some kind of fancy object that doesn't respond
46-
// to a bunch of the normal methods. So we have to do this
47-
// the JSON-round-trip way.
48-
console.log("Deno:");
49-
const denoMetrics = JSON.parse(JSON.stringify(Deno.metrics() as any));
50-
denoMetrics.ops = Object.fromEntries(
51-
Object.entries(denoMetrics.ops).map(
52-
([key, opMetrics]: any) => {
53-
for (const key of Object.keys(opMetrics)) {
54-
if (opMetrics[key] === 0) {
55-
delete opMetrics[key];
56-
}
57-
}
58-
return [key, opMetrics];
59-
},
60-
).filter(([_key, opMetrics]: any) => Object.keys(opMetrics).length > 0)
61-
.map(([key, opMetrics]: any) => {
62-
if (
63-
(opMetrics.opsDispatched === opMetrics.opsDispatchedSync &&
64-
opMetrics.opsDispatched === opMetrics.opsCompleted &&
65-
opMetrics.opsDispatched === opMetrics.opsCompletedSync) ||
66-
(opMetrics.opsDispatched === opMetrics.opsDispatchedAsync &&
67-
opMetrics.opsDispatched === opMetrics.opsCompleted &&
68-
opMetrics.opsDispatched === opMetrics.opsCompletedAsync)
69-
) {
70-
return [key, opMetrics.opsDispatched];
71-
} else {
72-
return [key, opMetrics];
73-
}
74-
}),
75-
);
76-
console.log(JSON.stringify(denoMetrics, null, 2));
7744
}

src/core/platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function jupyterHubServicePrefix() {
8787
}
8888

8989
export function isInteractiveTerminal() {
90-
return Deno.isatty(Deno.stderr.rid);
90+
return Deno.stderr.isTerminal();
9191
}
9292

9393
export function isInteractiveSession() {

src/core/process.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import { MuxAsyncIterator, pooledMap } from "async";
88
import { iterateReader } from "io/iterate-reader";
9+
import { type Closer, type Reader } from "io/types";
910
import { debug, info } from "../deno_ral/log.ts";
1011
import { onCleanup } from "./cleanup.ts";
1112
import { ProcessResult } from "./process-types.ts";
@@ -104,7 +105,7 @@ export async function execProcess(
104105

105106
// Add streams to the multiplexer
106107
const addStream = (
107-
stream: (Deno.Reader & Deno.Closer) | null,
108+
stream: (Reader & Closer) | null,
108109
filter?: (output: string) => string,
109110
) => {
110111
if (stream !== null) {
@@ -131,7 +132,7 @@ export async function execProcess(
131132
}
132133

133134
// Close the streams
134-
const closeStream = (stream: (Deno.Reader & Deno.Closer) | null) => {
135+
const closeStream = (stream: (Reader & Closer) | null) => {
135136
if (stream) {
136137
stream.close();
137138
}

src/project/types/website/listing/website-listing-feed.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ async function generateFeed(
517517
escape,
518518
},
519519
);
520-
await Deno.write(feedFile.rid, textEncoder.encode(preamble));
520+
await feedFile.write(textEncoder.encode(preamble));
521521

522522
for (const feedItem of feedItems) {
523523
const item = renderEjs(
@@ -527,7 +527,7 @@ async function generateFeed(
527527
escape,
528528
},
529529
);
530-
await Deno.write(feedFile.rid, textEncoder.encode(item));
530+
await feedFile.write(textEncoder.encode(item));
531531
}
532532

533533
// Render the postamble
@@ -538,9 +538,9 @@ async function generateFeed(
538538
escape,
539539
},
540540
);
541-
await Deno.write(feedFile.rid, textEncoder.encode(postamble));
541+
await feedFile.write(textEncoder.encode(postamble));
542542
} finally {
543-
Deno.close(feedFile.rid);
543+
feedFile.close();
544544
}
545545
}
546546

src/project/types/website/website.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ import { projectDraftMode } from "./website-utils.ts";
8989
import { kFieldCategories } from "./listing/website-listing-shared.ts";
9090
import { pandocNativeStr } from "../../../core/pandoc/codegen.ts";
9191
import { asArray } from "../../../core/array.ts";
92+
import { InternalError } from "../../../core/lib/error.ts";
9293

9394
export const kSiteTemplateDefault = "default";
9495
export const kSiteTemplateBlog = "blog";
@@ -207,8 +208,12 @@ export const websiteProjectType: ProjectType = {
207208
extras.metadataOverride[kFieldCategories] = asArray(
208209
format.metadata[kFieldCategories],
209210
).map(
210-
(category) =>
211-
pandocNativeStr(category as string).mappedString().value,
211+
(category) => {
212+
const strCategory: string = typeof category === "string"
213+
? category
214+
: category.toString();
215+
return pandocNativeStr(strCategory).mappedString().value;
216+
},
212217
);
213218
}
214219

src/publish/common/publish.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ function stageDocumentPublish(title: string, publishFiles: PublishFiles) {
267267
const publishDir = globalTempContext().createDir();
268268

269269
// copy all files to it
270-
const stagedFiles = window.structuredClone(publishFiles) as PublishFiles;
270+
const stagedFiles = globalThis.structuredClone(publishFiles) as PublishFiles;
271271
stagedFiles.baseDir = publishDir;
272272
for (const file of publishFiles.files) {
273273
const src = join(publishFiles.baseDir, file);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.quarto/

0 commit comments

Comments
 (0)