From 458c7ed4c5035e125a497c192e71737f946ff302 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 23 May 2023 00:25:48 -0300 Subject: Make Fake Nitro transformations support the new markdown (#911) --- scripts/generatePluginList.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/generatePluginList.ts b/scripts/generatePluginList.ts index 7c273de..87c32ab 100644 --- a/scripts/generatePluginList.ts +++ b/scripts/generatePluginList.ts @@ -19,8 +19,7 @@ import { Dirent, readdirSync, readFileSync, writeFileSync } from "fs"; import { access, readFile } from "fs/promises"; import { join } from "path"; -import { isSatisfiesExpression } from "typescript"; -import { BigIntLiteral, createSourceFile, Identifier, isArrayLiteralExpression, isCallExpression, isExportAssignment, isIdentifier, isObjectLiteralExpression, isPropertyAccessExpression, isPropertyAssignment, isStringLiteral, isVariableStatement, NamedDeclaration, NodeArray, ObjectLiteralExpression, ScriptTarget, StringLiteral, SyntaxKind } from "typescript"; +import { BigIntLiteral, createSourceFile, Identifier, isArrayLiteralExpression, isCallExpression, isExportAssignment, isIdentifier, isObjectLiteralExpression, isPropertyAccessExpression, isPropertyAssignment, isSatisfiesExpression, isStringLiteral, isVariableStatement, NamedDeclaration, NodeArray, ObjectLiteralExpression, ScriptTarget, StringLiteral, SyntaxKind } from "typescript"; interface Dev { name: string; @@ -131,7 +130,9 @@ async function parseFile(fileName: string) { if (!isArrayLiteralExpression(value)) throw fail("authors is not an array literal"); data.authors = value.elements.map(e => { if (!isPropertyAccessExpression(e)) throw fail("authors array contains non-property access expressions"); - return devs[getName(e)!]; + const d = devs[getName(e)!]; + if (!d) throw fail(`couldn't look up author ${getName(e)}`); + return d; }); break; case "tags": -- cgit