@@ -11,6 +11,10 @@ var filter = function(array) {
11
11
} ) ;
12
12
} ;
13
13
14
+ process . on ( 'unhandledRejection' , error => {
15
+ console . log ( 'unhandledRejection' , error ) ;
16
+ } ) ;
17
+
14
18
// This can be any kind of SystemJS compatible module.
15
19
// We use Commonjs here, but ES6 or AMD would do just
16
20
// fine.
@@ -57,7 +61,7 @@ module.exports = function (options) {
57
61
} , {
58
62
type : 'input' ,
59
63
name : 'scope' ,
60
- message : 'Denote the scope of this change ($location, $browser, $compile, etc. ):\n'
64
+ message : 'What is the scope of this change (e.g. component or file name ):\n'
61
65
} , {
62
66
type : 'input' ,
63
67
name : 'subject' ,
@@ -66,14 +70,30 @@ module.exports = function (options) {
66
70
type : 'input' ,
67
71
name : 'body' ,
68
72
message : 'Provide a longer description of the change:\n'
73
+ } , {
74
+ type : 'confirm' ,
75
+ name : 'isBreaking' ,
76
+ message : 'Are there any breaking changes?' ,
77
+ default : false
69
78
} , {
70
79
type : 'input' ,
71
80
name : 'breaking' ,
72
- message : 'List any breaking changes:\n'
81
+ message : 'List breaking changes (one per line):\n' ,
82
+ when : function ( answers ) {
83
+ return answers . isBreaking ;
84
+ }
85
+ } , {
86
+ type : 'confirm' ,
87
+ name : 'isIssueAffected' ,
88
+ message : 'Does this change affect any open issues?' ,
89
+ default : false
73
90
} , {
74
91
type : 'input' ,
75
92
name : 'issues' ,
76
- message : 'List any issues closed by this change:\n'
93
+ message : 'Add issue references (e.g. "fix #123", "re #123".):\n' ,
94
+ when : function ( answers ) {
95
+ return answers . isIssueAffected ;
96
+ }
77
97
}
78
98
] ) . then ( function ( answers ) {
79
99
@@ -97,11 +117,11 @@ module.exports = function (options) {
97
117
var body = wrap ( answers . body , wrapOptions ) ;
98
118
99
119
// Apply breaking change prefix, removing it if already present
100
- var breaking = answers . breaking . trim ( ) ;
120
+ var breaking = answers . breaking ? answers . breaking . trim ( ) : '' ;
101
121
breaking = breaking ? 'BREAKING CHANGE: ' + breaking . replace ( / ^ B R E A K I N G C H A N G E : / , '' ) : '' ;
102
122
breaking = wrap ( breaking , wrapOptions ) ;
103
123
104
- var issues = wrap ( answers . issues , wrapOptions ) ;
124
+ var issues = answers . issues ? wrap ( answers . issues , wrapOptions ) : '' ;
105
125
106
126
var footer = filter ( [ breaking , issues ] ) . join ( '\n\n' ) ;
107
127
0 commit comments