Backporting a bunch of optimizations from db-only branch

This commit is contained in:
Zef Hemel
2024-01-13 17:30:15 +01:00
parent 509ece91f0
commit bf1eb03129
24 changed files with 264 additions and 104 deletions
+1 -1
View File
@@ -91,7 +91,6 @@ export async function performQuery(parsedQuery: Query, pageObject: PageMeta) {
export async function lintQuery(
{ name, tree }: LintEvent,
): Promise<LintDiagnostic[]> {
const pageObject = await loadPageObject(name);
const diagnostics: LintDiagnostic[] = [];
await traverseTreeAsync(tree, async (node) => {
if (node.type === "FencedCode") {
@@ -111,6 +110,7 @@ export async function lintQuery(
}
const bodyText = codeText.children![0].text!;
try {
const pageObject = await loadPageObject(name);
const parsedQuery = await parseQuery(
await replaceTemplateVars(bodyText, pageObject),
);