From 4da4ea603782b01dfc3df12665770700306a15bf Mon Sep 17 00:00:00 2001 From: Hafiz Muhammad Moaz Date: Tue, 28 Jul 2026 01:43:39 +0500 Subject: [PATCH] Declare the module's JS dependencies in a package.json The package shipped only a composer.json, so its frontend dependencies were invisible and unversioned at the package level: every library the module's own code imports was declared solely in the host app's package.json. Nothing recorded that this module needs them, and dropping one from the host would break this module silently. package.json lists what the module's frontend actually imports, pinned to the versions the host already resolves. They are peerDependencies rather than dependencies because the host compiles the module's JS and resolves it from the host's node_modules; the module does not install its own copy, and a second copy of React or the Inertia client would break the app rather than duplicate it. Deliberately no build script yet. A module cannot compile standalone: its frontend imports the host app's UI kit, layouts, hooks and contexts through the @/ alias, which resolves into the host's resources/js. Shipping a build script that cannot produce a usable bundle would be worse than shipping none. See zerp-pk/zerp#56 for the analysis and the options. --- package.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..55e822c --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "@zerp/taskly", + "version": "5.0.0", + "description": "Project management module for the Zerp ERP platform", + "license": "MIT", + "private": true, + "peerDependencies": { + "@inertiajs/react": "^1.0.0", + "axios": "^1.6.4", + "lucide-react": "^0.378.0", + "react": "^18.2.0", + "react-i18next": "^15.6.1", + "sonner": "^2.0.7" + } +}