diff --git a/src/plugins/status-dependencies.ts b/src/plugins/status-dependencies.ts index 5062c944286..5eece5c00e5 100644 --- a/src/plugins/status-dependencies.ts +++ b/src/plugins/status-dependencies.ts @@ -91,13 +91,16 @@ function buildDependencyEntries(params: { const resolvedPath = params.rootDir ? findDependencyPackageDir({ fromDir: params.rootDir, name }) : undefined; - return { + const entry: PluginDependencyEntry = { name, spec, installed: resolvedPath !== undefined, optional: params.optional, - ...(resolvedPath ? { resolvedPath } : {}), }; + if (resolvedPath) { + entry.resolvedPath = resolvedPath; + } + return entry; }); }