From b08960f7164a24b63374325010bd9bb06ee45e52 Mon Sep 17 00:00:00 2001 From: Katy Bowman Date: Fri, 11 Sep 2026 12:37:00 -0400 Subject: [PATCH] feat!: remove support for installing legacy plugins BREAKING CHANGE: removes support for installing legacy plugins --- eslint-suppressions.json | 10 ++-------- src/plugins.ts | 8 -------- test/integration/install.integration.ts | 19 ------------------- 3 files changed, 2 insertions(+), 35 deletions(-) diff --git a/eslint-suppressions.json b/eslint-suppressions.json index e260a691..07222e0e 100644 --- a/eslint-suppressions.json +++ b/eslint-suppressions.json @@ -188,14 +188,8 @@ "@typescript-eslint/no-unsafe-assignment": { "count": 1 }, - "@typescript-eslint/no-unsafe-call": { - "count": 1 - }, - "@typescript-eslint/no-unsafe-member-access": { - "count": 1 - }, "@typescript-eslint/prefer-nullish-coalescing": { - "count": 3 + "count": 2 }, "@typescript-eslint/use-unknown-in-catch-callback-variable": { "count": 1 @@ -322,4 +316,4 @@ "count": 1 } } -} +} \ No newline at end of file diff --git a/src/plugins.ts b/src/plugins.ts index 75d98a0d..2304c08f 100644 --- a/src/plugins.ts +++ b/src/plugins.ts @@ -417,14 +417,6 @@ export default class Plugins { private isValidPlugin(p: Config): boolean { if (p.valid) return true - if ( - this.config.plugins.get('@oclif/plugin-legacy') || - // @ts-expect-error because _base is private - p._base.includes('@oclif/plugin-legacy') - ) { - return true - } - throw new Errors.CLIError('plugin is invalid', { suggestions: [ 'Plugin failed to install because it does not appear to be a valid CLI plugin.\nIf you are sure it is, contact the CLI developer noting this error.', diff --git a/test/integration/install.integration.ts b/test/integration/install.integration.ts index 929a965a..ab02cd07 100644 --- a/test/integration/install.integration.ts +++ b/test/integration/install.integration.ts @@ -255,23 +255,4 @@ describe('install/uninstall integration tests', () => { expect(result?.some((r) => r.name === plugin)).to.be.false }) }) - - describe('legacy plugin', () => { - it('should install legacy plugin', async () => { - await runCommand('plugins install @oclif/plugin-legacy') - await runCommand('plugins install @heroku-cli/plugin-ps-exec --silent') - const {result, stdout} = await runCommand>('plugins') - expect(stdout).to.contain('@heroku-cli/plugin-ps-exec') - expect(result?.some((r) => r.name === '@heroku-cli/plugin-ps-exec')).to.be.true - }) - - it('should uninstall legacy plugin', async () => { - await runCommand('plugins uninstall @heroku-cli/plugin-ps-exec') - await runCommand('plugins uninstall @oclif/plugin-legacy') - const {result, stdout} = await runCommand>('plugins') - expect(stdout).to.contain('No plugins installed.') - expect(result?.some((r) => r.name === '@heroku-cli/plugin-ps-exec')).to.be.false - expect(result?.some((r) => r.name === '@oclif/plugin-legacy')).to.be.false - }) - }) })