File tree 4 files changed +18
-26
lines changed
4 files changed +18
-26
lines changed Original file line number Diff line number Diff line change 37
37
"node" : " >=v12"
38
38
},
39
39
"devDependencies" : {
40
- "@commitlint/config-angular" : " ^11.0.0" ,
41
- "@commitlint/types" : " ^11.0.0" ,
42
40
"@commitlint/utils" : " ^14.0.0" ,
41
+ "@commitlint/types" : " ^13.2.0" ,
42
+ "@commitlint/config-angular" : " ^13.2.0" ,
43
43
"@types/inquirer" : " ^6.5.0" ,
44
44
"inquirer" : " ^6.5.2" ,
45
45
"commitizen" : " ^4.2.4"
Original file line number Diff line number Diff line change @@ -3,16 +3,8 @@ import {input} from './input';
3
3
4
4
type Commit = ( input : string ) => void ;
5
5
6
- /**
7
- * Entry point for commitizen
8
- * @param cz inquirer instance passed by commitizen
9
- * @param commit callback to execute with complete commit message
10
- * @return {void }
11
- */
12
- export async function prompter (
13
- cz : typeof inquirer ,
14
- commit : Commit
15
- ) : Promise < void > {
16
- const message = await input ( cz . prompt ) ;
17
- commit ( message ) ;
6
+ export function prompter ( cz : typeof inquirer , commit : Commit ) : void {
7
+ input ( cz . prompt ) . then ( ( message ) => {
8
+ commit ( message ) ;
9
+ } ) ;
18
10
}
Original file line number Diff line number Diff line change 1
1
/// <reference path="./inquirer.d.ts" />
2
- import { Interface as ReadlineInterface , Key } from 'readline' ;
3
-
4
2
import chalk from 'chalk' ;
5
3
import inquirer from 'inquirer' ;
6
4
import InputPrompt from 'inquirer/lib/prompts/input' ;
7
5
import observe from 'inquirer/lib/utils/events' ;
6
+ import { Interface as ReadlineInterface , Key } from 'readline' ;
8
7
import type { Subscription } from 'rxjs/internal/Subscription' ;
9
8
10
9
import Answers = inquirer . Answers ;
@@ -86,7 +85,6 @@ export default class InputCustomPrompt<
86
85
render ( error ?: string ) : void {
87
86
const answered = this . status === 'answered' ;
88
87
89
- let bottomContent = '' ;
90
88
let message = this . getQuestion ( ) ;
91
89
const length = this . measureInput ( this . rl . line ) ;
92
90
@@ -96,6 +94,8 @@ export default class InputCustomPrompt<
96
94
message += this . opt . transformer ( this . rl . line , this . answers , { } ) ;
97
95
}
98
96
97
+ let bottomContent = '' ;
98
+
99
99
if ( error ) {
100
100
bottomContent = chalk . red ( '>> ' ) + error ;
101
101
} else if ( ! answered ) {
Original file line number Diff line number Diff line change 1398
1398
resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
1399
1399
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
1400
1400
1401
- " @commitlint/config-angular-type-enum@^11.0 .0 " :
1402
- version "11.0 .0"
1403
- resolved "https://registry.npmjs.org/@commitlint/config-angular-type-enum/-/config-angular-type-enum-11.0 .0.tgz#7a7f6982e45d3696d72eb343a5d1dc23b2f003e0 "
1404
- integrity sha512-dSyxdkU36aEgDUWBSiM5lsZ/h2K7uCyKf+A5Sf3+Z5JhcLD9GzTo5W+c8KgwTBdL39dkL7sN+EVgsXNjW99pJg ==
1401
+ " @commitlint/config-angular-type-enum@^13.2 .0 " :
1402
+ version "13.2 .0"
1403
+ resolved "https://registry.npmjs.org/@commitlint/config-angular-type-enum/-/config-angular-type-enum-13.2 .0.tgz#e3f9b8a07118ed8e060b0b1d04a549f74957634d "
1404
+ integrity sha512-HSP9lzCoHC9+bjJquvByiSUpo0GbAipbjcT6l3Jl6XOzkCjhnUkYcQ2b/O5nXv3mf8Vv/n5k2Sk4nbCYEVpSGQ ==
1405
1405
1406
- " @commitlint/config-angular@^11.0 .0 " :
1407
- version "11.0 .0"
1408
- resolved "https://registry.npmjs.org/@commitlint/config-angular/-/config-angular-11.0 .0.tgz#c1cc1dd902a4b9d2a5c072ff38e3ace9be7138e0 "
1409
- integrity sha512-H8QSEOmfRsPW0Iehid5fY7NZ2HXmyKC6Q83MLFf9KRnmCcbgJtH+faECtqlvPntayO3CYbA4UenIerOaQ0vOAg ==
1406
+ " @commitlint/config-angular@^13.2 .0 " :
1407
+ version "13.2 .0"
1408
+ resolved "https://registry.npmjs.org/@commitlint/config-angular/-/config-angular-13.2 .0.tgz#78c62551279bdf7ed3a9bf993751f346c42b2944 "
1409
+ integrity sha512-mfytI8ZrPt7kuxjZo0ZfFw0bg1zEa2kI6/prVaYJ0FJgOE8EP1Co9Y4DJZEegohfYFeRcFK3radog7WOr2pzdw ==
1410
1410
dependencies :
1411
- " @commitlint/config-angular-type-enum" " ^11.0 .0"
1411
+ " @commitlint/config-angular-type-enum" " ^13.2 .0"
1412
1412
1413
1413
" @endemolshinegroup/cosmiconfig-typescript-loader@^3.0.2 " :
1414
1414
version "3.0.2"
You can’t perform that action at this time.
0 commit comments