Skip to content

Commit

Permalink
fix(prompt): 🐛 fix the prompt context retaining issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yi-Xu-0100 committed Mar 24, 2021
1 parent 655d0c4 commit 326c953
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@
"out": true
},
"typescript.tsc.autoDetect": "off",
"svg.preview.background": "black",
"conventionalCommits.promptScopes": false,
"conventionalCommits.promptBreakingChange": false
"svg.preview.background": "black"
}
2 changes: 0 additions & 2 deletions src/lib/commit-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ export class CommitMessage {
}
}

export default new CommitMessage();

export function serializeSubject(partialCommitMessage: {
gitmoji: string;
subject: string;
Expand Down
3 changes: 2 additions & 1 deletion src/lib/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const gitmojis: {
import * as configuration from './configuration';
import promptTypes, { PROMPT_TYPES, Prompt } from './prompts/prompt-types';
import * as keys from '../configs/keys';
import commitMessage, {
import {
CommitMessage,
serializeSubject,
serializeHeader,
Expand Down Expand Up @@ -54,6 +54,7 @@ export default async function prompts({
detectBreakingChange: boolean;
breakingChangeFormat: boolean;
}): Promise<CommitMessage> {
const commitMessage = new CommitMessage();
const conventionalCommitsTypes: ConventionalCommitsTypes = getConventionalCommitsTypesByLocale(
locale,
).types;
Expand Down

0 comments on commit 326c953

Please sign in to comment.