Remove direct dependency to @oclif/config

Change-type: patch
This commit is contained in:
Otávio Jacobi 2023-09-05 16:02:36 -03:00
parent af6b263f7a
commit 26bc68753b
5 changed files with 5 additions and 8 deletions

View File

@ -15,8 +15,7 @@
* limitations under the License.
*/
import { Hook } from '@oclif/config';
import type { IConfig } from '@oclif/config';
import type { Hook, Interfaces } from '@oclif/core';
import { getChalk } from '../../utils/lazy';
/*
@ -28,7 +27,7 @@ import { getChalk } from '../../utils/lazy';
*/
const hook: Hook<'command-not-found'> = async function (
opts: object & { config: IConfig; id?: string; argv?: string[] },
opts: object & { config: Interfaces.Config; id?: string; argv?: string[] },
) {
const Levenshtein = await import('fast-levenshtein');
const _ = await import('lodash');

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { Hook } from '@oclif/config';
import type { Hook } from '@oclif/core';
let trackResolve: (result: Promise<any>) => void;

View File

@ -16,7 +16,7 @@
*/
import { Main } from '@oclif/command';
import type * as Config from '@oclif/config';
import type { Command } from '@oclif/core';
/**
* This class is a partial copy-and-paste of
@ -26,7 +26,7 @@ import type * as Config from '@oclif/config';
export class CommandHelp {
constructor(public command: { args?: any[] }) {}
protected arg(arg: Config.Command['args'][0]): string {
protected arg(arg: Command.Arg.Any): string {
const name = arg.name.toUpperCase();
if (arg.required) {
return `${name}`;

1
npm-shrinkwrap.json generated
View File

@ -102,7 +102,6 @@
"devDependencies": {
"@balena/lint": "^6.2.2",
"@electron/notarize": "^2.0.0",
"@oclif/config": "^1.18.2",
"@oclif/parser": "^3.8.6",
"@octokit/plugin-throttling": "^3.5.1",
"@octokit/rest": "^18.6.7",

View File

@ -111,7 +111,6 @@
"devDependencies": {
"@balena/lint": "^6.2.2",
"@electron/notarize": "^2.0.0",
"@oclif/config": "^1.18.2",
"@oclif/parser": "^3.8.6",
"@octokit/plugin-throttling": "^3.5.1",
"@octokit/rest": "^18.6.7",