Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions eslint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -322,4 +316,4 @@
"count": 1
}
}
}
}
8 changes: 0 additions & 8 deletions src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
19 changes: 0 additions & 19 deletions test/integration/install.integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Array<{name: string}>>('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<Array<{name: string}>>('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
})
})
})
Loading