From e56207df6534c095fe2dde91aeda759b2a46e52d Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Tue, 24 Oct 2023 15:30:06 +0300 Subject: [PATCH] refactor: rootProjectManifestDir --- pkg-manager/plugin-commands-installation/src/import/index.ts | 2 +- pkg-manager/plugin-commands-installation/src/installDeps.ts | 2 +- pkg-manager/plugin-commands-installation/src/link.ts | 2 +- pkg-manager/plugin-commands-installation/src/remove.ts | 2 +- pkg-manager/plugin-commands-installation/src/unlink.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg-manager/plugin-commands-installation/src/import/index.ts b/pkg-manager/plugin-commands-installation/src/import/index.ts index bfb38b20e9..313e269ce6 100644 --- a/pkg-manager/plugin-commands-installation/src/import/index.ts +++ b/pkg-manager/plugin-commands-installation/src/import/index.ts @@ -169,7 +169,7 @@ export async function handler ( const store = await createOrConnectStoreController(opts) const manifest = await readProjectManifestOnly(opts.dir) - const manifestOpts = opts.rootProjectManifest ? getOptionsFromRootManifest(opts.rootProjectManifestDir!, opts.rootProjectManifest) : {} + const manifestOpts = opts.rootProjectManifest ? getOptionsFromRootManifest(opts.rootProjectManifestDir, opts.rootProjectManifest) : {} const installOpts = { ...opts, ...manifestOpts, diff --git a/pkg-manager/plugin-commands-installation/src/installDeps.ts b/pkg-manager/plugin-commands-installation/src/installDeps.ts index 754e8286d3..2ec4be7e8e 100644 --- a/pkg-manager/plugin-commands-installation/src/installDeps.ts +++ b/pkg-manager/plugin-commands-installation/src/installDeps.ts @@ -188,7 +188,7 @@ when running add/update with the --workspace option') params, { ...opts, - ...getOptionsFromRootManifest(opts.rootProjectManifestDir!, opts.rootProjectManifest ?? {}), + ...getOptionsFromRootManifest(opts.rootProjectManifestDir, opts.rootProjectManifest ?? {}), forceHoistPattern, forcePublicHoistPattern, allProjectsGraph, diff --git a/pkg-manager/plugin-commands-installation/src/link.ts b/pkg-manager/plugin-commands-installation/src/link.ts index 39bd28c1e8..063dbb0786 100644 --- a/pkg-manager/plugin-commands-installation/src/link.ts +++ b/pkg-manager/plugin-commands-installation/src/link.ts @@ -174,7 +174,7 @@ export async function handler ( await install( await readProjectManifestOnly(dir, opts), { ...config, - ...getOptionsFromRootManifest(config.rootProjectManifestDir!, config.rootProjectManifest ?? {}), + ...getOptionsFromRootManifest(config.rootProjectManifestDir, config.rootProjectManifest ?? {}), include: { dependencies: config.production !== false, devDependencies: config.dev !== false, diff --git a/pkg-manager/plugin-commands-installation/src/remove.ts b/pkg-manager/plugin-commands-installation/src/remove.ts index 14dee07071..b506c13f60 100644 --- a/pkg-manager/plugin-commands-installation/src/remove.ts +++ b/pkg-manager/plugin-commands-installation/src/remove.ts @@ -172,7 +172,7 @@ export async function handler ( } const store = await createOrConnectStoreController(opts) const removeOpts = Object.assign(opts, { - ...getOptionsFromRootManifest(opts.rootProjectManifestDir!, opts.rootProjectManifest ?? {}), + ...getOptionsFromRootManifest(opts.rootProjectManifestDir, opts.rootProjectManifest ?? {}), storeController: store.ctrl, storeDir: store.dir, include, diff --git a/pkg-manager/plugin-commands-installation/src/unlink.ts b/pkg-manager/plugin-commands-installation/src/unlink.ts index 87b4056e98..c5c1edc92e 100644 --- a/pkg-manager/plugin-commands-installation/src/unlink.ts +++ b/pkg-manager/plugin-commands-installation/src/unlink.ts @@ -73,7 +73,7 @@ export async function handler ( } const store = await createOrConnectStoreController(opts) const unlinkOpts = Object.assign(opts, { - ...getOptionsFromRootManifest(opts.rootProjectManifestDir!, opts.rootProjectManifest ?? {}), + ...getOptionsFromRootManifest(opts.rootProjectManifestDir, opts.rootProjectManifest ?? {}), globalBin: opts.bin, storeController: store.ctrl, storeDir: store.dir,