Skip to content

Commit 0ff75cb

Browse files
committed
fix(plugins): allow intentional uninstall size drops
1 parent a21385a commit 0ff75cb

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎src/cli/plugins-cli.uninstall.test.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,19 @@ describe("plugins cli uninstall", () => {
185185
entries: {},
186186
},
187187
});
188+
expect(replaceConfigFile).toHaveBeenCalledWith({
189+
baseHash: "mock",
190+
nextConfig: {
191+
plugins: {
192+
entries: {},
193+
},
194+
},
195+
writeOptions: {
196+
allowConfigSizeDrop: true,
197+
afterWrite: { mode: "restart", reason: "plugin source changed" },
198+
unsetPaths: [["plugins", "installs"]],
199+
},
200+
});
188201
expect(refreshPluginRegistry).toHaveBeenCalledWith({
189202
config: {
190203
plugins: {

‎src/cli/plugins-uninstall-command.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ export async function runPluginUninstallCommand(
184184
nextConfig,
185185
...(snapshot.hash !== undefined ? { baseHash: snapshot.hash } : {}),
186186
writeOptions: {
187+
allowConfigSizeDrop: true,
187188
afterWrite: { mode: "restart", reason: "plugin source changed" },
188189
},
189190
}),

0 commit comments

Comments
 (0)