fix(plugins): notify only changed diagnostics and remove stale probe cleanup
This commit is contained in:
1 parent
fa03c7dd15
commit
eaecfd59bf
18 files changed
+202
-71
No files matched your search
@@ -7,7 +7,7 @@
|
||||
|
||||
import { spawn as spawnChild } from 'node:child_process'
|
||||
import { randomUUID } from 'node:crypto'
|
||||
import { readFileSync, rmSync, writeFileSync } from 'node:fs'
|
||||
import { readFileSync, writeFileSync } from 'node:fs'
|
||||
import { join } from 'node:path'
|
||||
import {
|
||||
awaitChildClose,
|
||||
@@ -189,7 +189,7 @@ export class PluginInstaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Run `pnpm remove`, reconcile the layer list, and remove any obsolete discovery record.
|
||||
* Run `pnpm remove` and reconcile the layer list.
|
||||
* @param packageName - the dependency to remove.
|
||||
* @throws {PluginOperationError} `plugins/install-failed` when pnpm fails.
|
||||
*/
|
||||
@@ -198,7 +198,6 @@ export class PluginInstaller {
|
||||
const before = readProfileManifest(NAME, profileDir)
|
||||
await this.runPnpm(['remove', packageName], packageName)
|
||||
reconcileInstalledBundles(NAME, profileDir, installAnchor, before, { autoEnable: false })
|
||||
rmSync(join(profileDir, '.dsh-plugins', `${packageName.replaceAll('/', '__')}.json`), { force: true })
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -219,7 +219,7 @@ export class PluginManager {
|
||||
|
||||
/**
|
||||
* Remove a package from the profile: disable it when enabled, drop every
|
||||
* user-layer row that names it, run `pnpm remove`, and clean obsolete discovery metadata.
|
||||
* user-layer row that names it, and run `pnpm remove`.
|
||||
* @param packageName - the installed dependency to remove.
|
||||
* @throws {PluginOperationError} `plugins/not-installed`, `plugins/agents-running`,
|
||||
* or `plugins/install-failed` when pnpm exits non-zero.
|
||||
|
||||
Reference in new issue
Block a user