X Tutup
Skip to content

Commit 3654f1a

Browse files
committed
Fix a test issue.
1 parent 58a532a commit 3654f1a

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

apps/rush-lib/src/cli/actions/ChangeAction.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,11 @@ export class ChangeAction extends BaseRushAction {
449449
}
450450

451451
private _getBumpOptions(packageName?: string): { [type: string]: string } {
452-
let bumpOptions: { [type: string]: string } = this.rushConfiguration.hotfixChangeEnabled ? {
452+
let bumpOptions: { [type: string]: string } = (this.rushConfiguration && this.rushConfiguration.hotfixChangeEnabled)
453+
? {
453454
[ChangeType[ChangeType.hotfix]]: 'hotfix - for changes that need to be published in a separate hotfix package'
454-
} : {
455+
}
456+
: {
455457
[ChangeType[ChangeType.major]]: 'major - for changes that break compatibility, e.g. removing an API',
456458
[ChangeType[ChangeType.minor]]: 'minor - for backwards compatible changes, e.g. adding a new API',
457459
[ChangeType[ChangeType.patch]]: 'patch - for changes that do not affect compatibility, e.g. fixing a bug'
@@ -516,7 +518,7 @@ export class ChangeAction extends BaseRushAction {
516518
type: 'confirm',
517519
name: 'isCorrectEmail',
518520
default: 'Y',
519-
message: `Is your email address ${email} ?`
521+
message: `Is your email address ${email}?`
520522
}
521523
]).then(({ isCorrectEmail }: { isCorrectEmail: boolean }) => {
522524
return isCorrectEmail ? email : undefined;

apps/rush-lib/src/cli/test/__snapshots__/CommandLineHelp.test.ts.snap

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ Optional arguments:
141141
`;
142142
143143
exports[`CommandLineHelp prints the help for each action: change 1`] = `
144-
"usage: rush change [-h] [-v] [--no-fetch] [-b BRANCH]
144+
"usage: rush change [-h] [-v] [--no-fetch] [-b BRANCH] [--email EMAIL] [--bulk]
145+
[--message MESSAGE] [--bump-type {major,minor,patch}]
146+
145147
146148
Asks a series of questions and then generates a <branchname>-<timestamp>.json
147149
file in the common folder. The \`publish\` command will consume these files and
@@ -172,6 +174,18 @@ Optional arguments:
172174
which projects were changed. If this parameter is not
173175
specified, the checked out branch is compared against
174176
the \\"master\\" branch.
177+
--email EMAIL The email address to use in changefiles. If this
178+
parameter is not provided, the email address will be
179+
detected or prompted for in intractive mode.
180+
--bulk If this flag is specified, apply the same change
181+
message and bump type to all changed projects. The
182+
--message and the --bump-type parameters must be
183+
specified if the --bulk parameter is specified
184+
--message MESSAGE The message to apply to all changed projects if the
185+
--bulk flag is provided.
186+
--bump-type {major,minor,patch}
187+
The bump type to apply to all changed projects if the
188+
--bulk flag is provided.
175189
"
176190
`;
177191

0 commit comments

Comments
 (0)
X Tutup