Skip to content

Commit

Permalink
fix(cli-core): bump to listr2 to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Oct 25, 2022
1 parent 626739a commit 0b022f9
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"inquirer-autocomplete-prompt": "2.0.0",
"js-yaml": "4.1.0",
"lerna": "5.4.3",
"listr2": "4.0.5",
"listr2": "5.0.5",
"module-alias": "2.2.2",
"read-pkg-up": "7.0.1",
"registry-url": "5.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"inquirer": "8.2.4",
"inquirer-autocomplete-prompt": "2.0.0",
"js-yaml": "4.1.0",
"listr2": "4.0.5",
"listr2": "5.0.5",
"module-alias": "2.2.2",
"normalize-path": "3.0.0",
"read-pkg-up": "7.0.1",
Expand Down
7 changes: 4 additions & 3 deletions packages/cli-core/src/interfaces/CommandProvider.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Inquirer from "inquirer";
import {Answers, QuestionCollection} from "inquirer";
import {Tasks} from "./Tasks";

export type QuestionOptions<T = any> = Inquirer.QuestionCollection<T>;
export type QuestionOptions<T extends Answers = Answers> = QuestionCollection<T>;

export interface CommandProvider<Ctx = any> {
/**
Expand All @@ -15,7 +15,7 @@ export interface CommandProvider<Ctx = any> {
* See https://github.com/enquirer/enquirer for more detail on question configuration.
* @param initialOptions
*/
$prompt?<T = any>(initialOptions: Partial<Ctx>): QuestionOptions<T> | Promise<QuestionOptions<T>>;
$prompt?<T extends Answers = Answers>(initialOptions: Partial<Ctx>): QuestionOptions<T> | Promise<QuestionOptions<T>>;

/**
* Hook to map options
Expand All @@ -40,5 +40,6 @@ export interface CommandProvider<Ctx = any> {
* @param ctx
*/
$postInstall?(ctx: Ctx): Tasks | Promise<Tasks> | any | Promise<any>;

$afterPostInstall?(ctx: Ctx): Tasks | Promise<Tasks> | any | Promise<any>;
}
2 changes: 1 addition & 1 deletion packages/cli/src/commands/init/config/FeaturesPrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const FeaturesMap: Record<string, Feature> = {
"@tsed/cli-core": "{{cliVersion}}"
},
devDependencies: {
"@types/inquirer": "latest"
"@types/inquirer": "^8.2.4"
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe("getFeaturesPrompt", () => {
"@tsed/cli-core": "{{cliVersion}}",
},
"devDependencies": Object {
"@types/inquirer": "latest",
"@types/inquirer": "^8.2.4",
},
"name": "Commands",
"value": "commands",
Expand Down
25 changes: 23 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6282,7 +6282,7 @@ color@^3.0.0, color@^3.1.2:
color-convert "^1.9.3"
color-string "^1.6.0"

colorette@^2.0.16, colorette@^2.0.17:
colorette@^2.0.16, colorette@^2.0.17, colorette@^2.0.19:
version "2.0.19"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798"
integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==
Expand Down Expand Up @@ -11628,7 +11628,21 @@ listr-verbose-renderer@^0.5.0:
date-fns "^1.27.2"
figures "^2.0.0"

listr2@4.0.5, listr2@^4.0.5:
listr2@5.0.5:
version "5.0.5"
resolved "https://registry.yarnpkg.com/listr2/-/listr2-5.0.5.tgz#4651a940d12b984abecfae4450e40edd5695f808"
integrity sha512-DpBel6fczu7oQKTXMekeprc0o3XDgGMkD7JNYyX+X0xbwK+xgrx9dcyKoXKqpLSUvAWfmoePS7kavniOcq3r4w==
dependencies:
cli-truncate "^2.1.0"
colorette "^2.0.19"
log-update "^4.0.0"
p-map "^4.0.0"
rfdc "^1.3.0"
rxjs "^7.5.6"
through "^2.3.8"
wrap-ansi "^7.0.0"

listr2@^4.0.5:
version "4.0.5"
resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.5.tgz#9dcc50221583e8b4c71c43f9c7dfd0ef546b75d5"
integrity sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==
Expand Down Expand Up @@ -15545,6 +15559,13 @@ rxjs@^7.5.4, rxjs@^7.5.5:
dependencies:
tslib "^2.1.0"

rxjs@^7.5.6:
version "7.5.7"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.7.tgz#2ec0d57fdc89ece220d2e702730ae8f1e49def39"
integrity sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==
dependencies:
tslib "^2.1.0"

safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
Expand Down

0 comments on commit 0b022f9

Please sign in to comment.