diff --git a/apps/desktop/src/project-manager.ts b/apps/desktop/src/project-manager.ts index 195d45efda..a91c6af6b2 100644 --- a/apps/desktop/src/project-manager.ts +++ b/apps/desktop/src/project-manager.ts @@ -238,11 +238,6 @@ export class DesktopProjectManager { return pluginRecords(this.paths.profile) } - /** @returns Whether the profile enables any third-party bundle, without loading plugin files. */ - hasEnabledPlugins(): boolean { - return existsSync(this.paths.profile) && profilePluginNames(this.paths.profile).length > 0 - } - /** * Reinitialize the profile, deleting configuration and third-party packages without a backup. * @param hooks - Stop the Host before resetting files; restart after preparation succeeds. diff --git a/apps/desktop/tests/project-manager.spec.ts b/apps/desktop/tests/project-manager.spec.ts index 14c6cd753d..c618e69393 100644 --- a/apps/desktop/tests/project-manager.spec.ts +++ b/apps/desktop/tests/project-manager.spec.ts @@ -92,9 +92,13 @@ describe('desktop external plugin profile', () => { const patch = join(manager.paths.profile, 'node_modules/plugin/bundle.yml') unlinkSync(patch) await manager.mutate({ type: 'plugins-disable-all' }, hooks({ afterChange: async () => { - expect(manager.hasEnabledPlugins()).toBe(false) + expect((JSON.parse(readFileSync(join(manager.paths.profile, 'package.json'), 'utf8')) as { + dsh: { profile: { bundles: string[] } } + }).dsh.profile.bundles).not.toContain('plugin') } })) - expect(manager.hasEnabledPlugins()).toBe(false) + expect((JSON.parse(readFileSync(join(manager.paths.profile, 'package.json'), 'utf8')) as { + dsh: { profile: { bundles: string[] } } + }).dsh.profile.bundles).not.toContain('plugin') expect(existsSync(join(manager.paths.profile, 'node_modules/plugin/package.json'))).toBe(true) expect(calls(root)).toHaveLength(2) await expect(manager.applyRelease()).resolves.toBe(false)