pub async fn run_dep_hook(
package_dir: &Path,
project_root: &Path,
modules_dir_name: &str,
manifest: &PackageJson,
hook: LifecycleHook,
) -> Result<bool, Error>Expand description
Run a lifecycle hook against an installed dependency’s package
directory. Mirrors run_root_hook but spawns inside package_dir
(the actual linked package directory, e.g.
node_modules/.aube/<dep_path>/node_modules/<name>). The manifest
is the dependency’s own package.json, not the project root’s.
For the install hook specifically, if the manifest leaves both
install and preinstall empty but the package has a top-level
binding.gyp, this falls back to running node-gyp rebuild — the
node-gyp default that npm and pnpm both honor so native modules
without a prebuilt binary still compile on install.
The caller is responsible for gating on BuildPolicy and
--ignore-scripts. Returns Ok(false) if the hook wasn’t defined.