cherrypick-interactive 1.10.0 → 1.11.0

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/cli.js CHANGED
@@ -21,6 +21,7 @@ const pkg = JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf8'));
21
21
 
22
22
  const notifier = updateNotifier({
23
23
  pkg,
24
+ updateCheckInterval: 1000 * 60 * 60, // 1 hour
24
25
  });
25
26
 
26
27
  // Only print if a *real* newer version exists
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cherrypick-interactive",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "Interactively cherry-pick commits that are in dev but not in main, using subject-based comparison.",
5
5
  "main": "cli.js",
6
6
  "bin": "cli.js",
@@ -1,21 +1,31 @@
1
- import { Text, Box, Spacer } from 'ink';
1
+ import { Text, Box } from 'ink';
2
2
  import { html } from './html.js';
3
3
 
4
4
  export function CommitRow({ hash, subject, date, isSelected, isCursor }) {
5
5
  const checkbox = isSelected ? '☑' : '☐';
6
6
  const checkColor = isSelected ? 'green' : 'gray';
7
7
  const cursor = isCursor ? '>' : ' ';
8
- const cursorColor = isCursor ? 'cyan' : undefined;
9
- const subjectColor = isCursor ? 'white' : 'gray';
8
+
9
+ let subjectColor = 'gray';
10
+ let hashColor = 'dim';
11
+ let dateColor = 'dim';
12
+ if (isCursor) {
13
+ subjectColor = 'white';
14
+ hashColor = 'cyan';
15
+ dateColor = 'gray';
16
+ } else if (isSelected) {
17
+ subjectColor = 'green';
18
+ hashColor = 'green';
19
+ dateColor = 'green';
20
+ }
10
21
 
11
22
  return html`
12
23
  <${Box}>
13
- <${Text} color=${cursorColor}>${cursor} </${Text}>
24
+ <${Text} color=${isCursor ? 'cyan' : undefined}>${cursor} </${Text}>
14
25
  <${Text} color=${checkColor}>${checkbox} </${Text}>
15
- <${Text} color="dim">${hash.slice(0, 7)} </${Text}>
16
- <${Text} color=${subjectColor} wrap="truncate">${subject}</${Text}>
17
- <${Spacer} />
18
- <${Text} color="dim">${date}</${Text}>
26
+ <${Text} color=${hashColor}>${hash.slice(0, 7)} </${Text}>
27
+ <${Text} color=${subjectColor}>${subject}</${Text}>
28
+ <${Text} color=${dateColor}>${date ? ` (${date})` : ''}</${Text}>
19
29
  </${Box}>
20
30
  `;
21
31
  }