@pi-unipi/updater 2.1.2 → 2.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/updater",
3
- "version": "2.1.2",
3
+ "version": "2.2.0",
4
4
  "description": "Auto-updater, changelog browser, and readme browser for Unipi — checks npm registry, renders CHANGELOG.md and README.md files in TUI overlays",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -27,13 +27,13 @@
27
27
  "README.md"
28
28
  ],
29
29
  "scripts": {
30
- "test": "node --experimental-strip-types --test tests/**/*.test.ts"
30
+ "test": "npx tsx --test tests/**/*.test.ts"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@pi-unipi/core": "2.1.2"
36
+ "@pi-unipi/core": "2.2.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@earendil-works/pi-coding-agent": "^0.80.0",
@@ -11,7 +11,7 @@ import { Key, matchesKey, truncateToWidth, visibleWidth } from "@earendil-works/
11
11
  import type { Theme } from "@earendil-works/pi-coding-agent";
12
12
  import { parseChangelog } from "../changelog.js";
13
13
  import { renderMarkdown } from "../markdown.js";
14
- import { getInstalledPackageVersion } from "@pi-unipi/core";
14
+ import { getInstalledPackageVersion, boxInnerWidth } from "@pi-unipi/core";
15
15
  import type { ChangelogEntry } from "../../types.js";
16
16
 
17
17
  type View = "list" | "detail";
@@ -72,7 +72,7 @@ export function renderChangelogOverlay() {
72
72
  const render = (width: number): string[] => {
73
73
  ensureLoaded();
74
74
 
75
- const innerWidth = Math.max(22, width - 2);
75
+ const innerWidth = boxInnerWidth(width);
76
76
  const lines: string[] = [];
77
77
 
78
78
  // ── Header ──────────────────────────────────────────────────────
@@ -12,6 +12,7 @@ import type { Theme } from "@earendil-works/pi-coding-agent";
12
12
  import { discoverReadmes, resolveReadmePath } from "../readme.js";
13
13
  import { renderMarkdown } from "../markdown.js";
14
14
  import type { ReadmeEntry } from "../../types.js";
15
+ import { boxInnerWidth } from "@pi-unipi/core";
15
16
 
16
17
  type View = "list" | "content";
17
18
 
@@ -71,7 +72,7 @@ export function renderReadmeOverlay(params?: { openDirect?: string }) {
71
72
  const render = (width: number): string[] => {
72
73
  ensureLoaded();
73
74
 
74
- const innerWidth = Math.max(22, width - 2);
75
+ const innerWidth = boxInnerWidth(width);
75
76
  const lines: string[] = [];
76
77
 
77
78
  // ── Header ──────────────────────────────────────────────────────
@@ -15,6 +15,7 @@ import { installUpdate } from "../installer.js";
15
15
  import { writeSkippedVersion } from "../cache.js";
16
16
  import { loadConfig } from "../settings.js";
17
17
  import type { ChangelogEntry, UpdateCheckResult } from "../../types.js";
18
+ import { boxInnerWidth } from "@pi-unipi/core";
18
19
 
19
20
  /**
20
21
  * Pad content to exact visible width.
@@ -119,7 +120,7 @@ export function renderUpdateOverlay(checkResult: UpdateCheckResult) {
119
120
  };
120
121
 
121
122
  const render = (width: number): string[] => {
122
- const innerWidth = Math.max(22, width - 2);
123
+ const innerWidth = boxInnerWidth(width);
123
124
  const lines: string[] = [];
124
125
 
125
126
  // ── Header ──────────────────────────────────────────────────────