Skip to content

Commit f07c4b3

Browse files
committed
fix: bump version to 1.0.6 and fix music generate test regressions
- Bump package.json version to 1.0.6 for npm publish - Fix --instrumental with --lyrics-file validation (check flag presence, not just content) - Update tests: new lyrics-required error message, replace 无歌词 example check with --lyrics-optimizer Made-with: Cursor
1 parent 98b1f33 commit f07c4b3

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mmx-cli",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "CLI for the MiniMax AI Platform",
55
"type": "module",
66
"engines": {

src/commands/music/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default defineCommand({
6060
lyrics = readTextFromPathOrStdin(flags.lyricsFile as string);
6161
}
6262

63-
if (isInstrumental && lyrics) {
63+
if (isInstrumental && (lyrics || flags.lyricsFile)) {
6464
throw new CLIError(
6565
'Cannot use --instrumental with --lyrics or --lyrics-file.',
6666
ExitCode.USAGE,

test/commands/music/generate.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('music generate command', () => {
4141
it('requires lyrics when only prompt is given (API contract)', async () => {
4242
await expect(
4343
generateCommand.execute(baseConfig, { ...baseFlags, prompt: 'Upbeat pop' }),
44-
).rejects.toThrow('The API requires lyrics');
44+
).rejects.toThrow('Lyrics are required');
4545
});
4646

4747
it('structured flags are appended to prompt (dry-run)', async () => {
@@ -89,12 +89,12 @@ describe('music generate command', () => {
8989
expect(optionFlags.some((f) => f.startsWith('--aigc-watermark'))).toBe(true);
9090
});
9191

92-
it('examples include vocal and instrumental usage', () => {
92+
it('examples include vocal, instrumental, and lyrics-optimizer usage', () => {
9393
const examples = generateCommand.examples ?? [];
9494
const joined = examples.join(' ');
9595
expect(joined).toContain('vocals');
9696
expect(joined).toContain('--instrumental');
97-
expect(joined).toContain('无歌词');
97+
expect(joined).toContain('--lyrics-optimizer');
9898
});
9999

100100
it('rejects --instrumental with --lyrics', async () => {

0 commit comments

Comments
 (0)