From b23aee478da9ecdfbbd8d6d4fa0d359f242d651c Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Tue, 25 Feb 2025 15:18:28 +0000 Subject: [PATCH] Fix plugin tests. --- packages/server/src/utilities/fileSystem/plugin.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/server/src/utilities/fileSystem/plugin.ts b/packages/server/src/utilities/fileSystem/plugin.ts index 1c62e9c1e9..15238637c1 100644 --- a/packages/server/src/utilities/fileSystem/plugin.ts +++ b/packages/server/src/utilities/fileSystem/plugin.ts @@ -14,7 +14,7 @@ export const getPluginMetadata = async ( let pkg: any let schema: any try { - pkg = JSON.parse(fs.readFileSync(join(path, "pkg.json"), "utf8")) + pkg = JSON.parse(fs.readFileSync(join(path, "package.json"), "utf8")) schema = JSON.parse(fs.readFileSync(join(path, "schema.json"), "utf8")) if (!pkg.name) { throw new Error("package.json is missing 'name'.") @@ -27,7 +27,8 @@ export const getPluginMetadata = async ( } } catch (err: any) { throw new Error( - `Unable to process schema.json/package.json in plugin. ${err.message}` + `Unable to process schema.json/package.json in plugin. ${err.message}`, + { cause: err } ) }