ticketlens 0.1.17 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ticketlens",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Jira CLI for developers — fetch ticket context, triage your queue, and stop tab-switching. Zero dependencies, all local.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -484,7 +484,7 @@ export async function run(args, envOrOpts = process.env, fetcher = globalThis.fe
484
484
 
485
485
  // Validate flags before any git work
486
486
  const reviewFlags = args.slice(1);
487
- const VALID_REVIEW_FLAG = /^(--base=.+|--profile=.+)$/;
487
+ const VALID_REVIEW_FLAG = /^(--base=.+|--branch=.+|--profile=.+)$/;
488
488
  for (const flag of reviewFlags) {
489
489
  if (!flag.startsWith('-')) continue;
490
490
  if (VALID_REVIEW_FLAG.test(flag)) continue;
@@ -501,7 +501,13 @@ export async function run(args, envOrOpts = process.env, fetcher = globalThis.fe
501
501
  process.exitCode = 1;
502
502
  return;
503
503
  }
504
- process.stderr.write(`${sErr.red('✖')} Unknown flag: ${sErr.bold(flag)}\n Usage: ${sErr.cyan('ticketlens review [--base=BRANCH] [--profile=NAME]')}\n`);
504
+ const branchDashM = flag.match(/^--branch-(.+)$/);
505
+ if (branchDashM) {
506
+ process.stderr.write(`${sErr.red('✖')} Unknown flag: ${sErr.bold(flag)}\n Did you mean ${sErr.cyan(`--branch=${branchDashM[1]}`)}?\n`);
507
+ process.exitCode = 1;
508
+ return;
509
+ }
510
+ process.stderr.write(`${sErr.red('✖')} Unknown flag: ${sErr.bold(flag)}\n Usage: ${sErr.cyan('ticketlens review [--base=BRANCH] [--branch=BRANCH] [--profile=NAME]')}\n`);
505
511
  process.exitCode = 1;
506
512
  return;
507
513
  }
@@ -510,8 +516,8 @@ export async function run(args, envOrOpts = process.env, fetcher = globalThis.fe
510
516
  const stderrNotes = [];
511
517
 
512
518
  // Resolve base branch: --base=BRANCH or auto-detect main/master/develop
513
- const baseArg = reviewFlags.find(a => a.startsWith('--base='));
514
- let baseBranch = baseArg ? baseArg.split('=')[1] : null;
519
+ const baseArg = reviewFlags.find(a => a.startsWith('--base=') || a.startsWith('--branch='));
520
+ let baseBranch = baseArg ? baseArg.replace(/^--(base|branch)=/, '') : null;
515
521
 
516
522
  spinner.update('Scanning branch…');
517
523
 
@@ -604,6 +610,7 @@ export async function run(args, envOrOpts = process.env, fetcher = globalThis.fe
604
610
 
605
611
  spinner.done();
606
612
  for (const note of stderrNotes) process.stderr.write(note + '\n');
613
+ if (stderrNotes.length > 0) process.stderr.write('\n');
607
614
 
608
615
  const isLic = opts.isLicensedFn ?? ((tier) => isLicensed(tier, resolvedConfigDir));
609
616
  const assembleFn = opts.assemblePrReviewFn ?? assemblePrReview;
@@ -38,7 +38,7 @@ export function printHelp({ stream = process.stdout } = {}) {
38
38
  ` ${s.brand('ticketlens')} ${s.dim('<TICKET-KEY>')} ${s.dim('[options]')} Fetch a ticket brief`,
39
39
  ` ${s.brand('ticketlens')} get ${s.dim('<TICKET-KEY>')} Same as above ${s.dim('(explicit alias)')}`,
40
40
  ` ${s.brand('ticketlens')} triage ${s.dim('[options]')} Scan your assigned tickets`,
41
- ` ${s.brand('ticketlens')} review ${s.dim('[--base=BRANCH]')} Code-review context brief from current branch`,
41
+ ` ${s.brand('ticketlens')} review ${s.dim('[--branch=BRANCH]')} Code-review context brief from current branch`,
42
42
  ` ${s.brand('ticketlens')} compliance ${s.dim('<TICKET-KEY>')} Check requirements coverage ${s.dim('[Pro/Free 3/mo]')}`,
43
43
  '',
44
44
  ` ${s.brand('ticketlens')} delete ${s.dim('<PROFILE-NAME>')} Remove a profile`,
@@ -545,7 +545,7 @@ export function printReviewHelp({ stream = process.stdout } = {}) {
545
545
  const s = createStyler({ isTTY: stream.isTTY });
546
546
  const lines = [
547
547
  '',
548
- ` ${s.bold(s.brand('ticketlens'))} ${s.bold('review')} ${s.dim('[--base=BRANCH] [--profile=NAME]')}`,
548
+ ` ${s.bold(s.brand('ticketlens'))} ${s.bold('review')} ${s.dim('[--branch=BRANCH] [--profile=NAME]')}`,
549
549
  '',
550
550
  ` Assemble a code-review context brief from your current branch.`,
551
551
  ` Extracts linked ticket keys from the branch name and commit messages,`,
@@ -555,16 +555,17 @@ export function printReviewHelp({ stream = process.stdout } = {}) {
555
555
  '',
556
556
  ` ${s.bold('OPTIONS')}`,
557
557
  '',
558
- ` ${s.brand('--base')}=${s.dim('BRANCH')} Compare against this branch ${s.dim('(default: auto-detect main/master/develop)')}`,
558
+ ` ${s.brand('--branch')}=${s.dim('BRANCH')} Compare against this branch ${s.dim('(default: auto-detect main/master/develop)')}`,
559
+ ` ${s.brand('--base')}=${s.dim('BRANCH')} Alias for ${s.dim('--branch')}`,
559
560
  ` ${s.brand('--profile')}=${s.dim('NAME')} Use a specific tracker profile for ticket fetching`,
560
561
  ` ${s.brand('-h')}, ${s.brand('--help')} Show this help`,
561
562
  '',
562
563
  ` ${s.bold('EXAMPLES')}`,
563
564
  '',
564
565
  ` ${s.dim('$')} ticketlens review`,
565
- ` ${s.dim('$')} ticketlens review --base=main`,
566
- ` ${s.dim('$')} ticketlens review --base=main --profile=myteam`,
567
- ` ${s.dim('$')} ticketlens review --base=main | pbcopy ${s.dim('# copy brief to clipboard')}`,
566
+ ` ${s.dim('$')} ticketlens review --branch=main`,
567
+ ` ${s.dim('$')} ticketlens review --branch=main --profile=myteam`,
568
+ ` ${s.dim('$')} ticketlens review --branch=main | pbcopy ${s.dim('# copy brief to clipboard')}`,
568
569
  '',
569
570
  ` ${s.bold('OUTPUT SECTIONS')}`,
570
571
  '',