Add packagePath to plugin info

Provide the absolute path to the package.json file in the resolved
plugin info to simplify the logic around loading files from it.
This commit is contained in:
Hornwitser committed 2026-09-11 19:51:15 +02:00
1 parent d6dce12acc
commit 30083b96c1
8 files changed
+20 -18

No files matched your search

+1 -1
View File
@@ -241,7 +241,7 @@ describe("controller/src/Controller", function() {
controller.config.set("global_chat.load_plugin", true);
controller.pluginInfos[0] = {
name: "global_chat",
requirePath: path.dirname(require.resolve("@clusterio/controller/package.json")),
packagePath: require.resolve("@clusterio/controller/package.json"),
version: controllerVersion,
};
});