diff --git a/CHANGELOG.md b/CHANGELOG.md index 708a8ac..ab56ca3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,24 +4,24 @@ Release notes and changelogs are published on the **[project blog](https://fulll Each release entry covers the motivation, new features, breaking changes (if any), and upgrade notes. -| Version | Blog post | -| -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| v2.0.0 _(pending)_ | _Hierarchical team-prefix grouping (nested `/` chains, auto-nesting, `--pick-team` at every level) — breaking change to `--group-by-team-prefix` / JSON `section` shape. Blog post pending, see [EPIC #125](https://github.com/fulll/github-code-search/issues/125)._ | -| [v1.12.0](https://fulll.github.io/github-code-search/blog/release-v1-12-0) | Mouse-driven TUI, team re-pick/undo, query-title heading and matched token in output, regex quoting fixes | -| [v1.11.0](https://fulll.github.io/github-code-search/blog/release-v1-11-0) | Team pick mode, `--exclude-template-repositories`, security hardening and Windows installer fixes | -| [v1.10.0](https://fulll.github.io/github-code-search/blog/release-v1-10-0) | Native regex syntax `/pattern/flags` — automatic term extraction, top-level alternation and `--regex-hint` | -| [v1.9.0](https://fulll.github.io/github-code-search/blog/release-v1-9-0) | Windows support — native x64, x64-modern, x64-baseline and ARM64 binaries with one-line PowerShell installer | -| [v1.8.3](https://fulll.github.io/github-code-search/blog/release-v1-8-3) | Fix TUI layout: header/footer anchoring, viewport packing, narrow-terminal clipping, active-row contrast | -| [v1.8.2](https://fulll.github.io/github-code-search/blog/release-v1-8-2) | Fix rate-limit errors aborting multi-page searches; auto-wait and retry with live progress | -| [v1.8.1](https://fulll.github.io/github-code-search/blog/release-v1-8-1) | Fix silent hang after pagination bar — concurrency cap + progress bar for line-number resolution | -| [v1.8.0](https://fulll.github.io/github-code-search/blog/release-v1-8-0) | Purple TUI theme, fetch progress bar, position indicator, line-anchored file links, Esc to close help | -| [v1.7.0](https://fulll.github.io/github-code-search/blog/release-v1-7-0) | Shell completions (bash/zsh/fish) + extended syntax highlighting (PHP, C/C++, Swift, Terraform/HCL, Dockerfile) | -| [v1.6.1](https://fulll.github.io/github-code-search/blog/release-v1-6-1) | Fix TUI only displaying first text fragment when a file has multiple matches | -| [v1.6.0](https://fulll.github.io/github-code-search/blog/release-v1-6-0) | Power navigation: global fold/unfold, gg/G top/bottom, paged scroll, open-in-browser | -| [v1.5.0](https://fulll.github.io/github-code-search/blog/release-v1-5-0) | Advanced filter targets, regex mode, word-jump, scroll fix | -| [v1.4.0](https://fulll.github.io/github-code-search/blog/release-v1-4-0) | TUI visual overhaul, community files, demo animation | -| [v1.3.0](https://fulll.github.io/github-code-search/blog/release-v1-3-0) | Team-prefix grouping, replay command, JSON output | -| [v1.0.0](https://fulll.github.io/github-code-search/blog/release-v1-0-0) | Initial release | +| Version | Blog post | +| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [v2.0.0](https://fulll.github.io/github-code-search/blog/release-v2-0-0) | Hierarchical team-prefix grouping (nested `/` chains, auto-nesting, `--pick-team` at every level, `--pick-team-auto`, `--exclude-team-prefixes`), `GCS_DEFAULT_ORG`, `gh auth token` fallback — breaking change to `--group-by-team-prefix` / JSON `section` shape | +| [v1.12.0](https://fulll.github.io/github-code-search/blog/release-v1-12-0) | Mouse-driven TUI, team re-pick/undo, query-title heading and matched token in output, regex quoting fixes | +| [v1.11.0](https://fulll.github.io/github-code-search/blog/release-v1-11-0) | Team pick mode, `--exclude-template-repositories`, security hardening and Windows installer fixes | +| [v1.10.0](https://fulll.github.io/github-code-search/blog/release-v1-10-0) | Native regex syntax `/pattern/flags` — automatic term extraction, top-level alternation and `--regex-hint` | +| [v1.9.0](https://fulll.github.io/github-code-search/blog/release-v1-9-0) | Windows support — native x64, x64-modern, x64-baseline and ARM64 binaries with one-line PowerShell installer | +| [v1.8.3](https://fulll.github.io/github-code-search/blog/release-v1-8-3) | Fix TUI layout: header/footer anchoring, viewport packing, narrow-terminal clipping, active-row contrast | +| [v1.8.2](https://fulll.github.io/github-code-search/blog/release-v1-8-2) | Fix rate-limit errors aborting multi-page searches; auto-wait and retry with live progress | +| [v1.8.1](https://fulll.github.io/github-code-search/blog/release-v1-8-1) | Fix silent hang after pagination bar — concurrency cap + progress bar for line-number resolution | +| [v1.8.0](https://fulll.github.io/github-code-search/blog/release-v1-8-0) | Purple TUI theme, fetch progress bar, position indicator, line-anchored file links, Esc to close help | +| [v1.7.0](https://fulll.github.io/github-code-search/blog/release-v1-7-0) | Shell completions (bash/zsh/fish) + extended syntax highlighting (PHP, C/C++, Swift, Terraform/HCL, Dockerfile) | +| [v1.6.1](https://fulll.github.io/github-code-search/blog/release-v1-6-1) | Fix TUI only displaying first text fragment when a file has multiple matches | +| [v1.6.0](https://fulll.github.io/github-code-search/blog/release-v1-6-0) | Power navigation: global fold/unfold, gg/G top/bottom, paged scroll, open-in-browser | +| [v1.5.0](https://fulll.github.io/github-code-search/blog/release-v1-5-0) | Advanced filter targets, regex mode, word-jump, scroll fix | +| [v1.4.0](https://fulll.github.io/github-code-search/blog/release-v1-4-0) | TUI visual overhaul, community files, demo animation | +| [v1.3.0](https://fulll.github.io/github-code-search/blog/release-v1-3-0) | Team-prefix grouping, replay command, JSON output | +| [v1.0.0](https://fulll.github.io/github-code-search/blog/release-v1-0-0) | Initial release | > For the full list of commits between releases, see the > [GitHub Releases page](https://github.com/fulll/github-code-search/releases). diff --git a/docs/blog/index.md b/docs/blog/index.md index cce697d..f665cd1 100644 --- a/docs/blog/index.md +++ b/docs/blog/index.md @@ -7,6 +7,12 @@ Full release notes and changelogs are always available on --- +## v2 series + +| Release | Highlights | +| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| [v2.0.0](./release-v2-0-0) | Hierarchical `--group-by-team-prefix` grouping (nested headings, auto-pick, exclusions), `GCS_DEFAULT_ORG`, gh CLI token fallback — breaking change | + ## v1 series | Release | Highlights | diff --git a/docs/blog/release-v2-0-0.md b/docs/blog/release-v2-0-0.md new file mode 100644 index 0000000..3c78600 --- /dev/null +++ b/docs/blog/release-v2-0-0.md @@ -0,0 +1,101 @@ +--- +title: "What's new in v2.0.0" +description: "Hierarchical team-prefix grouping with nested headings, auto-pick, and exclusions — plus GCS_DEFAULT_ORG and gh CLI token fallback. Breaking change to --group-by-team-prefix and JSON output." +date: 2026-09-19 +--- + +# What's new in github-code-search v2.0.0 + +> Full release notes: + +This is a **major** release: `--group-by-team-prefix` now supports a full hierarchy instead of a single flat level, which changes the markdown heading structure and the JSON output shape for anyone already using it. See [Breaking changes](#breaking-changes) below before upgrading. + +## Highlights + +### Hierarchical team-prefix grouping + +`--group-by-team-prefix` now accepts a small chain grammar instead of a flat, comma-separated prefix list: + +- `/` nests levels **within one chain** — group by the first prefix, then sub-group each section by the next prefix. +- `,` separates **independent chains** — each grouped on its own, against whatever repos earlier chains haven't already claimed. + +```bash +# Group by tribe- first, then by squad- within each tribe +github-code-search "useFeatureFlag" --org fulll \ + --group-by-team-prefix tribe-/squad- +``` + +Markdown output renders one heading level per depth (`##`, `###`, `####`, … capped at H6), and JSON output now carries the full hierarchy per result as a `section` array: + +```json +{ + "repo": "myorg/mobile-app", + "section": ["tribe-b", "squad-core + squad-mobile"], + "matches": [{ "path": "src/index.ts", "url": "...", "line": 1, "col": 1 }] +} +``` + +Team names that overlap within one level (e.g. `squad-a` and `squad-a-legacy`) are now **combined automatically** into one section instead of appearing as unrelated siblings. + +### `--pick-team` at every hierarchy level + +`--pick-team` and interactive pick mode (`p`) now resolve combined sections at **any depth** of the hierarchy, not just the top level — the same workflow from v1.11.0, extended to nested chains. + +### `--pick-team-auto` — resolve ambiguous sections automatically + +New flag: auto-resolves combined sections whose team names share a common prefix (e.g. `tribe-a + tribe-a-p1` → `tribe-a`), without an explicit `--pick-team`. It also clusters combos that share a recurring team across siblings even without a literal common prefix, and always defers to an explicit `--pick-team` for the same section. + +```bash +github-code-search "useFeatureFlag" --org fulll \ + --group-by-team-prefix tribe-/squad- \ + --pick-team-auto +``` + +### `--exclude-team-prefixes` — strip noisy team names before grouping + +Some orgs have many closely related, deeply-overlapping team names under one prefix. `--exclude-team-prefixes` removes matching teams from consideration **before** grouping runs, reducing ambiguous combos at the source: + +```bash +github-code-search "useFeatureFlag" --org fulll \ + --group-by-team-prefix tribe-/squad- \ + --exclude-team-prefixes squad-validators- +``` + +### `GCS_DEFAULT_ORG` — skip `--org` on every call + +If you mostly search a single organization, set it once and omit `--org` entirely: + +```bash +export GCS_DEFAULT_ORG=my-org +github-code-search "useFeatureFlag" +``` + +An explicit `--org` flag always takes precedence. + +### `GITHUB_TOKEN` fallback via the GitHub CLI + +If `GITHUB_TOKEN` isn't set and the [GitHub CLI](https://cli.github.com/) is installed and authenticated, `github-code-search` now retrieves a token automatically via `gh auth token` — no extra setup needed. Applies to the search commands and the `upgrade` subcommand. + +### Also in this release + +- Fixed a systematic ~2 s exit delay after printing results, in both interactive and non-interactive (`--no-interactive` / CI) mode. +- Removed the `picocolors` dependency in favor of a native `util.styleText` facade — no behavior change, one less external dependency. +- Bumped the minimum required Bun version to **1.4** (native `Bun.stringWidth` / `stripANSI` / `sliceAnsi` and `util.styleText` are used at runtime). +- Routine dependency upgrades. + +## Breaking changes + +- **Removed** `--group-by-team-prefix-consolidate` and the underlying consolidated-rendering mode. In practice, `--pick-team-auto` covers the real need (resolving ambiguous combined sections) more reliably — if you used the consolidate flag, switch to `--pick-team-auto` and/or `--exclude-team-prefixes`. +- Markdown output can now render **more than one heading level** (`##`/`###`/`####`…) when a multi-level chain (`tribe-/squad-`) is used, instead of always a single flat `##` level. +- JSON output gains a **`section` array** per result when `--group-by-team-prefix` is used (previously JSON carried no section/team information at all). + +Plain, single-level `--group-by-team-prefix squad-` usage (no `/`) is unaffected — you'll only notice a difference if you adopt the new chain syntax or previously relied on `--group-by-team-prefix-consolidate`. + +## Upgrade + +```sh +github-code-search upgrade +``` + +Or download the latest binary from +[GitHub Releases](https://github.com/fulll/github-code-search/releases/tag/v2.0.0). diff --git a/package.json b/package.json index e355e66..07a03a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "github-code-search", - "version": "1.12.0", + "version": "2.0.0", "description": "Interactive GitHub code search with per-repo aggregation", "keywords": [ "bun",