fix: forwards compatibility
MODIFY
package.json
package.json
},
"bugs": "https://github.com/oclif/oclif/issues",
"dependencies": {
- "@oclif/core": "^1.24.1",
+ "@oclif/core": "^1.24.2",
"@oclif/plugin-help": "^5.1.19",
"@oclif/plugin-not-found": "^2.3.7",
"@oclif/plugin-warn-if-update-available": "^2.0.14",

MODIFY
src/commands/readme.ts
src/commands/readme.ts
@@ -7,7 +7,6 @@ import {URL} from 'url'
import {castArray, compact, sortBy, template, uniqBy} from '../util'
import {HelpCompatibilityWrapper} from '../help-compatibility'
-import {ArgInput} from '@oclif/core/lib/interfaces'
const normalize = require('normalize-package-data')
const columns = Number.parseInt(process.env.COLUMNS!, 10) || 120
@@ -256,7 +255,9 @@ USAGE
}
// v2 commands have args as an object, so we need to normalize it to an array for forwards compatibility
- const normalized = (Array.isArray(command.args) ? command.args ?? [] : Object.values(command.args ?? {})) as ArgInput
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ const normalized = Array.isArray(command.args) ? command.args ?? [] : Object.entries(command.args ?? {}).map(([name, arg]) => ({...arg, name}))
const id = toConfiguredId(command.id, config)
const defaultUsage = () => {
return compact([

MODIFY
yarn.lock
yarn.lock
widest-line "^3.1.0"
wrap-ansi "^7.0.0"
-"@oclif/core@^1.24.1":
- version "1.24.1"
- resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.24.1.tgz#b10324fc8dfbe70539a4479509b25a9dd867aed3"
- integrity sha512-CQFCsj9fUALfTNGXR9qaP3yXiF9TuL6GKph1NwXMe2yzpAE4Zz8X8uFpi916rE3oAHEPX6bR9fhdUiBGgDBuGw==
+"@oclif/core@^1.24.2":
+ version "1.24.2"
+ resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.24.2.tgz#1d2e4b8b27db7e98b0c1d7b367934196a2f2c202"
+ integrity sha512-0wfAa6HG4sJ4j5c4/GV4BWZwALtJyw2ZO6titnrWKcowxU1BWd8mBM45ilTPnDhClMowz7+8EtK4kqUGc1rNwA==
dependencies:
"@oclif/linewrap" "^1.0.0"
"@oclif/screen" "^3.0.4"

fix: forwards compatibility