mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-30 10:38:13 -05:00
fix: remove pkg apply cleanupUnusedCatalogs (#9930)
* fix: remove pkg apply cleanupUnusedCatalogs * fix: lint
This commit is contained in:
5
.changeset/every-walls-search.md
Normal file
5
.changeset/every-walls-search.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-installation": patch
|
||||
---
|
||||
|
||||
`cleanupUnusedCatalogs` configuration should be applied when removing a dependency package.
|
||||
@@ -9,6 +9,7 @@ import { type Config, getOptionsFromRootManifest, types as allTypes } from '@pnp
|
||||
import { PnpmError } from '@pnpm/error'
|
||||
import { arrayOfWorkspacePackagesToMap } from '@pnpm/get-context'
|
||||
import { findWorkspacePackages } from '@pnpm/workspace.find-packages'
|
||||
import { updateWorkspaceManifest } from '@pnpm/workspace.manifest-writer'
|
||||
import { getAllDependenciesFromManifest } from '@pnpm/manifest-utils'
|
||||
import { createOrConnectStoreController, type CreateStoreControllerOptions } from '@pnpm/store-connection-manager'
|
||||
import { type DependenciesField, type ProjectRootDir } from '@pnpm/types'
|
||||
@@ -150,6 +151,7 @@ export async function handler (
|
||||
| 'workspaceDir'
|
||||
| 'workspacePackagePatterns'
|
||||
| 'sharedWorkspaceLockfile'
|
||||
| 'cleanupUnusedCatalogs'
|
||||
> & {
|
||||
recursive?: boolean
|
||||
pnpmfile: string[]
|
||||
@@ -215,4 +217,8 @@ export async function handler (
|
||||
removeOpts
|
||||
)
|
||||
await writeProjectManifest(mutationResult.updatedProject.manifest)
|
||||
await updateWorkspaceManifest(opts.workspaceDir ?? opts.dir, {
|
||||
cleanupUnusedCatalogs: opts.cleanupUnusedCatalogs,
|
||||
allProjects: opts.allProjects,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user