github-search-cli 9.7.0 → 9.8.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/CHANGELOG.md CHANGED
@@ -6,6 +6,69 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Publish
6
6
 
7
7
  ---
8
8
 
9
+ ## [9.8.0] — 2026-09-22 (released)
10
+
11
+ ### Added
12
+
13
+ - **README viewer now renders full markdown, including inline images.** The
14
+ viewer used to approximate markdown with box-drawing text; it now drives
15
+ OpenTUI's `MarkdownRenderable` with a theme-derived syntax style, so
16
+ headings, emphasis, links, lists, blockquotes, boxed tables, and fenced
17
+ code blocks render as markdown rather than as decorated plain text.
18
+ - **Images in READMEs render in the terminal.** Relative and root-relative
19
+ paths resolve against the branch the README was loaded from,
20
+ `github.com/.../blob/...` links are rewritten to raw content, and downloads
21
+ are cached and capped by size. SVG and badge-service images are skipped
22
+ (they carry text that survives rasterising poorly), and anything that fails
23
+ to load falls back to an `🖼 alt text` caption. Images are drawn with
24
+ truecolor half blocks, so they work on any truecolor terminal with no image
25
+ protocol support; press `i` in the viewer to toggle them off. The pipeline
26
+ lives in `src/png.ts` (PNG decoder), `src/image-render.ts`
27
+ (image → cells), `src/image-loader.ts` (URL resolution + fetch cache),
28
+ `src/markdown-images.ts` (token helpers) and `src/markdown-view.ts` (the
29
+ renderable), and degrades to captions on runtimes without `Bun.Image`.
30
+
31
+ ### Changed
32
+
33
+ - **The update modal's release notes render as markdown too.** The in-app
34
+ update panel reused the same text approximation as the README viewer; it
35
+ now shares `MarkdownRenderable` via the new view, so release notes show
36
+ real headings, lists, inline code, and boxed tables. Inline images stay
37
+ off there (the panel is narrow and notes are prose).
38
+ - With both surfaces migrated, the plain-text markdown renderer
39
+ (`src/markdown-render.ts`) is no longer used and has been removed.
40
+
41
+ ---
42
+
43
+ ## [9.7.1] — 2026-09-20 (released)
44
+
45
+ ### Fixed
46
+
47
+ - **In-app update installed to the wrong location when running under Bun** —
48
+ `performUpdate()` ran `bun install -g github-search-cli`, which targets
49
+ Bun's own global dir (`~/.bun`), not the npm prefix the running copy and
50
+ its `ghfind` shim live in. The command exited 0 while the running install
51
+ never changed. The updater now detects which package manager owns the
52
+ running tree (`detectInstallLocation`: npm global vs `~/.bun` global) and
53
+ shells out to `npm install -g --prefix <prefix>` for npm-owned installs,
54
+ so the update lands exactly where the running install is.
55
+ - **Node fallback could not launch npm on Windows** — `child_process.spawn`
56
+ without a shell cannot execute `npm.cmd` (and recent Node rejects it with
57
+ `EINVAL`). The update spawn now goes through `node:child_process` on every
58
+ runtime with `shell: true` on win32 and properly quoted arguments, so the
59
+ Node fallback path actually works on Windows.
60
+ - **Compiled binaries / dev checkouts no longer fake an update** — when the
61
+ running install has no `node_modules` ancestor, self-update is refused
62
+ with a debug hint instead of npm-installing a copy the user isn't running.
63
+ - **Windows: URLs with query params were truncated at the first `&`** when opened via `cmd /c start` (every pre-filled crash-report/issue link lost its body and labels). Both openers now use `explorer.exe` on Windows, which receives the URL as a single argument.
64
+ - **`open-url.ts` crashed under Node** (`Bun.spawn` unconditional); now runtime-agnostic with a detached `child_process.spawn` fallback.
65
+ - **`--doctor` now detects stale/PATH-shadowing global installs** — multiple `ghfind` copies resolving to different versions are flagged with their prefixes and the exact uninstall command. This is the "updater said OK but nothing changed" trap.
66
+ - Lint gate was permanently broken: `package.json` pinned `biome@2.5.13` (package never existed on npm); now uses `@biomejs/biome` ^2.5.14 with a migrated `biome.json`.
67
+ - First clean lint baseline: 198 diagnostics triaged (auto-fixes + hand-fixes, incl. a dead `|| true` gate in `tui.ts` startup tips and an unsafe-autofix regression in `TrendingAdapter`); `tests/**` lint overrides for mocks/assertions; `tests/fixtures/**` excluded. CI now runs lint + typecheck on every push/PR (previously excluded as known-broken).
68
+ - `mcp-server.ts`: assignment-in-expression violations; `trending-parser.ts`: stateful `RegExp.exec` loop replaced with `matchAll` (lastIndex reuse hazard); `themes.ts`: documented ANSI control-char regex.
69
+
70
+ ---
71
+
9
72
  ## [9.7.0] — 2026-09-19 (released)
10
73
 
11
74
  ### Added
package/README.md CHANGED
@@ -207,7 +207,7 @@ Actions shown depend on current mode (search vs trending) and selection:
207
207
  | Refresh | Re-run current search (or reload trending) |
208
208
  | Toggle trending | Switch between search and trending views |
209
209
  | Deep-dive | Show languages, contributors, README excerpt |
210
- | Readme | Full README viewer |
210
+ | Readme | Full markdown README viewer (inline images included) |
211
211
  | Activity graph | Toggle commit chart fullscreen |
212
212
  | Bookmark | Save / unsave selected repo |
213
213
  | Compare | Add/remove repo to comparison set |
@@ -233,6 +233,7 @@ Actions shown depend on current mode (search vs trending) and selection:
233
233
  | `d` | History / Bookmarks / Saved searches / Notifications | Delete current entry |
234
234
  | `Ctrl+X` | History | Clear all history |
235
235
  | `Ctrl+C` | Notifications | Dismiss all notifications |
236
+ | `i` | README viewer | Toggle inline images on/off |
236
237
  | `Y` / `N` / `L` | Update modal | Yes (install) / No (skip) / Later (dismiss) |
237
238
  | `↑` / `↓` — `j` / `k` | Update modal | Scroll release notes |
238
239
  | `PgUp` / `PgDn` / `Home` / `End` | Update modal | Jump through release notes |
@@ -284,14 +285,14 @@ cd ghfind
284
285
  # With Bun (recommended for TUI)
285
286
  bun install
286
287
  bun start # TUI
287
- bun test # 355 tests
288
+ bun test # 414 tests
288
289
  bun run check # format check + tests — the green gate
289
290
  bun run build # build dist/
290
291
 
291
292
  # Or with npm
292
293
  npm install
293
294
  npm start # TUI (requires Node 20+)
294
- npm test # 355 tests
295
+ npm test # 414 tests
295
296
  npm run build # build dist/
296
297
 
297
298
  > Want to contribute? See [CONTRIBUTING.md](CONTRIBUTING.md) for commands,
@@ -304,6 +305,19 @@ npm run build # build dist/
304
305
 
305
306
  Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
306
307
 
308
+ ### v9.8.0
309
+
310
+ - **README viewer renders real markdown** — headings, emphasis, links, lists, blockquotes, boxed tables, and fenced code now come from OpenTUI's markdown renderable with a theme-derived syntax style instead of a box-drawing text approximation
311
+ - **Images render inline** — relative and `/`-rooted paths resolve against the README's branch, `github.com/.../blob/...` links are rewritten to raw content, downloads are cached and size-capped, SVG and badge-service images are skipped, and anything unloadable falls back to an `🖼 alt` caption; press `i` in the viewer to toggle images
312
+ - **No new dependencies** — the PNG decoder, image-to-cells rasteriser, and fetch cache are plain TypeScript, and images draw with truecolor half blocks, so they work on any truecolor terminal without image-protocol support
313
+
314
+ ### v9.7.1
315
+
316
+ - **In-app update actually works now** — it used to `bun install -g` into `~/.bun` while your running copy lives in an npm prefix, reporting success while nothing changed; it now detects which package manager owns the running install and updates it in place
317
+ - **New `ghfind --doctor` check** — flags stale/PATH-shadowing global installs (multiple `ghfind` copies with different versions) and prints the exact uninstall command
318
+ - **Windows URL fix** — links with query params were truncated at the first `&` by `cmd /c start`; every pre-filled crash-report/issue link now opens complete
319
+ - Fixed `open-url` crashing under Node; CI now enforces lint + typecheck gates (first green Biome baseline)
320
+
307
321
  ### v9.7.0
308
322
 
309
323
  - **CLI parity with the MCP tools** — `ghfind deep-dive <owner/repo>` (languages, contributors, README excerpt, `--json`), `ghfind --compare` with `--json|--csv|--markdown`, and a trending language filter (`ghfind trending rust`, `--trending <lang>`)
@@ -311,19 +325,6 @@ Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
311
325
  - Fixed `ghfind mcp` failing to typecheck (JSON-RPC id narrowing; runtime behavior unchanged)
312
326
  - The MCP server and CLI now share repo-ref parsing, language validation, and the deep-dive pipeline
313
327
 
314
- ### v9.6.0
315
-
316
- - **MCP server (beta)** — `ghfind mcp` turns ghfind into a tool server: Claude Code, Cursor, Codex, and any MCP client can call GitHub search over stdio (nine tools, no new dependencies)
317
- - **Agent skill (beta)** — `ghfind skill` gives coding agents a token-efficient usage guide; `ghfind trending` accepts a language filter (`ghfind trending rust`)
318
- - **curl installer** — `curl -fsSL https://raw.githubusercontent.com/codersdfs/search-cli/main/scripts/install.sh | sh` downloads the standalone binary and verifies it against the release's `SHA256SUMS.txt`
319
- - **`NO_COLOR` support** — `ghfind --doctor` drops ANSI colors when `NO_COLOR` is set or stdout isn't a TTY
320
- - Fixed the stale `scripts/brew.rb` formula (wrong repo, version, and asset names)
321
-
322
- ### v9.5.1
323
-
324
- - Fixed landing-screen keys leaking into the main view — `/`, `Space`, `t`, `c`, `?`, `q` all double-fired; `b` on the landing screen now opens Bookmarks
325
- - Fixed the update panel clipping the changelog — release notes are now scrollable (`↑↓`/`j`/`k`, `PgUp`/`PgDn`, `Home`/`End`) in a taller panel
326
-
327
328
  ---
328
329
 
329
330
  ## License
package/bin/ghfind.js CHANGED
@@ -9,11 +9,11 @@
9
9
  * Strategy 2: Fall back to the bundled dist/cli.js with Node.js (works for
10
10
  * non-interactive modes).
11
11
  */
12
- import { existsSync } from "fs";
13
- import { spawnSync } from "child_process";
14
- import { join, dirname } from "path";
15
- import { fileURLToPath, pathToFileURL } from "url";
16
- import { platform } from "os";
12
+ import { existsSync } from "node:fs";
13
+ import { spawnSync } from "node:child_process";
14
+ import { join, dirname } from "node:path";
15
+ import { fileURLToPath, pathToFileURL } from "node:url";
16
+ import { platform } from "node:os";
17
17
  const __dirname = dirname(fileURLToPath(import.meta.url));
18
18
  const PKG_DIR = join(__dirname, "..");
19
19